lkml.org 
[lkml]   [2019]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rdma/siw: Use proper enumerated type in map_cqe_status
Hi Bernard,

On Thu, Jul 11, 2019 at 07:44:22AM +0000, Bernard Metzler wrote:
> Nathan, thanks very much. That's correct.

Thanks for the confirmation that the fix was correct.

> I don't know how this could pass w/o warning.

Unfortunately, it appears that GCC only warns when two different
enumerated types are directly compared, not when they are implicitly
converted between.

https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wenum-compare

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78736

If it did, I wouldn't have fixed as many warnings as I have.

https://github.com/ClangBuiltLinux/linux/issues?q=is%3Aissue+is%3Aclosed+label%3A-Wenum-conversion

Maybe time to start plumbing Clang into your test flow until it can get
intergrated with more CI setups? :) It can catch some pretty dodgy
behavior that GCC doesn't:

https://github.com/ClangBuiltLinux/linux/issues/390

https://github.com/ClangBuiltLinux/linux/issues/544

Kernel CI has added support for it (although they don't email the
authors of patches individually) and 0day is currently working on it.
Feel free to reach out if you decide to explore it, I'm always happy
to help.

Cheers,
Nathan

\
 
 \ /
  Last update: 2019-07-11 10:15    [W:0.044 / U:12.716 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site