Re: [Outreachy kernel] [PATCH 3/3] staging/rtl8712: use BIT macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 20, 2020 at 07:44:04PM +0100, Matthew Wilcox wrote:
> On Tue, Oct 20, 2020 at 11:24:39AM -0700, Elena Afanasova wrote:
> > Reported by checkpatch.pl
> 
> Checkpatch is wrong.
> 
> > +++ b/drivers/staging/rtl8712/rtl871x_recv.h
> > @@ -8,7 +8,7 @@
> >  #define NR_RECVFRAME 256
> >  
> >  #define RXFRAME_ALIGN	8
> > -#define RXFRAME_ALIGN_SZ	(1 << RXFRAME_ALIGN)
> > +#define RXFRAME_ALIGN_SZ	BIT(RXFRAME_ALIGN)

Yeah.  It's weird to talk about size as a BIT() flag.  The RXFRAME_ALIGN
is not needed.  Just say:

-#define RXFRAME_ALIGN      8
-#define RXFRAME_ALIGN_SZ   (1 << RXFRAME_ALIGN)
+#define RXFRAME_ALIGN_SZ 256

This is literally used for aligning the RX frame.  It seems like a crazy
thing to me that to aligned at 256 bytes.  I would have expected 64 bit
alignment or page alignment but not 256 byte alignment...  Weird.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux