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: <VE1PR04MB6687BE7DFB68D458E3E6106A8FA30@VE1PR04MB6687.eurprd04.prod.outlook.com>
Date:   Tue, 19 Jan 2021 18:42:23 +0000
From:   Leo Li <leoyang.li@....com>
To:     Rasmus Villemoes <rasmus.villemoes@...vas.dk>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     "David S . Miller" <davem@...emloft.net>,
        Qiang Zhao <qiang.zhao@....com>, Andrew Lunn <andrew@...n.ch>,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        Jakub Kicinski <kuba@...nel.org>,
        "jocke@...inera.com" <joakim.tjernlund@...inera.com>
Subject: RE: [PATCH net-next v2 02/17] soc: fsl: qe: make cpm_muram_offset
 take a const void* argument



> -----Original Message-----
> From: Rasmus Villemoes <rasmus.villemoes@...vas.dk>
> Sent: Tuesday, January 19, 2021 9:08 AM
> To: netdev@...r.kernel.org
> Cc: Leo Li <leoyang.li@....com>; David S . Miller <davem@...emloft.net>;
> Qiang Zhao <qiang.zhao@....com>; Andrew Lunn <andrew@...n.ch>;
> Christophe Leroy <christophe.leroy@...roup.eu>; Jakub Kicinski
> <kuba@...nel.org>; jocke@...inera.com <joakim.tjernlund@...inera.com>;
> Rasmus Villemoes <rasmus.villemoes@...vas.dk>
> Subject: [PATCH net-next v2 02/17] soc: fsl: qe: make cpm_muram_offset
> take a const void* argument
> 
> Allow passing const-qualified pointers without requiring a cast in the
> caller.

Acked-by: Li Yang <leoyang.li@....com>

> 
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@...vas.dk>
> ---
>  drivers/soc/fsl/qe/qe_common.c | 2 +-
>  include/soc/fsl/qe/qe.h        | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/soc/fsl/qe/qe_common.c
> b/drivers/soc/fsl/qe/qe_common.c
> index 75075591f630..0fbdc965c4cb 100644
> --- a/drivers/soc/fsl/qe/qe_common.c
> +++ b/drivers/soc/fsl/qe/qe_common.c
> @@ -223,7 +223,7 @@ void __iomem *cpm_muram_addr(unsigned long
> offset)
>  }
>  EXPORT_SYMBOL(cpm_muram_addr);
> 
> -unsigned long cpm_muram_offset(void __iomem *addr)
> +unsigned long cpm_muram_offset(const void __iomem *addr)
>  {
>  	return addr - (void __iomem *)muram_vbase;
>  }
> diff --git a/include/soc/fsl/qe/qe.h b/include/soc/fsl/qe/qe.h
> index 3feddfec9f87..8ee3747433c0 100644
> --- a/include/soc/fsl/qe/qe.h
> +++ b/include/soc/fsl/qe/qe.h
> @@ -102,7 +102,7 @@ s32 cpm_muram_alloc(unsigned long size, unsigned
> long align);
>  void cpm_muram_free(s32 offset);
>  s32 cpm_muram_alloc_fixed(unsigned long offset, unsigned long size);
>  void __iomem *cpm_muram_addr(unsigned long offset);
> -unsigned long cpm_muram_offset(void __iomem *addr);
> +unsigned long cpm_muram_offset(const void __iomem *addr);
>  dma_addr_t cpm_muram_dma(void __iomem *addr);
>  #else
>  static inline s32 cpm_muram_alloc(unsigned long size,
> @@ -126,7 +126,7 @@ static inline void __iomem
> *cpm_muram_addr(unsigned long offset)
>  	return NULL;
>  }
> 
> -static inline unsigned long cpm_muram_offset(void __iomem *addr)
> +static inline unsigned long cpm_muram_offset(const void __iomem *addr)
>  {
>  	return -ENOSYS;
>  }
> --
> 2.23.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ