linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: block: save return value of pci_find_capability() in u8
@ 2020-12-06 19:43 Puranjay Mohan
  2020-12-06 23:08 ` Chaitanya Kulkarni
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Puranjay Mohan @ 2020-12-06 19:43 UTC (permalink / raw)
  To: Damien.LeMoal, linux-block, bjorn, linux-pci; +Cc: Puranjay Mohan

Callers of pci_find_capability should save the return value in u8.
change type of variables from int to u8 to match the specification.

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
---
 drivers/block/mtip32xx/mtip32xx.c | 2 +-
 drivers/block/skd_main.c          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 153e2cdecb4d..da57d37c6d20 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -3936,7 +3936,7 @@ static DEFINE_HANDLER(7);
 
 static void mtip_disable_link_opts(struct driver_data *dd, struct pci_dev *pdev)
 {
-	int pos;
+	u8 pos;
 	unsigned short pcie_dev_ctrl;
 
 	pos = pci_find_capability(pdev, PCI_CAP_ID_EXP);
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index a962b4551bed..16d59569129b 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -3136,7 +3136,7 @@ MODULE_DEVICE_TABLE(pci, skd_pci_tbl);
 
 static char *skd_pci_info(struct skd_device *skdev, char *str)
 {
-	int pcie_reg;
+	u8 pcie_reg;
 
 	strcpy(str, "PCIe (");
 	pcie_reg = pci_find_capability(skdev->pdev, PCI_CAP_ID_EXP);
-- 
2.27.0


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

end of thread, other threads:[~2020-12-07 18:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-06 19:43 [PATCH] drivers: block: save return value of pci_find_capability() in u8 Puranjay Mohan
2020-12-06 23:08 ` Chaitanya Kulkarni
2020-12-07  1:26   ` Bjorn Helgaas
2020-12-07  1:30     ` Damien Le Moal
2020-12-07 18:38       ` Jens Axboe
2020-12-07  1:48     ` Chaitanya Kulkarni
2020-12-07 16:17     ` Ben Dooks
2020-12-07  2:25 ` Damien Le Moal
2020-12-07 14:52 ` Christoph Hellwig
2020-12-07 16:04   ` Bjorn Helgaas
2020-12-07 17:53   ` Puranjay Mohan
2020-12-07 18:07     ` Keith Busch
2020-12-07 18:35       ` Puranjay Mohan

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