Re: New distributed storage release.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sven Wegener
Date: Monday, September 8, 2008 - 11:19 am

On Mon, 8 Sep 2008, Evgeniy Polyakov wrote:


Yup, cast it. That are a lot of warnings and best to avoid them.


If there is coming more funtionality, ok, but currently it's irritating to 
have a submenu and then just a single debug option in there.


Yeah, the dprintk()s are ok, but I was after the printk()s that follow. 
They are unconditional and will always print the key.


Guess I picked a bad example... There are some in the code that are 
needless.


Yeah, but in nearly all cases you don't need to change anything in that 
line, when you use sizeof(*ptr), because it always gets you the correct 
size you want. There are cases we could argue about, because you might 
want to do a limited memset() or memcpy() with a different size, but for 
most cases like memset() to zero or kmalloc, sizeof(*ptr) makes it clear 
that you want to clear out the whole structure or you want enough memory 
to store the type of ptr in it. Don't know how strict the policy is, but 
it's part of CodingStyle.


For just shutting up the compiler, use the void cast. I think removing a 
failed attribute is ok.


In other cases you allocate u8 iv[32] on the stack, so I guess this point 
is void. And I think 36 bytes isn't that much and it looks like you're 
called from user space, so I don't think you have a deep callchain here.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
New distributed storage release., Evgeniy Polyakov, (Mon Sep 8, 8:22 am)
Re: New distributed storage release., Sven Wegener, (Mon Sep 8, 10:19 am)
Re: New distributed storage release., Evgeniy Polyakov, (Mon Sep 8, 10:43 am)
Re: New distributed storage release., Sven Wegener, (Mon Sep 8, 11:19 am)
Re: New distributed storage release., Evgeniy Polyakov, (Mon Sep 8, 12:31 pm)