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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 17 Oct 2022 16:04:56 +0800
From:   Peng Fan <peng.fan@....nxp.com>
To:     Marcus Folkesson <marcus.folkesson@...il.com>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amitk@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Anson Huang <Anson.Huang@....com>
Cc:     linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] thermal: imx8mm_thermal: use GENMASK() when appropriate



On 10/14/2022 4:16 PM, Marcus Folkesson wrote:
> GENMASK() is preferred to use for bitmasks.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@...il.com>
> ---
>   drivers/thermal/imx8mm_thermal.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c
> index c5cd873c6e01..74fc34b88bb0 100644
> --- a/drivers/thermal/imx8mm_thermal.c
> +++ b/drivers/thermal/imx8mm_thermal.c
> @@ -23,8 +23,8 @@
>   
>   #define TER_ADC_PD		BIT(30)
>   #define TER_EN			BIT(31)
> -#define TRITSR_TEMP0_VAL_MASK	0xff
> -#define TRITSR_TEMP1_VAL_MASK	0xff0000
> +#define TRITSR_TEMP0_VAL_MASK	GENMASK(7, 0)
> +#define TRITSR_TEMP1_VAL_MASK	GENMASK(23, 16)
>   
>   #define PROBE_SEL_ALL		GENMASK(31, 30)
>   
Reviewed-by: Peng Fan <peng.fan@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ