linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: cavium/nitrox: add an error message to explain the failure of pci_request_mem_regions
@ 2020-08-21  3:12 George Acosta
  2020-08-28  7:19 ` Herbert Xu
  0 siblings, 1 reply; 4+ messages in thread
From: George Acosta @ 2020-08-21  3:12 UTC (permalink / raw)
  To: acostag.ubuntu
  Cc: Herbert Xu, David S. Miller, Christophe JAILLET,
	Gustavo A. R. Silva, Phani Kiran Hemadri, linux-crypto,
	linux-kernel

Provide an error message for users when pci_request_mem_regions failed.

Signed-off-by: George Acosta <acostag.ubuntu@gmail.com>
---
 drivers/crypto/cavium/nitrox/nitrox_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/cavium/nitrox/nitrox_main.c b/drivers/crypto/cavium/nitrox/nitrox_main.c
index cee2a2713038..9d14be97e381 100644
--- a/drivers/crypto/cavium/nitrox/nitrox_main.c
+++ b/drivers/crypto/cavium/nitrox/nitrox_main.c
@@ -451,6 +451,7 @@ static int nitrox_probe(struct pci_dev *pdev,
 	err = pci_request_mem_regions(pdev, nitrox_driver_name);
 	if (err) {
 		pci_disable_device(pdev);
+		dev_err(&pdev->dev, "Failed to request mem regions!\n");
 		return err;
 	}
 	pci_set_master(pdev);
-- 
2.17.1


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

* Re: [PATCH] crypto: cavium/nitrox: add an error message to explain the failure of pci_request_mem_regions
  2020-08-21  3:12 [PATCH] crypto: cavium/nitrox: add an error message to explain the failure of pci_request_mem_regions George Acosta
@ 2020-08-28  7:19 ` Herbert Xu
  2020-08-29  1:53   ` George Acosta
  0 siblings, 1 reply; 4+ messages in thread
From: Herbert Xu @ 2020-08-28  7:19 UTC (permalink / raw)
  To: George Acosta
  Cc: David S. Miller, Christophe JAILLET, Gustavo A. R. Silva,
	Phani Kiran Hemadri, linux-crypto, linux-kernel

On Thu, Aug 20, 2020 at 10:12:08PM -0500, George Acosta wrote:
> Provide an error message for users when pci_request_mem_regions failed.
> 
> Signed-off-by: George Acosta <acostag.ubuntu@gmail.com>
> ---
>  drivers/crypto/cavium/nitrox/nitrox_main.c | 1 +
>  1 file changed, 1 insertion(+)

Patch applied.  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] 4+ messages in thread

* Re: [PATCH] crypto: cavium/nitrox: add an error message to explain the failure of pci_request_mem_regions
  2020-08-28  7:19 ` Herbert Xu
@ 2020-08-29  1:53   ` George Acosta
  2020-08-29 12:04     ` Herbert Xu
  0 siblings, 1 reply; 4+ messages in thread
From: George Acosta @ 2020-08-29  1:53 UTC (permalink / raw)
  To: Herbert Xu
  Cc: David S. Miller, Christophe JAILLET, Gustavo A. R. Silva,
	Phani Kiran Hemadri, linux-crypto, linux-kernel

Hi Herbert,
I just noticed a small potential issue about the calling sequence of
pci_disable_device and dev_err.
Do you think it will be better to call dev_err before we call
pci_disable_device(pdev) , or the order here does not matter?

On Fri, Aug 28, 2020 at 2:19 AM Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Thu, Aug 20, 2020 at 10:12:08PM -0500, George Acosta wrote:
> > Provide an error message for users when pci_request_mem_regions failed.
> >
> > Signed-off-by: George Acosta <acostag.ubuntu@gmail.com>
> > ---
> >  drivers/crypto/cavium/nitrox/nitrox_main.c | 1 +
> >  1 file changed, 1 insertion(+)
>
> Patch applied.  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


Thanks,
George

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

* Re: [PATCH] crypto: cavium/nitrox: add an error message to explain the failure of pci_request_mem_regions
  2020-08-29  1:53   ` George Acosta
@ 2020-08-29 12:04     ` Herbert Xu
  0 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2020-08-29 12:04 UTC (permalink / raw)
  To: George Acosta
  Cc: David S. Miller, Christophe JAILLET, Gustavo A. R. Silva,
	Phani Kiran Hemadri, linux-crypto, linux-kernel

On Fri, Aug 28, 2020 at 08:53:36PM -0500, George Acosta wrote:
> Hi Herbert,
> I just noticed a small potential issue about the calling sequence of
> pci_disable_device and dev_err.
> Do you think it will be better to call dev_err before we call
> pci_disable_device(pdev) , or the order here does not matter?

I don't think it matters.

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] 4+ messages in thread

end of thread, other threads:[~2020-08-29 12:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-21  3:12 [PATCH] crypto: cavium/nitrox: add an error message to explain the failure of pci_request_mem_regions George Acosta
2020-08-28  7:19 ` Herbert Xu
2020-08-29  1:53   ` George Acosta
2020-08-29 12:04     ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).