linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cxl: Fix informational message
@ 2016-09-12 10:37 Frederic Barrat
  2016-09-13  3:49 ` Andrew Donnellan
  2016-09-13 12:16 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Frederic Barrat @ 2016-09-12 10:37 UTC (permalink / raw)
  To: imunsie, mikey, linuxppc-dev

When set_sl_ops() is called, the adapter data structure is not fully
initialized yet. Therefore the device name is not showing up in the
trace. Fix is simply to get the device name from the pci_dev
structure.

Fixes: 6d382616ac22 ("cxl: Abstract the differences between the PSL and XSL")
Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
---
 drivers/misc/cxl/pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
index 6f0c4ac..cd922a8 100644
--- a/drivers/misc/cxl/pci.c
+++ b/drivers/misc/cxl/pci.c
@@ -1530,11 +1530,11 @@ static void set_sl_ops(struct cxl *adapter, struct pci_dev *dev)
 {
 	if (dev->vendor == PCI_VENDOR_ID_MELLANOX && dev->device == 0x1013) {
 		/* Mellanox CX-4 */
-		dev_info(&adapter->dev, "Device uses an XSL\n");
+		dev_info(&dev->dev, "Device uses an XSL\n");
 		adapter->native->sl_ops = &xsl_ops;
 		adapter->min_pe = 1; /* Workaround for CX-4 hardware bug */
 	} else {
-		dev_info(&adapter->dev, "Device uses a PSL\n");
+		dev_info(&dev->dev, "Device uses a PSL\n");
 		adapter->native->sl_ops = &psl_ops;
 	}
 }
-- 
2.7.4

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

* Re: [PATCH] cxl: Fix informational message
  2016-09-12 10:37 [PATCH] cxl: Fix informational message Frederic Barrat
@ 2016-09-13  3:49 ` Andrew Donnellan
  2016-09-13 12:16 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Donnellan @ 2016-09-13  3:49 UTC (permalink / raw)
  To: Frederic Barrat, imunsie, mikey, linuxppc-dev

On 12/09/16 20:37, Frederic Barrat wrote:
> When set_sl_ops() is called, the adapter data structure is not fully
> initialized yet. Therefore the device name is not showing up in the
> trace. Fix is simply to get the device name from the pci_dev
> structure.
>
> Fixes: 6d382616ac22 ("cxl: Abstract the differences between the PSL and XSL")
> Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

> ---
>  drivers/misc/cxl/pci.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
> index 6f0c4ac..cd922a8 100644
> --- a/drivers/misc/cxl/pci.c
> +++ b/drivers/misc/cxl/pci.c
> @@ -1530,11 +1530,11 @@ static void set_sl_ops(struct cxl *adapter, struct pci_dev *dev)
>  {
>  	if (dev->vendor == PCI_VENDOR_ID_MELLANOX && dev->device == 0x1013) {
>  		/* Mellanox CX-4 */
> -		dev_info(&adapter->dev, "Device uses an XSL\n");
> +		dev_info(&dev->dev, "Device uses an XSL\n");
>  		adapter->native->sl_ops = &xsl_ops;
>  		adapter->min_pe = 1; /* Workaround for CX-4 hardware bug */
>  	} else {
> -		dev_info(&adapter->dev, "Device uses a PSL\n");
> +		dev_info(&dev->dev, "Device uses a PSL\n");
>  		adapter->native->sl_ops = &psl_ops;
>  	}
>  }
>

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com  IBM Australia Limited

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

* Re: cxl: Fix informational message
  2016-09-12 10:37 [PATCH] cxl: Fix informational message Frederic Barrat
  2016-09-13  3:49 ` Andrew Donnellan
@ 2016-09-13 12:16 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2016-09-13 12:16 UTC (permalink / raw)
  To: Frederic Barrat, imunsie, mikey, linuxppc-dev

On Mon, 2016-12-09 at 10:37:43 UTC, Frederic Barrat wrote:
> When set_sl_ops() is called, the adapter data structure is not fully
> initialized yet. Therefore the device name is not showing up in the
> trace. Fix is simply to get the device name from the pci_dev
> structure.
> 
> Fixes: 6d382616ac22 ("cxl: Abstract the differences between the PSL and XSL")
> Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/b135077b83f01549c2a0685b16

cheers

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

end of thread, other threads:[~2016-09-13 12:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-12 10:37 [PATCH] cxl: Fix informational message Frederic Barrat
2016-09-13  3:49 ` Andrew Donnellan
2016-09-13 12:16 ` Michael Ellerman

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).