2018-08-30 22:37:24

by Igor Stoppa

[permalink] [raw]
Subject: [PATCH 19/23] pinctrl: remove unnecessary unlikely()

WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.

Signed-off-by: Igor Stoppa <[email protected]>
Cc: Andrew Jeffery <[email protected]>
Cc: Linus Walleij <[email protected]>
---
drivers/pinctrl/aspeed/pinctrl-aspeed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed.c b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
index aefe3c33dffd..eb87ab774269 100644
--- a/drivers/pinctrl/aspeed/pinctrl-aspeed.c
+++ b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
@@ -715,7 +715,7 @@ int aspeed_pin_config_set(struct pinctrl_dev *pctldev, unsigned int offset,

pmap = find_pinconf_map(param, MAP_TYPE_ARG, arg);

- if (unlikely(WARN_ON(!pmap)))
+ if (WARN_ON(!pmap))
return -EINVAL;

val = pmap->val << pconf->bit;
--
2.17.1



2018-08-31 09:37:26

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 19/23] pinctrl: remove unnecessary unlikely()

On Fri, Aug 31, 2018 at 12:35 AM Igor Stoppa <[email protected]> wrote:

> WARN_ON() already contains an unlikely(), so it's not necessary to
> wrap it into another.
>
> Signed-off-by: Igor Stoppa <[email protected]>
> Cc: Andrew Jeffery <[email protected]>
> Cc: Linus Walleij <[email protected]>

Patch applied as obviously correct.

Yours,
Linus Walleij