projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cbfc6c6
)
hwmon: (pmbus) Simplify the calculation of variables
author
Jiapeng Zhong
<abaci-bugfix@linux.alibaba.com>
Tue, 26 Jan 2021 06:21:40 +0000
(14:21 +0800)
committer
Guenter Roeck
<linux@roeck-us.net>
Thu, 28 Jan 2021 01:55:46 +0000
(17:55 -0800)
Fix the following coccicheck warnings:
./drivers/hwmon/pmbus/pmbus_core.c:1265:24-26: WARNING !A || A && B is
equivalent to !A || B.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Link:
https://lore.kernel.org/r/1611642100-29937-1-git-send-email-abaci-bugfix@linux.alibaba.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/pmbus_core.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/pmbus/pmbus_core.c
b/drivers/hwmon/pmbus/pmbus_core.c
index 906c9fec9cce1cdcf1d04db8d6ff76d348566a3d..1cf7d9e9d0894df742e3d0838a45b43e0a1917ef 100644
(file)
--- a/
drivers/hwmon/pmbus/pmbus_core.c
+++ b/
drivers/hwmon/pmbus/pmbus_core.c
@@
-1262,7
+1262,7
@@
static int pmbus_add_sensor_attrs_one(struct i2c_client *client,
* which global bit is set) for this page is accessible.
*/
if (!ret && attr->gbit &&
- (!upper ||
(upper && data->has_status_word)
) &&
+ (!upper ||
data->has_status_word
) &&
pmbus_check_status_register(client, page)) {
ret = pmbus_add_boolean(data, name, "alarm", index,
NULL, NULL,