[PATCH] Remove warning: "dubious: x | !y" detected by sparse

Dan Carpenter dan.carpenter at oracle.com
Wed Jan 15 06:21:56 UTC 2020


Add a subsystem prefix to the subject.  "Staging: kpc2000:"

On Tue, Jan 14, 2020 at 10:25:15PM -0300, Felipe Cardoso Resende wrote:
> The way I chose to remove the warning was to define a macro to
> make it clear if a flag will be enable or not.
> 
> Let me know if you would prefer it to be done in a different way.
> 

All this should go under the --- cut off because we don't want it in the
final git history.

> Signed-off-by: Felipe Cardoso Resende <felipecardoso.fcr at gmail.com>
> ---
  ^^^

The commit message should be something like.  "Sparse complains about
"dubious: x | !y".  This patch adds some macros to make Sparse happy and
the code more readable.

I like the patch.  enable_flag_if() is slightly weird because normally
the condition would come first.  It feels sort of like Perl or something
to put the condition afterwards.  But this patch is very small and self
contained so it's fine.

Just fix up the subject and the commit message and resend.

regards,
dan carpenter



More information about the devel mailing list