public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: guanjing <guanjing@cmss.chinamobile.com>
Cc: rogerq@kernel.org, s-anna@ti.com, nm@ti.com, p-mohan@ti.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fixup for "soc: ti: pruss: Add helper functions to set GPI mode, MII_RT_event and XFR"
Date: Fri, 8 Nov 2024 10:25:09 +0000	[thread overview]
Message-ID: <Zy3nBW3XvFy-Y1Fe@kernel.org> (raw)
In-Reply-To: <20241108055507.173622-1-guanjing@cmss.chinamobile.com>

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 */

      reply	other threads:[~2024-11-08 10:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zy3nBW3XvFy-Y1Fe@kernel.org \
    --to=horms@kernel.org \
    --cc=guanjing@cmss.chinamobile.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=p-mohan@ti.com \
    --cc=rogerq@kernel.org \
    --cc=s-anna@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox