lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <170141985986.3198881.16310139541433130875.b4-ty@kernel.org>
Date:   Fri, 01 Dec 2023 09:37:39 +0100
From:   Maxime Ripard <mripard@...nel.org>
To:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        Donald Robson <donald.robson@...tec.com>
Cc:     matt.coster@...tec.com, frank.binns@...tec.com,
        boris.brezillon@...labora.com, maarten.lankhorst@...ux.intel.com,
        tzimmermann@...e.de, airlied@...il.com, daniel@...ll.ch,
        kernel test robot <lkp@...el.com>
Subject: Re: (subset) [PATCH v2 1/5] drm/imagination: Fixed warning due to
 implicit cast to bool

On Thu, 30 Nov 2023 16:00:13 +0000, Donald Robson wrote:
> This line appears to confuse the compiler and had been noticed previously in
> clang-tidy output. There isn't anything fundamentally wrong that I can see.
> I suspect that it just looks like a mistake - hence the first note.  By making
> the second operand an actual bool result, const correctness can be preserved
> while silencing the warning.
> 
> >> drivers/gpu/drm/imagination/pvr_device_info.c:230:47: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
>      230 |         } else if (features_size == mapping_max_size && (mapping_max & 63)) {
>          |                                                      ^  ~~~~~~~~~~~~~~~~~~
>    drivers/gpu/drm/imagination/pvr_device_info.c:230:47: note: use '&' for a bitwise operation
>      230 |         } else if (features_size == mapping_max_size && (mapping_max & 63)) {
>          |                                                      ^~
>          |                                                      &
>    drivers/gpu/drm/imagination/pvr_device_info.c:230:47: note: remove constant to silence this warning
>      230 |         } else if (features_size == mapping_max_size && (mapping_max & 63)) {
>          |                                                     ~^~~~~~~~~~~~~~~~~~~~~
>    1 warning generated.
> 
> [...]

Applied to drm/drm-misc (drm-misc-next).

Thanks!
Maxime

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ