summaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl
diff options
context:
space:
mode:
authorYang Li <yang.lee@linux.alibaba.com>2021-01-29 09:25:05 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-04 17:02:18 +0100
commit76ec1ec8fc7c4bda24af8c3a73c5f56fa8d6e460 (patch)
tree3c862dd560570e54db55276e8145bd1f2cb6e6e4 /drivers/misc/cxl
parentcoresight: etm4x: Handle accesses to TRCSTALLCTLR (diff)
downloadlinux-76ec1ec8fc7c4bda24af8c3a73c5f56fa8d6e460.tar.xz
linux-76ec1ec8fc7c4bda24af8c3a73c5f56fa8d6e460.zip
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 <abaci@linux.alibaba.com> Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com> Acked-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/1611908705-98507-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/cxl')
-rw-r--r--drivers/misc/cxl/sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/cxl/sysfs.c b/drivers/misc/cxl/sysfs.c
index d97a243ad30c..c173a5e88c91 100644
--- a/drivers/misc/cxl/sysfs.c
+++ b/drivers/misc/cxl/sysfs.c
@@ -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;
}