lkml.org 
[lkml]   [2020]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 1/9] kernel.h: add do_empty() macro
From
Date
On 4/18/20 11:44 AM, Joe Perches wrote:
> On Sat, 2020-04-18 at 11:41 -0700, Randy Dunlap wrote:
>> Add the do_empty() macro to silence gcc warnings about an empty body
>> following an "if" statement when -Wextra is used.
>>
>> However, for debug printk calls that are being disabled, use either
>> no_printk() or pr_debug() [and optionally dynamic printk debugging]
>> instead.
> []
>> +#define do_empty() do { } while (0)
>
> If this is really useful
> (I think the warning is somewhat silly)
>
> bikeshed:
>
> I think do_nothing() is more descriptive

Yes, I do too, as I more or less mentioned in the cover letter.

--
~Randy

\
 
 \ /
  Last update: 2020-04-18 20:50    [W:0.015 / U:1.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site