Skip to contentSkip to conversation

PCI/switchtec: Correct bool variable type assignment

PATCH Applied Krzysztof Wilczynski 3 participants 3 messages May 21, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI/switchtec: Correct bool variable type assignment

Use true instead of 1 in the assignment as the variable use_dma_mrpc is of a bool type. Also, resolve the following Coccinelle warning:

drivers/pci/switch/switchtec.c:28:12-24: WARNING: Assignment of 0/1 to bool variable

---
 drivers/pci/switch/switchtec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/switch/switchtec.c +1 -1
index e69cac84b605..850cfeb74608 100644
@@ -25,7 +25,7 @@ static int max_devices = 16;
 module_param(max_devices, int, 0644);
 MODULE_PARM_DESC(max_devices, "max number of switchtec device instances");
 
-static bool use_dma_mrpc = 1;
+static bool use_dma_mrpc = true;
 module_param(use_dma_mrpc, bool, 0644);
 MODULE_PARM_DESC(use_dma_mrpc,
 		 "Enable the use of the DMA MRPC feature");
Signature · 1 line
2.26.2
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Krzysztof Wilczynski

Use true instead of 1 in the assignment as the variable use_dma_mrpc is of a bool type. Also, resolve the following Coccinelle warning:

drivers/pci/switch/switchtec.c:28:12-24: WARNING: Assignment of 0/1 to bool variable

Sure,

Quoted 18 lines
---
 drivers/pci/switch/switchtec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/switch/switchtec.c +1 -1
index e69cac84b605..850cfeb74608 100644
@@ -25,7 +25,7 @@ static int max_devices = 16;
 module_param(max_devices, int, 0644);
 MODULE_PARM_DESC(max_devices, "max number of switchtec device instances");
 
-static bool use_dma_mrpc = 1;
+static bool use_dma_mrpc = true;
 module_param(use_dma_mrpc, bool, 0644);
 MODULE_PARM_DESC(use_dma_mrpc,
 		 "Enable the use of the DMA MRPC feature");
#2 lore raw
In reply to Krzysztof Wilczynski
Quoted 7 lines · Krzysztof Wilczynski

Use true instead of 1 in the assignment as the variable use_dma_mrpc is of a bool type. Also, resolve the following Coccinelle warning:

drivers/pci/switch/switchtec.c:28:12-24: WARNING: Assignment of 0/1 to bool variable

Applied to pci/switchtec for v5.8, thanks!

Quoted 20 lines
---
 drivers/pci/switch/switchtec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/switch/switchtec.c +1 -1
index e69cac84b605..850cfeb74608 100644
@@ -25,7 +25,7 @@ static int max_devices = 16;
 module_param(max_devices, int, 0644);
 MODULE_PARM_DESC(max_devices, "max number of switchtec device instances");
 
-static bool use_dma_mrpc = 1;
+static bool use_dma_mrpc = true;
 module_param(use_dma_mrpc, bool, 0644);
 MODULE_PARM_DESC(use_dma_mrpc,
 		 "Enable the use of the DMA MRPC feature");
Signature · 1 line
2.26.2