From: David Laight <David.Laight@ACULAB.COM>
To: 'Srinivas Pandruvada' <srinivas.pandruvada@linux.intel.com>,
"rafael@kernel.org" <rafael@kernel.org>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
"amitk@kernel.org" <amitk@kernel.org>,
"rui.zhang@intel.com" <rui.zhang@intel.com>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"matthewgarrett@google.com" <matthewgarrett@google.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH] thermal: int340x: Increase bitmap size
Date: Mon, 14 Mar 2022 15:28:57 +0000 [thread overview]
Message-ID: <c23d75b4e9164094bcc488c0ba9e0d77@AcuMS.aculab.com> (raw)
In-Reply-To: <20220314145017.928550-1-srinivas.pandruvada@linux.intel.com>
From: Srinivas Pandruvada
> Sent: 14 March 2022 14:50
>
> The number of policies are 10, so can't be supported by the bitmap size
> of u8. Even though there are no platfoms with these many policies, but
> as correctness increase to u16.
You might as well just use 'unsigned int'.
May generate better code and there is still padding
in the structure.
David
>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Fixes: 16fc8eca1975 ("thermal/int340x_thermal: Add additional UUIDs")
> Cc: stable@vger.kernel.org
> ---
> drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
> b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
> index 72acb1f61849..c2d3df302214 100644
> --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
> +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
> @@ -53,7 +53,7 @@ struct int3400_thermal_priv {
> struct art *arts;
> int trt_count;
> struct trt *trts;
> - u8 uuid_bitmap;
> + u16 uuid_bitmap;
> int rel_misc_dev_res;
> int current_uuid_index;
> char *data_vault;
> --
> 2.31.1
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2022-03-14 15:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 14:50 [PATCH] thermal: int340x: Increase bitmap size Srinivas Pandruvada
2022-03-14 15:28 ` David Laight [this message]
2022-03-14 18:35 ` srinivas pandruvada
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=c23d75b4e9164094bcc488c0ba9e0d77@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthewgarrett@google.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=stable@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).