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] [thread-next>] [day] [month] [year] [list]
Message-ID: <c95cb60e-187f-528f-41e8-4f5989e15198@csgroup.eu>
Date:   Wed, 9 Aug 2023 14:47:22 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Herve Codina <herve.codina@...tlin.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, Andrew Lunn <andrew@...n.ch>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>, Lee Jones <lee@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Qiang Zhao <qiang.zhao@....com>, Li Yang <leoyang.li@....com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Shengjiu Wang <shengjiu.wang@...il.com>,
        Xiubo Li <Xiubo.Lee@...il.com>,
        Fabio Estevam <festevam@...il.com>,
        Nicolin Chen <nicoleotsuka@...il.com>,
        Randy Dunlap <rdunlap@...radead.org>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v3 05/28] soc: fsl: cpm1: qmc: Remove inline function
 specifiers



Le 09/08/2023 à 15:27, Herve Codina a écrit :
> The inline function specifier is present on some functions but it is
> better to let the compiler decide inlining or not these functions.

And anyway the compiler can decide to not inline a function marked 
inline since commit ac7c3e4ff401 ("compiler: enable 
CONFIG_OPTIMIZE_INLINING forcibly") followed by commit 889b3c1245de 
("compiler: remove CONFIG_OPTIMIZE_INLINING entirely").

So unless you mark it __always_inline you have no guarranty that the 
compiler does what you tell it to do.

> 
> Remove inline specifiers.
> 
> Fixes: 3178d58e0b97 ("soc: fsl: cpm1: Add support for QMC")
> Signed-off-by: Herve Codina <herve.codina@...tlin.com>
> Suggested-by: Andrew Lunn <andrew@...n.ch>

Reviewed-by: Christophe Leroy <christophe.leroy@...roup.eu>

> ---
>   drivers/soc/fsl/qe/qmc.c | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c
> index 2d2a9d88ba6c..459e0bbd723d 100644
> --- a/drivers/soc/fsl/qe/qmc.c
> +++ b/drivers/soc/fsl/qe/qmc.c
> @@ -218,37 +218,37 @@ struct qmc {
>   	struct qmc_chan *chans[64];
>   };
>   
> -static inline void qmc_write16(void __iomem *addr, u16 val)
> +static void qmc_write16(void __iomem *addr, u16 val)
>   {
>   	iowrite16be(val, addr);
>   }
>   
> -static inline u16 qmc_read16(void __iomem *addr)
> +static u16 qmc_read16(void __iomem *addr)
>   {
>   	return ioread16be(addr);
>   }
>   
> -static inline void qmc_setbits16(void __iomem *addr, u16 set)
> +static void qmc_setbits16(void __iomem *addr, u16 set)
>   {
>   	qmc_write16(addr, qmc_read16(addr) | set);
>   }
>   
> -static inline void qmc_clrbits16(void __iomem *addr, u16 clr)
> +static void qmc_clrbits16(void __iomem *addr, u16 clr)
>   {
>   	qmc_write16(addr, qmc_read16(addr) & ~clr);
>   }
>   
> -static inline void qmc_write32(void __iomem *addr, u32 val)
> +static void qmc_write32(void __iomem *addr, u32 val)
>   {
>   	iowrite32be(val, addr);
>   }
>   
> -static inline u32 qmc_read32(void __iomem *addr)
> +static u32 qmc_read32(void __iomem *addr)
>   {
>   	return ioread32be(addr);
>   }
>   
> -static inline void qmc_setbits32(void __iomem *addr, u32 set)
> +static void qmc_setbits32(void __iomem *addr, u32 set)
>   {
>   	qmc_write32(addr, qmc_read32(addr) | set);
>   }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ