mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
hwmon: (pmbus) Simplify the calculation of variables
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>
This commit is contained in:
parent
cbfc6c6177
commit
906ace80c2
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user