On Fri, Feb 07, 2025 at 07:11:08PM -0800, Linus Torvalds wrote: > That said, we may not have *many* of those enum cases in the kernel > (and we do tend to have a history of using long series of '#define' > sequences to do these constants), so maybe the warning is acceptable > if it's a case of "this is literally the *only* one in the kernel". > > But not having clang-19, I can't see if this is a case of "this is so > rare that let's just avoid it", or "this is the case that causes the > most noise for every file build, but there are lots of other cases of > this". When this warning was turned on for C in clang-19 (it was C++ only prior to that IIRC), it was extremely noisy. Some of that was due to the warning occurring in headers that are included everywhere such as these couple of ones but even hiding the big ones, there were still a bunch of locations that triggered it (I did not do the best at hiding all of the header ones because I had given up trying to make leaving the warning on for the default build at that point). The diff to hide some of the really common ones: https://github.com/ClangBuiltLinux/linux/issues/2002#issuecomment-1970004069 The build log with that: https://gist.github.com/nathanchance/971e5abeba504d3017cd6ed4517bbda6 I looked at a number of them and none of them really seemed like bugs to me. Cheers, Nathan