Re: [PATCH 11/14] staging: unisys: remove do{} while(0) in macros in channel.h

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

 



On Wed, Aug 06, 2014 at 08:08:11AM -0500, Romer, Benjamin M wrote:
> On Wed, 2014-08-06 at 11:18 +0300, Dan Carpenter wrote:
> > On Tue, Aug 05, 2014 at 02:57:55PM -0400, Benjamin Romer wrote:
> > > The CHANNEL_*_MISMATCH error message macros should not be inside of do blocks.
> > > 
> > 
> > Why not?  We do that so they can be called like a function.  These seem
> > to not be called at all.   Just delete them (in a later patch).
> 
> I ran checkpatch.pl against the channel.h file and it complains about
> the do blocks in the macros there. It also complains about do blocks in
> iochannel.h.  It's only a warning though.

Ah.  I see.  The thing is you should remove the final semi-colon from
the macro as well as the do while.

But it's best to just remove the macro.  It only obfuscates the code.

> 
> I'm all in favor of deleting them - they get used in
> ULTRA_check_channel_client() in the same file, and only there. I'll just
> remove the macros and put the equivalent code in where they were used.

Oh...  It is used after all.  Then one of your earlier patches:

[PATCH 02/12] staging: unisys: remove U32 type

must have broken the build.  That's not allowed...

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