RE: [PATCHv2] 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: Friday, September 6, 2019 3:05 PM
> To: Pascal Van Leeuwen <pvanleeuwen@xxxxxxxxxxxxxx>
> Cc: Pascal van Leeuwen <pascalvanl@xxxxxxxxx>; linux-crypto@xxxxxxxxxxxxxxx;
> antoine.tenart@xxxxxxxxxxx; davem@xxxxxxxxxxxxx; Bjorn Helgaas <helgaas@xxxxxxxxxx>
> Subject: Re: [PATCHv2] crypto: inside-secure - Fix unused variable warning when
> CONFIG_PCI=n
> 
> On Fri, Sep 06, 2019 at 01:01:19PM +0000, Pascal Van Leeuwen wrote:
> >
> > I explicitly DON'T want to abort if the PCI registration fails,
> > since that may be irrelevant if the OF registration passes AND
> > the device actually happens to be Device Tree.
> > So not checking the result value is on purpose here.
> 
> Well if you want to support that you'll need to remember whether
> PCI registration succeeded or not before unregistering it in the
> exit function.
> 
Hmmm, actually I was assuming those unregister calls to be effective
nops if no matching register succeeded previously. Like free() is a 
NOP if you pass it a null pointr.

If that is not the case, then I indeed need to remember which call(s)
passed, such that I only unregister those. But since the exit()
function does not take any parameters, I don't see any way of doing
that without using some global variable ...

> Cheers,
> --
> 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