* [PATCH] NFC: nci/data.c: quiet sparse noise about plain integer as NULL pointer
@ 2012-04-26 17:31 H Hartley Sweeten
2012-04-30 9:26 ` Samuel Ortiz
0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2012-04-26 17:31 UTC (permalink / raw)
To: Linux Kernel
Cc: netdev, linux-wireless, lauro.venancio, aloisio.almeida, sameo, davem
Pointers should be cleared with NULL, not 0.
Quiets a couple sparse warnings of the type:
warning: Using plain integer as NULL pointer
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
---
diff --git a/net/nfc/nci/data.c b/net/nfc/nci/data.c
index a0bc326..76c48c5 100644
--- a/net/nfc/nci/data.c
+++ b/net/nfc/nci/data.c
@@ -49,7 +49,7 @@ void nci_data_exchange_complete(struct nci_dev *ndev, struct sk_buff *skb,
if (cb) {
ndev->data_exchange_cb = NULL;
- ndev->data_exchange_cb_context = 0;
+ ndev->data_exchange_cb_context = NULL;
/* forward skb to nfc core */
cb(cb_context, skb, err);
@@ -200,10 +200,10 @@ static void nci_add_rx_data_frag(struct nci_dev *ndev,
pr_err("error adding room for accumulated rx data\n");
kfree_skb(skb);
- skb = 0;
+ skb = NULL;
kfree_skb(ndev->rx_data_reassembly);
- ndev->rx_data_reassembly = 0;
+ ndev->rx_data_reassembly = NULL;
err = -ENOMEM;
goto exit;
@@ -216,7 +216,7 @@ static void nci_add_rx_data_frag(struct nci_dev *ndev,
/* third, free old reassembly */
kfree_skb(ndev->rx_data_reassembly);
- ndev->rx_data_reassembly = 0;
+ ndev->rx_data_reassembly = NULL;
}
if (pbf == NCI_PBF_CONT) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NFC: nci/data.c: quiet sparse noise about plain integer as NULL pointer
2012-04-26 17:31 [PATCH] NFC: nci/data.c: quiet sparse noise about plain integer as NULL pointer H Hartley Sweeten
@ 2012-04-30 9:26 ` Samuel Ortiz
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Ortiz @ 2012-04-30 9:26 UTC (permalink / raw)
To: H Hartley Sweeten
Cc: Linux Kernel, netdev, linux-wireless, lauro.venancio,
aloisio.almeida, davem
Hi,
On Thu, Apr 26, 2012 at 10:31:16AM -0700, H Hartley Sweeten wrote:
> Pointers should be cleared with NULL, not 0.
>
> Quiets a couple sparse warnings of the type:
>
> warning: Using plain integer as NULL pointer
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
> Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: "David S. Miller" <davem@davemloft.net>
This one and the 4 other NFC patches applied to my nfc-next tree, thanks.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-30 9:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-26 17:31 [PATCH] NFC: nci/data.c: quiet sparse noise about plain integer as NULL pointer H Hartley Sweeten
2012-04-30 9:26 ` Samuel Ortiz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).