On 2/7/25 7:22 PM, Linus Torvalds wrote:
So if it's _so_ rare that these are the *only* cases of that warning happening in the whole kernel build, then I'll just concede that while I still think it's a fine pattern, if it's *so* rare that we only had two cases of it, then it's worth fixing those two cases. Because at some point "really really unusual" might be worth warning for, even if the unusual case isn't wrong per se. But I don't have any visibility into whether this is just one header file fix and we're done, or whether it's actually more common, and the one header file case is just a "this causes lots of noise because it's included everywhere".
Hi Linus, That's an interesting question: how often -Wenum-enum-conversion warnings are triggered. I ran into these warnings while building the code in the block/ directory with W=1. For almost every source file in the block directory that was built, -Wenum-enum-conversion warnings appeared for the header files include/linux/mmzone.h or include/linux/vmstat.h. This is why I posted the patch at the start of this email thread. Of course, moving -Wenum-enum-conversion from W=1 to W=2 is also fine with me. Thanks, Bart.