cxl: Simplify bool conversion
Quoted 7 lines · Yang Li
Fix the following coccicheck warning:
./drivers/misc/cxl/sysfs.c:181:48-53: WARNING: conversion to bool not needed hereReported-by Abaci Robot <[email protected]>Signed-off-by Yang Li <[email protected]>---
Thanks!
Acked-by Frederic Barrat <[email protected]>
Quoted 17 lines
drivers/misc/cxl/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/misc/cxl/sysfs.c +1
-1@@ -178,7 +178,7 @@ static ssize_t perst_reloads_same_image_store(struct device *device,if ((rc !=1 ) || !(val ==1 || val ==0 ))return -EINVAL ; - adapter->perst_same_image = (val ==1 ? true : false); + adapter->perst_same_image = (val ==1 );return count; }
PATCH 1/1 cxl: Simplify bool conversion
Fix the following coccicheck warning:
./drivers/misc/cxl/sysfs.c:181:48-53: WARNING: conversion to bool not needed here
Reported-by Abaci Robot <[email protected]>
Signed-off-by Yang Li <[email protected]>
--- drivers/misc/cxl/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/cxl/sysfs.c +1 -1
@@ -178,7 +178,7 @@ static ssize_t perst_reloads_same_image_store(struct device *device,if ((rc !=1 ) || !(val ==1 || val ==0 ))return -EINVAL ; - adapter->perst_same_image = (val ==1 ? true : false); + adapter->perst_same_image = (val ==1 );return count; }
Signature · 1 line
1.8.3.1
Quoted 6 lines · Yang Li
Fix the following coccicheck warning:
./drivers/misc/cxl/sysfs.c:181:48-53: WARNING: conversion to bool not needed hereReported-by Abaci Robot <[email protected]>Signed-off-by Yang Li <[email protected]>
Reviewed-by Andrew Donnellan <[email protected]>
Thanks!
Quoted 18 lines
--- drivers/misc/cxl/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/misc/cxl/sysfs.c +1
-1@@ -178,7 +178,7 @@ static ssize_t perst_reloads_same_image_store(struct device *device,if ((rc !=1 ) || !(val ==1 || val ==0 ))return -EINVAL ; - adapter->perst_same_image = (val ==1 ? true : false); + adapter->perst_same_image = (val ==1 );return count; }
Signature · 2 lines
Andrew Donnellan OzLabs, ADL Canberra [email protected] IBM Australia Limited