From: Yury Norov <yury.norov@gmail.com>
To: Carsten Haitzler <carsten.haitzler@arm.com>,
Liviu Dudau <liviu.dudau@arm.com>,
linux-kernel@vger.kernel.org
Cc: Yury Norov <yury.norov@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Subject: [PATCH] drm/komeda: use bitmap API to convert U32 to bitmap
Date: Mon, 28 Dec 2020 11:43:43 -0800 [thread overview]
Message-ID: <20201228194343.88880-1-yury.norov@gmail.com> (raw)
The commit be3e477effba636ad25 ("drm/komeda: Fix bit
check to import to value of proper type") fixes possible
out-of-bound issue related to find_first_bit() usage, but
does not address the endianness problem.
We can use bitmap_from_arr32() here.
Since I have no hardware, the patch is compile-testes only.
Carsten, could you please test it and consider including into
your tree?
Signed-off-by: Yury Norov <yury.norov@gmail.com>
---
drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c b/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c
index 719a79728e24..27968215e41d 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c
@@ -136,11 +136,12 @@ struct komeda_component *
komeda_pipeline_get_first_component(struct komeda_pipeline *pipe,
u32 comp_mask)
{
+ DECLARE_BITMAP(comp_mask_local, 32);
struct komeda_component *c = NULL;
- unsigned long comp_mask_local = (unsigned long)comp_mask;
int id;
- id = find_first_bit(&comp_mask_local, 32);
+ bitmap_from_arr32(comp_mask_local, &comp_mask, 32);
+ id = find_first_bit(comp_mask_local, 32);
if (id < 32)
c = komeda_pipeline_get_component(pipe, id);
--
2.25.1
next reply other threads:[~2020-12-28 23:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-28 19:43 Yury Norov [this message]
2020-12-28 19:50 ` Andy Shevchenko
2020-12-28 20:10 ` Yury Norov
2020-12-29 12:22 ` Carsten Haitzler
2020-12-29 13:50 ` Andy Shevchenko
2020-12-29 18:09 ` Yury Norov
2020-12-29 18:27 ` Yury Norov
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=20201228194343.88880-1-yury.norov@gmail.com \
--to=yury.norov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=carsten.haitzler@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=rasmus.villemoes@prevas.dk \
/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®