mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxime Ripard <mripard@kernel.org>
To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Donald Robson <donald.robson@imgtec.com>
Cc: matt.coster@imgtec.com, frank.binns@imgtec.com,
	boris.brezillon@collabora.com, maarten.lankhorst@linux.intel.com,
	tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch,
	kernel test robot <lkp@intel.com>
Subject: Re: (subset) [PATCH v2 1/5] drm/imagination: Fixed warning due to implicit cast to bool
Date: Fri, 01 Dec 2023 09:37:39 +0100	[thread overview]
Message-ID: <170141985986.3198881.16310139541433130875.b4-ty@kernel.org> (raw)
In-Reply-To: <20231130160017.259902-1-donald.robson@imgtec.com>

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


      parent reply	other threads:[~2023-12-01  8:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30 16:00 Donald Robson
2023-11-30 16:00 ` [PATCH v2 2/5] drm/imagination: Fixed missing header in pvr_fw_meta Donald Robson
2023-12-01  8:37   ` (subset) " Maxime Ripard
2023-11-30 16:00 ` [PATCH v2 3/5] drm/imagination: pvr_device_process_active_queues now static Donald Robson
2023-12-01  8:37   ` (subset) " Maxime Ripard
2023-11-30 16:00 ` [PATCH v2 4/5] drm/imagination: pvr_gpuvm_free() " Donald Robson
2023-12-01  8:37   ` (subset) " Maxime Ripard
2023-11-30 16:00 ` [PATCH v2 5/5] drm/imagination: Removed unused function to_pvr_vm_gpuva() Donald Robson
2023-12-01  8:37   ` (subset) " Maxime Ripard
2023-12-01  8:37 ` Maxime Ripard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=170141985986.3198881.16310139541433130875.b4-ty@kernel.org \
    --to=mripard@kernel.org \
    --cc=airlied@gmail.com \
    --cc=boris.brezillon@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=donald.robson@imgtec.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=frank.binns@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matt.coster@imgtec.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®