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]
Message-ID: <Zy3nBW3XvFy-Y1Fe@kernel.org>
Date: Fri, 8 Nov 2024 10:25:09 +0000
From: Simon Horman <horms@...nel.org>
To: guanjing <guanjing@...s.chinamobile.com>
Cc: rogerq@...nel.org, s-anna@...com, nm@...com, p-mohan@...com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fixup for "soc: ti: pruss: Add helper functions to set
 GPI mode, MII_RT_event and XFR"

On Fri, Nov 08, 2024 at 01:55:07PM +0800, guanjing wrote:
> Fixes: 0211cc1e4fbb ("soc: ti: pruss: Add helper functions to set GPI mode, MII_RT_event and XFR")
> Signed-off-by: guanjing <guanjing@...s.chinamobile.com>

Hi,

I think the subject should describe the problem rather than how the problem
got there. Perhaps something like this:


  Subject: [PATCH] soc: ti: pruss: remove misplaced semicolon from pruss_cfg_xfr_enable

And I think it would be best if there was a patch description. The problem
is self-evident, but I think it should at least be stated. And some
information on how this problem manifests wouldn't go astray. Something
like this.

  Remove misplaced colon in inline variant of pruss_cfg_xfr_enable()
  which results in a syntax error when the code is compiled without
  CONFIG_TI_PRUSS.

  Found using ...

> ---
>  include/linux/pruss_driver.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/pruss_driver.h b/include/linux/pruss_driver.h
> index c9a31c567e85..29a76a60869c 100644
> --- a/include/linux/pruss_driver.h
> +++ b/include/linux/pruss_driver.h
> @@ -167,7 +167,7 @@ static inline int pruss_cfg_miirt_enable(struct pruss *pruss, bool enable)
>  
>  static inline int pruss_cfg_xfr_enable(struct pruss *pruss,
>  				       enum pru_type pru_type,
> -				       bool enable);
> +				       bool enable)
>  {
>  	return ERR_PTR(-EOPNOTSUPP);
>  }

FWIIW, I believe that in order for compilation (of
drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.o) to work without
CONFIG_TI_PRUSS the following is also needed. Because there is a mismatch
between the return type of these functions and the type of the values
returned.


diff --git a/include/linux/pruss_driver.h b/include/linux/pruss_driver.h
index 29a76a60869c..2e18fef1a2e1 100644
--- a/include/linux/pruss_driver.h
+++ b/include/linux/pruss_driver.h
@@ -144,32 +144,32 @@ static inline int pruss_release_mem_region(struct pruss *pruss,
 static inline int pruss_cfg_get_gpmux(struct pruss *pruss,
 				      enum pruss_pru_id pru_id, u8 *mux)
 {
-	return ERR_PTR(-EOPNOTSUPP);
+	return -EOPNOTSUPP;
 }
 
 static inline int pruss_cfg_set_gpmux(struct pruss *pruss,
 				      enum pruss_pru_id pru_id, u8 mux)
 {
-	return ERR_PTR(-EOPNOTSUPP);
+	return -EOPNOTSUPP;
 }
 
 static inline int pruss_cfg_gpimode(struct pruss *pruss,
 				    enum pruss_pru_id pru_id,
 				    enum pruss_gpi_mode mode)
 {
-	return ERR_PTR(-EOPNOTSUPP);
+	return -EOPNOTSUPP;
 }
 
 static inline int pruss_cfg_miirt_enable(struct pruss *pruss, bool enable)
 {
-	return ERR_PTR(-EOPNOTSUPP);
+	return -EOPNOTSUPP;
 }
 
 static inline int pruss_cfg_xfr_enable(struct pruss *pruss,
 				       enum pru_type pru_type,
 				       bool enable)
 {
-	return ERR_PTR(-EOPNOTSUPP);
+	return -EOPNOTSUPP;
 }
 
 #endif /* CONFIG_TI_PRUSS */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ