Linux-Crypto Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] crypto: inside-secure - Fix unused variable warning when CONFIG_PCI=n
@ 2019-09-05  6:01 Pascal van Leeuwen
  2019-09-05 13:03 ` Herbert Xu
  0 siblings, 1 reply; 5+ messages in thread
From: Pascal van Leeuwen @ 2019-09-05  6:01 UTC (permalink / raw)
  To: linux-crypto; +Cc: antoine.tenart, herbert, davem, Pascal van Leeuwen

This patch fixes an unused variable warning from the compiler when the
driver is being compiled without PCI support in the kernel.

Signed-off-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com>
---
 drivers/crypto/inside-secure/safexcel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c
index e12a2a3..0f1a9dc 100644
--- a/drivers/crypto/inside-secure/safexcel.c
+++ b/drivers/crypto/inside-secure/safexcel.c
@@ -1503,7 +1503,9 @@ void safexcel_pci_remove(struct pci_dev *pdev)
 
 static int __init safexcel_init(void)
 {
+#if IS_ENABLED(CONFIG_PCI)
 	int rc;
+#endif
 
 #if IS_ENABLED(CONFIG_OF)
 		/* Register platform driver */
-- 
1.8.3.1


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

* Re: [PATCH] crypto: inside-secure - Fix unused variable warning when CONFIG_PCI=n
  2019-09-05  6:01 [PATCH] crypto: inside-secure - Fix unused variable warning when CONFIG_PCI=n Pascal van Leeuwen
@ 2019-09-05 13:03 ` Herbert Xu
  2019-09-05 13:55   ` Pascal Van Leeuwen
  0 siblings, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2019-09-05 13:03 UTC (permalink / raw)
  To: Pascal van Leeuwen
  Cc: linux-crypto, antoine.tenart, davem, Pascal van Leeuwen

On Thu, Sep 05, 2019 at 08:01:13AM +0200, Pascal van Leeuwen wrote:
> This patch fixes an unused variable warning from the compiler when the
> driver is being compiled without PCI support in the kernel.
> 
> Signed-off-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com>
> ---
>  drivers/crypto/inside-secure/safexcel.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c
> index e12a2a3..0f1a9dc 100644
> --- a/drivers/crypto/inside-secure/safexcel.c
> +++ b/drivers/crypto/inside-secure/safexcel.c
> @@ -1503,7 +1503,9 @@ void safexcel_pci_remove(struct pci_dev *pdev)
>  
>  static int __init safexcel_init(void)
>  {
> +#if IS_ENABLED(CONFIG_PCI)
>  	int rc;
> +#endif
>  
>  #if IS_ENABLED(CONFIG_OF)
>  		/* Register platform driver */

Shouldn't you check for errors for CONFIG_OF too?

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* RE: [PATCH] crypto: inside-secure - Fix unused variable warning when CONFIG_PCI=n
  2019-09-05 13:03 ` Herbert Xu
@ 2019-09-05 13:55   ` Pascal Van Leeuwen
  2019-09-05 13:59     ` Herbert Xu
  0 siblings, 1 reply; 5+ messages in thread
From: Pascal Van Leeuwen @ 2019-09-05 13:55 UTC (permalink / raw)
  To: Herbert Xu, Pascal van Leeuwen; +Cc: linux-crypto, antoine.tenart, davem

> -----Original Message-----
> From: Herbert Xu <herbert@gondor.apana.org.au>
> Sent: Thursday, September 5, 2019 3:04 PM
> To: Pascal van Leeuwen <pascalvanl@gmail.com>
> Cc: linux-crypto@vger.kernel.org; antoine.tenart@bootlin.com; davem@davemloft.net;
> Pascal Van Leeuwen <pvanleeuwen@verimatrix.com>
> Subject: Re: [PATCH] crypto: inside-secure - Fix unused variable warning when
> CONFIG_PCI=n
> 
> On Thu, Sep 05, 2019 at 08:01:13AM +0200, Pascal van Leeuwen wrote:
> > This patch fixes an unused variable warning from the compiler when the
> > driver is being compiled without PCI support in the kernel.
> >
> > Signed-off-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com>
> > ---
> >  drivers/crypto/inside-secure/safexcel.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-
> secure/safexcel.c
> > index e12a2a3..0f1a9dc 100644
> > --- a/drivers/crypto/inside-secure/safexcel.c
> > +++ b/drivers/crypto/inside-secure/safexcel.c
> > @@ -1503,7 +1503,9 @@ void safexcel_pci_remove(struct pci_dev *pdev)
> >
> >  static int __init safexcel_init(void)
> >  {
> > +#if IS_ENABLED(CONFIG_PCI)
> >  	int rc;
> > +#endif
> >
> >  #if IS_ENABLED(CONFIG_OF)
> >  		/* Register platform driver */
> 
> Shouldn't you check for errors for CONFIG_OF too?
> 
You are correct, the platform_driver_register can also return an error 
code. So just fixing the compile warning was a bit short-sighted on my
behalf.

I'll redo that patch.

> Thanks,
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Regards,
Pascal van Leeuwen
Silicon IP Architect, Multi-Protocol Engines @ Verimatrix
www.insidesecure.com


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

* Re: [PATCH] crypto: inside-secure - Fix unused variable warning when CONFIG_PCI=n
  2019-09-05 13:55   ` Pascal Van Leeuwen
@ 2019-09-05 13:59     ` Herbert Xu
  2019-09-05 14:07       ` Pascal Van Leeuwen
  0 siblings, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2019-09-05 13:59 UTC (permalink / raw)
  To: Pascal Van Leeuwen
  Cc: Pascal van Leeuwen, linux-crypto, antoine.tenart, davem

On Thu, Sep 05, 2019 at 01:55:54PM +0000, Pascal Van Leeuwen wrote:
>
> > > index e12a2a3..0f1a9dc 100644
> > > --- a/drivers/crypto/inside-secure/safexcel.c
> > > +++ b/drivers/crypto/inside-secure/safexcel.c
> > > @@ -1503,7 +1503,9 @@ void safexcel_pci_remove(struct pci_dev *pdev)
> > >
> > >  static int __init safexcel_init(void)
> > >  {
> > > +#if IS_ENABLED(CONFIG_PCI)
> > >  	int rc;
> > > +#endif
> > >
> > >  #if IS_ENABLED(CONFIG_OF)
> > >  		/* Register platform driver */
> > 
> > Shouldn't you check for errors for CONFIG_OF too?
>
> You are correct, the platform_driver_register can also return an error 
> code. So just fixing the compile warning was a bit short-sighted on my
> behalf.
> 
> I'll redo that patch.

While you're at it, please fix the strange indentation in that
function too.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* RE: [PATCH] crypto: inside-secure - Fix unused variable warning when CONFIG_PCI=n
  2019-09-05 13:59     ` Herbert Xu
@ 2019-09-05 14:07       ` Pascal Van Leeuwen
  0 siblings, 0 replies; 5+ messages in thread
From: Pascal Van Leeuwen @ 2019-09-05 14:07 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Pascal van Leeuwen, linux-crypto, antoine.tenart, davem

> -----Original Message-----
> From: Herbert Xu <herbert@gondor.apana.org.au>
> Sent: Thursday, September 5, 2019 3:59 PM
> To: Pascal Van Leeuwen <pvanleeuwen@verimatrix.com>
> Cc: Pascal van Leeuwen <pascalvanl@gmail.com>; linux-crypto@vger.kernel.org;
> antoine.tenart@bootlin.com; davem@davemloft.net
> Subject: Re: [PATCH] crypto: inside-secure - Fix unused variable warning when
> CONFIG_PCI=n
> 
> On Thu, Sep 05, 2019 at 01:55:54PM +0000, Pascal Van Leeuwen wrote:
> >
> > > > index e12a2a3..0f1a9dc 100644
> > > > --- a/drivers/crypto/inside-secure/safexcel.c
> > > > +++ b/drivers/crypto/inside-secure/safexcel.c
> > > > @@ -1503,7 +1503,9 @@ void safexcel_pci_remove(struct pci_dev *pdev)
> > > >
> > > >  static int __init safexcel_init(void)
> > > >  {
> > > > +#if IS_ENABLED(CONFIG_PCI)
> > > >  	int rc;
> > > > +#endif
> > > >
> > > >  #if IS_ENABLED(CONFIG_OF)
> > > >  		/* Register platform driver */
> > >
> > > Shouldn't you check for errors for CONFIG_OF too?
> >
> > You are correct, the platform_driver_register can also return an error
> > code. So just fixing the compile warning was a bit short-sighted on my
> > behalf.
> >
> > I'll redo that patch.
> 
> While you're at it, please fix the strange indentation in that
> function too.
> 
Deja vu. I already did a while ago. Git rebase throwing in curve balls?
Anyway, I'll take care of it ...

> Thanks,
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Regards,
Pascal van Leeuwen
Silicon IP Architect, Multi-Protocol Engines @ Verimatrix
www.insidesecure.com

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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05  6:01 [PATCH] crypto: inside-secure - Fix unused variable warning when CONFIG_PCI=n Pascal van Leeuwen
2019-09-05 13:03 ` Herbert Xu
2019-09-05 13:55   ` Pascal Van Leeuwen
2019-09-05 13:59     ` Herbert Xu
2019-09-05 14:07       ` Pascal Van Leeuwen

Linux-Crypto Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-crypto/0 linux-crypto/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-crypto linux-crypto/ https://lore.kernel.org/linux-crypto \
		linux-crypto@vger.kernel.org linux-crypto@archiver.kernel.org
	public-inbox-index linux-crypto


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-crypto


AGPL code for this site: git clone https://public-inbox.org/ public-inbox