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: <dd8402e7-f8cc-4ddd-a748-e176b6b534a9@app.fastmail.com>
Date: Tue, 23 Jan 2024 09:10:36 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Peter Griffin" <peter.griffin@...aro.org>,
 "Rob Herring" <robh+dt@...nel.org>, krzysztof.kozlowski+dt@...aro.org,
 "Guenter Roeck" <linux@...ck-us.net>,
 "Wim Van Sebroeck" <wim@...ux-watchdog.org>,
 "Conor Dooley" <conor+dt@...nel.org>,
 "Alim Akhtar" <alim.akhtar@...sung.com>, jaewon02.kim@...sung.com,
 chanho61.park@...sung.com, "Sam Protsenko" <semen.protsenko@...aro.org>
Cc: kernel-team@...roid.com, "Tudor Ambarus" <tudor.ambarus@...aro.org>,
 André Draszik <andre.draszik@...aro.org>,
 saravanak@...gle.com, "William McVicker" <willmcvicker@...gle.com>,
 linux-fsd@...la.com, linux-watchdog@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH 2/9] soc: samsung: exynos-pmu: Add exynos_pmu_update/read/write
 APIs and SoC quirks

On Mon, Jan 22, 2024, at 23:57, Peter Griffin wrote:

> --- a/include/linux/soc/samsung/exynos-pmu.h
> +++ b/include/linux/soc/samsung/exynos-pmu.h
> @@ -21,11 +21,39 @@ enum sys_powerdown {
>  extern void exynos_sys_powerdown_conf(enum sys_powerdown mode);
>  #ifdef CONFIG_EXYNOS_PMU
>  extern struct regmap *exynos_get_pmu_regmap(void);
> +extern int exynos_pmu_update_bits(unsigned int offset, unsigned int 
> mask,
> +				  unsigned int val);
> +extern int exynos_pmu_update(unsigned int offset, unsigned int mask,
> +			     unsigned int val);
> +extern int exynos_pmu_write(unsigned int offset, unsigned int val);
> +extern int exynos_pmu_read(unsigned int offset, unsigned int *val);
>  #else
>  static inline struct regmap *exynos_get_pmu_regmap(void)
>  {
>  	return ERR_PTR(-ENODEV);
>  }
> +
> +static inline int exynos_pmu_update_bits(unsigned int offset, unsigned 
> int mask,
> +					 unsigned int val);
> +{
> +	return ERR_PTR(-ENODEV);
> +}
> +
> +static inline int exynos_pmu_update(unsigned int offset, unsigned int 
> mask,
> +				    unsigned int val);
> +{
> +	return ERR_PTR(-ENODEV);
> +}

This won't build since you have the wrong return type.
I would suggest you just remove the #ifdef check entirely
and instead require drivers using this to have correct
dependencies.

    Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ