From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
u-boot@lists.denx.de
Cc: Simon Glass <sjg@chromium.org>, Bin Meng <bmeng.cn@gmail.com>
Subject: [PATCH v1 1/2] x86: tangier: pinmux: Move is_protected assignment closer to its user
Date: Wed, 27 Oct 2021 17:23:37 +0300 [thread overview]
Message-ID: <20211027142338.77161-1-andriy.shevchenko@linux.intel.com> (raw)
Move is_protected assignment closer to its user.
This increases readability and makes maintenance easier.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
arch/x86/cpu/tangier/pinmux.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/cpu/tangier/pinmux.c b/arch/x86/cpu/tangier/pinmux.c
index 8385167b2b6b..883860f75e28 100644
--- a/arch/x86/cpu/tangier/pinmux.c
+++ b/arch/x86/cpu/tangier/pinmux.c
@@ -162,8 +162,6 @@ static int mrfld_pinctrl_cfg_pin(ofnode pin_node)
u32 mask;
int ret;
- is_protected = ofnode_read_bool(pin_node, "protected");
-
pad_offset = ofnode_read_s32_default(pin_node, "pad-offset", -1);
if (pad_offset == -1)
return -EINVAL;
@@ -178,6 +176,7 @@ static int mrfld_pinctrl_cfg_pin(ofnode pin_node)
if (mode & ~mask)
return -ENOTSUPP;
+ is_protected = ofnode_read_bool(pin_node, "protected");
if (is_protected)
ret = mrfld_pinconfig_protected(pad_offset, mask, mode);
else
--
2.33.0
next reply other threads:[~2021-10-27 14:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 14:23 Andy Shevchenko [this message]
2021-10-27 14:23 ` [PATCH v1 2/2] x86: tangier: pinmux: Move error message to the caller Andy Shevchenko
2021-10-27 18:34 ` Simon Glass
2021-11-01 2:18 ` Bin Meng
2021-11-01 2:18 ` Bin Meng
2021-10-27 18:34 ` [PATCH v1 1/2] x86: tangier: pinmux: Move is_protected assignment closer to its user Simon Glass
2021-11-01 2:05 ` Bin Meng
2021-11-01 2:10 ` Bin Meng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211027142338.77161-1-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bmeng.cn@gmail.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox