RE: [PATCH] crypto: inside-secure - Fix unused variable warning when CONFIG_PCI=n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Sent: Thursday, September 5, 2019 3:04 PM
> To: Pascal van Leeuwen <pascalvanl@xxxxxxxxx>
> Cc: linux-crypto@xxxxxxxxxxxxxxx; antoine.tenart@xxxxxxxxxxx; davem@xxxxxxxxxxxxx;
> Pascal Van Leeuwen <pvanleeuwen@xxxxxxxxxxxxxx>
> 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@xxxxxxxxxxxxxx>
> > ---
> >  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@xxxxxxxxxxxxxxxxxxx>
> 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





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux