netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: qlge: Replace the occurrences of (1<<x) by BIT(x)
@ 2023-10-15 13:35 Nandha Kumar Singaram
  2023-10-17  9:18 ` Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Nandha Kumar Singaram @ 2023-10-15 13:35 UTC (permalink / raw)
  To: Manish Chopra, GR-Linux-NIC-Dev, Coiby Xu, Greg Kroah-Hartman,
	netdev, linux-staging, linux-kernel
  Cc: kumaran.4353

Adhere to linux coding style. Reported by checkpatch.pl:
CHECK: Prefer using the BIT macro

Signed-off-by: Nandha Kumar Singaram <nandhakumar.singaram@gmail.com>
---
 drivers/staging/qlge/qlge.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/qlge/qlge.h b/drivers/staging/qlge/qlge.h
index d0dd659834ee..69c5b332fd7c 100644
--- a/drivers/staging/qlge/qlge.h
+++ b/drivers/staging/qlge/qlge.h
@@ -1273,7 +1273,7 @@ struct qlge_net_req_iocb {
  */
 struct wqicb {
 	__le16 len;
-#define Q_LEN_V		(1 << 4)
+#define Q_LEN_V		BIT(4)
 #define Q_LEN_CPP_CONT	0x0000
 #define Q_LEN_CPP_16	0x0001
 #define Q_LEN_CPP_32	0x0002
@@ -1308,7 +1308,7 @@ struct cqicb {
 #define FLAGS_LI	0x40
 #define FLAGS_LC	0x80
 	__le16 len;
-#define LEN_V		(1 << 4)
+#define LEN_V		BIT(4)
 #define LEN_CPP_CONT	0x0000
 #define LEN_CPP_32	0x0001
 #define LEN_CPP_64	0x0002
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: qlge: Replace the occurrences of (1<<x) by BIT(x)
  2023-10-15 13:35 [PATCH] staging: qlge: Replace the occurrences of (1<<x) by BIT(x) Nandha Kumar Singaram
@ 2023-10-17  9:18 ` Simon Horman
  2023-10-17 14:23   ` Nandha Kumar Singaram
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Horman @ 2023-10-17  9:18 UTC (permalink / raw)
  To: Nandha Kumar Singaram
  Cc: Manish Chopra, GR-Linux-NIC-Dev, Coiby Xu, Greg Kroah-Hartman,
	netdev, linux-staging, linux-kernel, kumaran.4353

On Sun, Oct 15, 2023 at 06:35:58AM -0700, Nandha Kumar Singaram wrote:
> Adhere to linux coding style. Reported by checkpatch.pl:
> CHECK: Prefer using the BIT macro
> 
> Signed-off-by: Nandha Kumar Singaram <nandhakumar.singaram@gmail.com>

Hi Nandha,

I am assuming that checkpatch clean ups are acceptable, perhaps
even desired, in staging. So this patch seems appropriate to me.

I do, however, see a lot more potential uses of BIT() in qlge.h.
Could you take a second look?

...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: qlge: Replace the occurrences of (1<<x) by BIT(x)
  2023-10-17  9:18 ` Simon Horman
@ 2023-10-17 14:23   ` Nandha Kumar Singaram
  0 siblings, 0 replies; 3+ messages in thread
From: Nandha Kumar Singaram @ 2023-10-17 14:23 UTC (permalink / raw)
  To: Simon Horman
  Cc: Manish Chopra, GR-Linux-NIC-Dev, Coiby Xu, Greg Kroah-Hartman,
	netdev, linux-staging, linux-kernel, kumaran.4353

On Tue, Oct 17, 2023 at 11:18:14AM +0200, Simon Horman wrote:
> On Sun, Oct 15, 2023 at 06:35:58AM -0700, Nandha Kumar Singaram wrote:
> > Adhere to linux coding style. Reported by checkpatch.pl:
> > CHECK: Prefer using the BIT macro
> > 
> > Signed-off-by: Nandha Kumar Singaram <nandhakumar.singaram@gmail.com>
> 
> Hi Nandha,
> 
> I am assuming that checkpatch clean ups are acceptable, perhaps
> even desired, in staging. So this patch seems appropriate to me.
> 
> I do, however, see a lot more potential uses of BIT() in qlge.h.
> Could you take a second look?
> 
> ...

Hi Simon,

I will look into it and update the patch

Thanks,
Nandha Kumar Singaram

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-17 14:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-15 13:35 [PATCH] staging: qlge: Replace the occurrences of (1<<x) by BIT(x) Nandha Kumar Singaram
2023-10-17  9:18 ` Simon Horman
2023-10-17 14:23   ` Nandha Kumar Singaram

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).