On Wed, Aug 24, 2011 at 2:08 AM, Sam Ravnborg wrote:
>>
>> I'm still a little confused -- the {0} or memset(0, struct ..);
>> formations are used often in the kernel, even with pointers involved.
>> Is the warning (Wnon_pointer_null) run against the kernel by default,
>> or did Venkatraman add it
On Wed, Aug 24, 2011 at 4:10 AM, J Freyensee
wrote:
> On 08/23/2011 09:56 AM, Sam Ravnborg wrote:
>>
>> On Tue, Aug 23, 2011 at 12:31:55PM -0400, Chris Ball wrote:
>>>
>>> Hi,
>>>
>>> [Adding linux-sparse@ to CC]
>>>
>>> On Tue, Aug 23 2011, Venkatraman S wrote:
Fix the sparse warning ou
On 08/23/2011 09:56 AM, Sam Ravnborg wrote:
On Tue, Aug 23, 2011 at 12:31:55PM -0400, Chris Ball wrote:
Hi,
[Adding linux-sparse@ to CC]
On Tue, Aug 23 2011, Venkatraman S wrote:
Fix the sparse warning output
"warning: Using plain integer as NULL pointer"
Signed-off-by: Venkatraman S
---
d
Josh Triplett writes:
> On Tue, Aug 23, 2011 at 11:04:08AM -0700, Ben Pfaff wrote:
>> Josh Triplett writes:
>>
>> > On Tue, Aug 23, 2011 at 12:31:55PM -0400, Chris Ball wrote:
>> >> On Tue, Aug 23 2011, Venkatraman S wrote:
>> >> > - struct mmc_request mrq = {0};
>> >> > + struct mm
>
> I'm still a little confused -- the {0} or memset(0, struct ..);
> formations are used often in the kernel, even with pointers involved.
> Is the warning (Wnon_pointer_null) run against the kernel by default,
> or did Venkatraman add it manually? If default, is it catching bugs?
Did a quick "
On Tue, Aug 23, 2011 at 02:28:42PM -0400, Chris Ball wrote:
> Hi,
>
> On Tue, Aug 23 2011, Josh Triplett wrote:
> > {} produces the same effect, as far as I know.
>
> Yeah. I prefer {0}, because {} is a gcc-ism (the ANSI grammar demands
> initializer-lists be non-empty) and is less readable for
Josh Triplett writes:
> On Tue, Aug 23, 2011 at 12:31:55PM -0400, Chris Ball wrote:
>> On Tue, Aug 23 2011, Venkatraman S wrote:
>> > - struct mmc_request mrq = {0};
>> > + struct mmc_request mrq = {NULL};
>>
>> The sparse warning is mistaken. Or I'm mistaken. But I suspect it's
>> the spars
Hi,
On Tue, Aug 23 2011, Josh Triplett wrote:
> {} produces the same effect, as far as I know.
Yeah. I prefer {0}, because {} is a gcc-ism (the ANSI grammar demands
initializer-lists be non-empty) and is less readable for people who
haven't seen the idiom before and are wondering what's going on
On Tue, Aug 23, 2011 at 11:04:08AM -0700, Ben Pfaff wrote:
> Josh Triplett writes:
>
> > On Tue, Aug 23, 2011 at 12:31:55PM -0400, Chris Ball wrote:
> >> On Tue, Aug 23 2011, Venkatraman S wrote:
> >> > -struct mmc_request mrq = {0};
> >> > +struct mmc_request mrq = {NULL};
> >>
Hi,
On Tue, Aug 23 2011, Sam Ravnborg wrote:
>> So we're not assigning 0 to a pointer, or whatever sparse thinks we're
>> doing -- we're initializing every member of the struct with 0, which is
>> a good and safe way to initialize it.
>>
>> Sparse folks, any comment?
>
> The struct looks like thi
On Tue, Aug 23, 2011 at 12:31:55PM -0400, Chris Ball wrote:
> Hi,
>
> [Adding linux-sparse@ to CC]
>
> On Tue, Aug 23 2011, Venkatraman S wrote:
> > Fix the sparse warning output
> > "warning: Using plain integer as NULL pointer"
> >
> > Signed-off-by: Venkatraman S
> > ---
> > drivers/mmc/card
On Tue, Aug 23, 2011 at 12:31:55PM -0400, Chris Ball wrote:
> Hi,
>
> [Adding linux-sparse@ to CC]
>
> On Tue, Aug 23 2011, Venkatraman S wrote:
> > Fix the sparse warning output
> > "warning: Using plain integer as NULL pointer"
> >
> > Signed-off-by: Venkatraman S
> > ---
> > drivers/mmc/card
Hi,
[Adding linux-sparse@ to CC]
On Tue, Aug 23 2011, Venkatraman S wrote:
> Fix the sparse warning output
> "warning: Using plain integer as NULL pointer"
>
> Signed-off-by: Venkatraman S
> ---
> drivers/mmc/card/block.c|4 ++--
> drivers/mmc/core/core.c |2 +-
> drivers/mmc/co
Fix the sparse warning output
"warning: Using plain integer as NULL pointer"
Signed-off-by: Venkatraman S
---
drivers/mmc/card/block.c|4 ++--
drivers/mmc/core/core.c |2 +-
drivers/mmc/core/mmc_ops.c |4 ++--
drivers/mmc/core/sdio_ops.c |2 +-
4 files changed, 6 inserti
14 matches
Mail list logo