Re: [PATCH] ib_srp: Let compiler ignore the useless debug code

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

 



On Fri, 2017-02-24 at 16:44 +0800, Minfei Huang wrote:
> "if (0)" is used to make this block of debug code not be executed. There
> is a more elegant way to let compiler ignore this code, using
> "#if 0 .. #endif" instead.
> 
> Although it may be optimised by some compilers with specified parameter,
> just for readable.

#if 0 / #endif prevents the compiler from checking the syntax of the code.
Such code tends to grow syntax errors. So I'm not sure this patch is an
improvement.

Bart.--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux