From: Dan Carpenter <dan.carpenter@oracle.com>
To: Peter Huewe <peterhuewe@gmx.de>
Cc: Rupesh Gujare <rupesh.gujare@atmel.com>,
devel@driverdev.osuosl.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/7] staging/ozwpan: Fix sparse warning Using plain integer as NULL pointer
Date: Fri, 15 Feb 2013 11:45:17 +0300 [thread overview]
Message-ID: <20130215084517.GB6802@mwanda> (raw)
In-Reply-To: <1360905935-20601-1-git-send-email-peterhuewe@gmx.de>
On Fri, Feb 15, 2013 at 06:25:29AM +0100, Peter Huewe wrote:
> This patch fixes the warning "Using plain integer as NULL pointer",
> generated by sparse, by replacing the offending 0s with NULL.
>
> Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Don't send 7 patches with the same subject.
> @@ -455,7 +455,7 @@ int oz_prepare_frame(struct oz_pd *pd, int empty)
> */
> static struct sk_buff *oz_build_frame(struct oz_pd *pd, struct oz_tx_frame *f)
> {
> - struct sk_buff *skb = 0;
> + struct sk_buff *skb = NULL;
This initialization could just be removed.
> struct net_device *dev = pd->net_dev;
> struct oz_hdr *oz_hdr;
> struct oz_elt *elt;
> @@ -464,8 +464,8 @@ static struct sk_buff *oz_build_frame(struct oz_pd *pd, struct oz_tx_frame *f)
> * as the space we need.
> */
> skb = alloc_skb(f->total_size + OZ_ALLOCATED_SPACE(dev), GFP_ATOMIC);
> - if (skb == 0)
> - return 0;
> + if (skb == NULL)
> + return NULL;
regards,
dan carpenter
next prev parent reply other threads:[~2013-02-15 8:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-15 5:25 [PATCH 1/7] staging/ozwpan: Fix sparse warning Using plain integer as NULL pointer Peter Huewe
2013-02-15 5:25 ` [PATCH 2/7] " Peter Huewe
2013-02-15 5:25 ` [PATCH 3/7] " Peter Huewe
2013-02-15 5:25 ` [PATCH 4/7] " Peter Huewe
2013-02-15 5:25 ` [PATCH 5/7] " Peter Huewe
2013-02-15 5:25 ` [PATCH 6/7] " Peter Huewe
2013-02-15 5:25 ` [PATCH 7/7] " Peter Huewe
2013-02-15 8:45 ` Dan Carpenter [this message]
2013-02-15 14:22 ` [PATCH 1/7 v2] staging/ozwpan: Fix NULL vs zero in ozpd.c (sparse warning) Peter Huewe
2013-02-15 14:22 ` [PATCH 2/7 v2] staging/ozwpan: Fix NULL vs zero in ozusbsvc1.c " Peter Huewe
2013-02-15 14:22 ` [PATCH 3/7 v2] staging/ozwpan: Fix NULL vs zero in ozeltbuf.c " Peter Huewe
2013-02-15 14:52 ` Dan Carpenter
2013-02-15 15:57 ` Clang Analyzer was " Peter Huewe
2013-02-15 16:11 ` Dan Carpenter
2013-02-15 16:34 ` Peter Hüwe
2013-02-15 14:22 ` [PATCH 4/7 v2] staging/ozwpan: Fix NULL vs zero in ozproto.c " Peter Huewe
2013-02-15 14:22 ` [PATCH 5/7 v2] staging/ozwpan: Fix NULL vs zero in ozcdev.c " Peter Huewe
2013-02-15 14:22 ` [PATCH 6/7] staging/ozwpan: Fix NULL vs zero in ozusbsvc.c " Peter Huewe
2013-02-15 14:22 ` [PATCH 7/7] staging/ozwpan: Fix NULL vs zero in ozhcd.c " Peter Huewe
2013-02-15 18:56 ` Rupesh Gujare
2013-02-15 14:55 ` [PATCH 1/7 v2] staging/ozwpan: Fix NULL vs zero in ozpd.c " Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130215084517.GB6802@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=rupesh.gujare@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox