[V5,5/9] firmware: imx: scu: use EOPNOTSUPP

Message ID 20230731090449.2845997-6-peng.fan@oss.nxp.com
State New
Headers
Series firmware: imx: scu/scu-irq: misc update |

Commit Message

Peng Fan (OSS) July 31, 2023, 9:04 a.m. UTC
  From: Peng Fan <peng.fan@nxp.com>

EOPNOTSUPP is preferred than ENOTSUPP.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 include/linux/firmware/imx/sci.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
  

Comments

Shawn Guo Aug. 7, 2023, 2:54 a.m. UTC | #1
On Mon, Jul 31, 2023 at 05:04:45PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> EOPNOTSUPP is preferred than ENOTSUPP.

Could you elaborate why?

Shawn

> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  include/linux/firmware/imx/sci.h | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/include/linux/firmware/imx/sci.h b/include/linux/firmware/imx/sci.h
> index 5cc63fe7e84d..7fa0f3b329b5 100644
> --- a/include/linux/firmware/imx/sci.h
> +++ b/include/linux/firmware/imx/sci.h
> @@ -25,27 +25,27 @@ int imx_scu_soc_init(struct device *dev);
>  #else
>  static inline int imx_scu_soc_init(struct device *dev)
>  {
> -	return -ENOTSUPP;
> +	return -EOPNOTSUPP;
>  }
>  
>  static inline int imx_scu_enable_general_irq_channel(struct device *dev)
>  {
> -	return -ENOTSUPP;
> +	return -EOPNOTSUPP;
>  }
>  
>  static inline int imx_scu_irq_register_notifier(struct notifier_block *nb)
>  {
> -	return -ENOTSUPP;
> +	return -EOPNOTSUPP;
>  }
>  
>  static inline int imx_scu_irq_unregister_notifier(struct notifier_block *nb)
>  {
> -	return -ENOTSUPP;
> +	return -EOPNOTSUPP;
>  }
>  
>  static inline int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable)
>  {
> -	return -ENOTSUPP;
> +	return -EOPNOTSUPP;
>  }
>  #endif
>  #endif /* _SC_SCI_H */
> -- 
> 2.37.1
>
  
Peng Fan Aug. 7, 2023, 2:57 a.m. UTC | #2
Hi Shawn,

> Subject: Re: [PATCH V5 5/9] firmware: imx: scu: use EOPNOTSUPP
> 
> On Mon, Jul 31, 2023 at 05:04:45PM +0800, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > EOPNOTSUPP is preferred than ENOTSUPP.
> 
> Could you elaborate why?

From checkpatch.pl:
"ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP"
I could add this in commit message if you prefer.

Thanks,
Peng.

> 
> Shawn
> 
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >  include/linux/firmware/imx/sci.h | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/include/linux/firmware/imx/sci.h
> > b/include/linux/firmware/imx/sci.h
> > index 5cc63fe7e84d..7fa0f3b329b5 100644
> > --- a/include/linux/firmware/imx/sci.h
> > +++ b/include/linux/firmware/imx/sci.h
> > @@ -25,27 +25,27 @@ int imx_scu_soc_init(struct device *dev);  #else
> > static inline int imx_scu_soc_init(struct device *dev)  {
> > -	return -ENOTSUPP;
> > +	return -EOPNOTSUPP;
> >  }
> >
> >  static inline int imx_scu_enable_general_irq_channel(struct device
> > *dev)  {
> > -	return -ENOTSUPP;
> > +	return -EOPNOTSUPP;
> >  }
> >
> >  static inline int imx_scu_irq_register_notifier(struct notifier_block
> > *nb)  {
> > -	return -ENOTSUPP;
> > +	return -EOPNOTSUPP;
> >  }
> >
> >  static inline int imx_scu_irq_unregister_notifier(struct
> > notifier_block *nb)  {
> > -	return -ENOTSUPP;
> > +	return -EOPNOTSUPP;
> >  }
> >
> >  static inline int imx_scu_irq_group_enable(u8 group, u32 mask, u8
> > enable)  {
> > -	return -ENOTSUPP;
> > +	return -EOPNOTSUPP;
> >  }
> >  #endif
> >  #endif /* _SC_SCI_H */
> > --
> > 2.37.1
> >
  
Shawn Guo Aug. 7, 2023, 3:14 a.m. UTC | #3
On Mon, Aug 07, 2023 at 02:57:17AM +0000, Peng Fan wrote:
> Hi Shawn,
> 
> > Subject: Re: [PATCH V5 5/9] firmware: imx: scu: use EOPNOTSUPP
> > 
> > On Mon, Jul 31, 2023 at 05:04:45PM +0800, Peng Fan (OSS) wrote:
> > > From: Peng Fan <peng.fan@nxp.com>
> > >
> > > EOPNOTSUPP is preferred than ENOTSUPP.
> > 
> > Could you elaborate why?
> 
> From checkpatch.pl:
> "ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP"
> I could add this in commit message if you prefer.

Yes, please.

Shawn
  

Patch

diff --git a/include/linux/firmware/imx/sci.h b/include/linux/firmware/imx/sci.h
index 5cc63fe7e84d..7fa0f3b329b5 100644
--- a/include/linux/firmware/imx/sci.h
+++ b/include/linux/firmware/imx/sci.h
@@ -25,27 +25,27 @@  int imx_scu_soc_init(struct device *dev);
 #else
 static inline int imx_scu_soc_init(struct device *dev)
 {
-	return -ENOTSUPP;
+	return -EOPNOTSUPP;
 }
 
 static inline int imx_scu_enable_general_irq_channel(struct device *dev)
 {
-	return -ENOTSUPP;
+	return -EOPNOTSUPP;
 }
 
 static inline int imx_scu_irq_register_notifier(struct notifier_block *nb)
 {
-	return -ENOTSUPP;
+	return -EOPNOTSUPP;
 }
 
 static inline int imx_scu_irq_unregister_notifier(struct notifier_block *nb)
 {
-	return -ENOTSUPP;
+	return -EOPNOTSUPP;
 }
 
 static inline int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable)
 {
-	return -ENOTSUPP;
+	return -EOPNOTSUPP;
 }
 #endif
 #endif /* _SC_SCI_H */