Commit 54515257 authored by Kaixu Xia's avatar Kaixu Xia Committed by Linus Walleij

pinctrl: ocelot: Remove unnecessary conversion to bool

Fix the following coccicheck warning:

./drivers/pinctrl/pinctrl-ocelot.c:732:28-33: WARNING: conversion to bool not needed here
Reported-by: default avatarTosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: default avatarKaixu Xia <kaixuxia@tencent.com>
Link: https://lore.kernel.org/r/1604651795-1220-1-git-send-email-kaixuxia@tencent.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent d0511b54
...@@ -729,7 +729,7 @@ static int ocelot_pinconf_get(struct pinctrl_dev *pctldev, ...@@ -729,7 +729,7 @@ static int ocelot_pinconf_get(struct pinctrl_dev *pctldev,
if (err) if (err)
return err; return err;
if (param == PIN_CONFIG_BIAS_DISABLE) if (param == PIN_CONFIG_BIAS_DISABLE)
val = (val == 0 ? true : false); val = (val == 0);
else if (param == PIN_CONFIG_BIAS_PULL_DOWN) else if (param == PIN_CONFIG_BIAS_PULL_DOWN)
val = (val & BIAS_PD_BIT ? true : false); val = (val & BIAS_PD_BIT ? true : false);
else /* PIN_CONFIG_BIAS_PULL_UP */ else /* PIN_CONFIG_BIAS_PULL_UP */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment