Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] nvme/pci: properly print controller address
@ 2020-03-09 15:04 Max Gurtovoy
  2020-03-10 17:54 ` Christoph Hellwig
  2020-03-10 20:55 ` Keith Busch
  0 siblings, 2 replies; 3+ messages in thread
From: Max Gurtovoy @ 2020-03-09 15:04 UTC (permalink / raw)
  To: linux-nvme, sagi, hch, kbusch; +Cc: Max Gurtovoy

Align PCI address print with fabrics address that is printed with
newline character.

Before:
[root@server40 linux]# cat /sys/class/nvme/nvme2/address
0000:0b:00.0[root@server40 linux]#

After:
[root@server40 linux]# cat /sys/class/nvme/nvme2/address
0000:0b:00.0
[root@server40 linux]#

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
---
 drivers/nvme/host/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index d3f23d6..ef06b24 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2689,7 +2689,7 @@ static int nvme_pci_get_address(struct nvme_ctrl *ctrl, char *buf, int size)
 {
 	struct pci_dev *pdev = to_pci_dev(to_nvme_dev(ctrl)->dev);
 
-	return snprintf(buf, size, "%s", dev_name(&pdev->dev));
+	return snprintf(buf, size, "%s\n", dev_name(&pdev->dev));
 }
 
 static const struct nvme_ctrl_ops nvme_pci_ctrl_ops = {
-- 
1.8.3.1


_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

* Re: [PATCH 1/1] nvme/pci: properly print controller address
  2020-03-09 15:04 [PATCH 1/1] nvme/pci: properly print controller address Max Gurtovoy
@ 2020-03-10 17:54 ` Christoph Hellwig
  2020-03-10 20:55 ` Keith Busch
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2020-03-10 17:54 UTC (permalink / raw)
  To: Max Gurtovoy; +Cc: kbusch, sagi, linux-nvme, hch

On Mon, Mar 09, 2020 at 05:04:12PM +0200, Max Gurtovoy wrote:
> Align PCI address print with fabrics address that is printed with
> newline character.

Should be nvme-pci: in the subject.  Otherwie looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

* Re: [PATCH 1/1] nvme/pci: properly print controller address
  2020-03-09 15:04 [PATCH 1/1] nvme/pci: properly print controller address Max Gurtovoy
  2020-03-10 17:54 ` Christoph Hellwig
@ 2020-03-10 20:55 ` Keith Busch
  1 sibling, 0 replies; 3+ messages in thread
From: Keith Busch @ 2020-03-10 20:55 UTC (permalink / raw)
  To: Max Gurtovoy; +Cc: sagi, linux-nvme, hch

On Mon, Mar 09, 2020 at 05:04:12PM +0200, Max Gurtovoy wrote:
> Align PCI address print with fabrics address that is printed with
> newline character.
> 
> Before:
> [root@server40 linux]# cat /sys/class/nvme/nvme2/address
> 0000:0b:00.0[root@server40 linux]#
> 
> After:
> [root@server40 linux]# cat /sys/class/nvme/nvme2/address
> 0000:0b:00.0
> [root@server40 linux]#
> 
> Signed-off-by: Max Gurtovoy <maxg@mellanox.com>

Applied to 5.7 with the minor subject edit.

_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

end of thread, other threads:[~2020-03-10 20:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-09 15:04 [PATCH 1/1] nvme/pci: properly print controller address Max Gurtovoy
2020-03-10 17:54 ` Christoph Hellwig
2020-03-10 20:55 ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox