* [PATCH] nfc: nci: fix warning comparison to bool
@ 2019-06-08 8:41 Hariprasad Kelam
2019-06-10 2:55 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Kelam @ 2019-06-08 8:41 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel
Fix below warning reported by coccicheck
net/nfc/nci/ntf.c:367:5-15: WARNING: Comparison to bool
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
net/nfc/nci/ntf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/nfc/nci/ntf.c b/net/nfc/nci/ntf.c
index 1e8c1a1..81e8570 100644
--- a/net/nfc/nci/ntf.c
+++ b/net/nfc/nci/ntf.c
@@ -364,7 +364,7 @@ static void nci_rf_discover_ntf_packet(struct nci_dev *ndev,
ntf.ntf_type = *data++;
pr_debug("ntf_type %d\n", ntf.ntf_type);
- if (add_target == true)
+ if (add_target)
nci_add_new_target(ndev, &ntf);
if (ntf.ntf_type == NCI_DISCOVER_NTF_TYPE_MORE) {
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nfc: nci: fix warning comparison to bool
2019-06-08 8:41 [PATCH] nfc: nci: fix warning comparison to bool Hariprasad Kelam
@ 2019-06-10 2:55 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-06-10 2:55 UTC (permalink / raw)
To: hariprasad.kelam; +Cc: netdev, linux-kernel
From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Date: Sat, 8 Jun 2019 14:11:54 +0530
> Fix below warning reported by coccicheck
>
> net/nfc/nci/ntf.c:367:5-15: WARNING: Comparison to bool
>
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> ---
> net/nfc/nci/ntf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/nfc/nci/ntf.c b/net/nfc/nci/ntf.c
> index 1e8c1a1..81e8570 100644
> --- a/net/nfc/nci/ntf.c
> +++ b/net/nfc/nci/ntf.c
> @@ -364,7 +364,7 @@ static void nci_rf_discover_ntf_packet(struct nci_dev *ndev,
> ntf.ntf_type = *data++;
> pr_debug("ntf_type %d\n", ntf.ntf_type);
>
> - if (add_target == true)
> + if (add_target)
add_target is a bool, these kinds of changes are not good.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-10 2:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-08 8:41 [PATCH] nfc: nci: fix warning comparison to bool Hariprasad Kelam
2019-06-10 2:55 ` David Miller
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).