[PATCH 1/5] misc: pci_endpoint_test: Remove unnecessary WARN_ON

Manivannan Sadhasivam posted 5 patches 3 years, 7 months ago
There is a newer version of this series
[PATCH 1/5] misc: pci_endpoint_test: Remove unnecessary WARN_ON
Posted by Manivannan Sadhasivam 3 years, 7 months ago
If unable to map test_reg_bar, then probe will fail with a dedicated
error message. So there is no real need of WARN_ON here.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 drivers/misc/pci_endpoint_test.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c
index 8f786a225dcf..db0458039d7d 100644
--- a/drivers/misc/pci_endpoint_test.c
+++ b/drivers/misc/pci_endpoint_test.c
@@ -820,10 +820,8 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev,
 	for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) {
 		if (pci_resource_flags(pdev, bar) & IORESOURCE_MEM) {
 			base = pci_ioremap_bar(pdev, bar);
-			if (!base) {
+			if (!base)
 				dev_err(dev, "Failed to read BAR%d\n", bar);
-				WARN_ON(bar == test_reg_bar);
-			}
 			test->bar[bar] = base;
 		}
 	}
-- 
2.25.1
Re: [PATCH 1/5] misc: pci_endpoint_test: Remove unnecessary WARN_ON
Posted by Greg KH 3 years, 7 months ago
On Fri, Aug 19, 2022 at 08:20:14PM +0530, Manivannan Sadhasivam wrote:
> If unable to map test_reg_bar, then probe will fail with a dedicated
> error message. So there is no real need of WARN_ON here.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
>  drivers/misc/pci_endpoint_test.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Should this go to stable kernels?

thanks,

greg k-h
Re: [PATCH 1/5] misc: pci_endpoint_test: Remove unnecessary WARN_ON
Posted by Manivannan Sadhasivam 3 years, 7 months ago
On Fri, Aug 19, 2022 at 05:27:02PM +0200, Greg KH wrote:
> On Fri, Aug 19, 2022 at 08:20:14PM +0530, Manivannan Sadhasivam wrote:
> > If unable to map test_reg_bar, then probe will fail with a dedicated
> > error message. So there is no real need of WARN_ON here.
> > 
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> >  drivers/misc/pci_endpoint_test.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> Should this go to stable kernels?
> 

This is not a bug fix but a removal of unnecessary stacktrace, so I'm not sure
if this needs to be backported.

Thanks,
Mani

> thanks,
> 
> greg k-h

-- 
மணிவண்ணன் சதாசிவம்