[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 18 10:29:38 PDT 2023


nickdesaulniers added a comment.

In D142609#4507696 <https://reviews.llvm.org/D142609#4507696>, @nathanchance wrote:

> but I see a new one along a similar line as those:
>
> https://elixir.bootlin.com/linux/v6.5-rc2/source/drivers/gpu/drm/v3d/v3d_drv.h#L343

I only see 4 instances of `NSEC_PER_SEC % HZ` in mainline. 2 already use the C preprocessor (inconsistently), and 2 don't. I think the 2 that don't could be converted to use the preprocessor, then that issue goes away. So I think we can clean that up on the kernel side.

@nathanchance were there many other instances of warnings triggered by this patch beyond that?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142609/new/

https://reviews.llvm.org/D142609



More information about the cfe-commits mailing list