public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fixup for "soc: ti: pruss: Add helper functions to set GPI mode, MII_RT_event and XFR"
@ 2024-11-08  5:55 guanjing
  2024-11-08 10:25 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: guanjing @ 2024-11-08  5:55 UTC (permalink / raw)
  To: rogerq, s-anna, nm, horms, p-mohan; +Cc: linux-kernel, guanjing

Fixes: 0211cc1e4fbb ("soc: ti: pruss: Add helper functions to set GPI mode, MII_RT_event and XFR")
Signed-off-by: guanjing <guanjing@cmss.chinamobile.com>
---
 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);
 }
-- 
2.33.0




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fixup for "soc: ti: pruss: Add helper functions to set GPI mode, MII_RT_event and XFR"
  2024-11-08  5:55 [PATCH] fixup for "soc: ti: pruss: Add helper functions to set GPI mode, MII_RT_event and XFR" guanjing
@ 2024-11-08 10:25 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2024-11-08 10:25 UTC (permalink / raw)
  To: guanjing; +Cc: rogerq, s-anna, nm, p-mohan, linux-kernel

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@cmss.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 */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-08 10:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-08  5:55 [PATCH] fixup for "soc: ti: pruss: Add helper functions to set GPI mode, MII_RT_event and XFR" guanjing
2024-11-08 10:25 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox