From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Andy Shevchenko <andy@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Raag Jadav <raag.jadav@intel.com>
Subject: Re: [PATCH v1 2/2] pinctrl: cherryview: Simplify code with cleanup helpers
Date: Fri, 6 Oct 2023 13:26:41 +0300 [thread overview]
Message-ID: <20231006102641.GZ3208943@black.fi.intel.com> (raw)
In-Reply-To: <20231006094033.3082468-2-andriy.shevchenko@linux.intel.com>
On Fri, Oct 06, 2023 at 12:40:33PM +0300, Andy Shevchenko wrote:
> @@ -1119,28 +1099,26 @@ static struct pinctrl_desc chv_pinctrl_desc = {
> static int chv_gpio_get(struct gpio_chip *chip, unsigned int offset)
> {
> struct intel_pinctrl *pctrl = gpiochip_get_data(chip);
> - unsigned long flags;
> u32 ctrl0, cfg;
>
> - raw_spin_lock_irqsave(&chv_lock, flags);
> - ctrl0 = chv_readl(pctrl, offset, CHV_PADCTRL0);
> - raw_spin_unlock_irqrestore(&chv_lock, flags);
> + scoped_guard(raw_spinlock_irqsave, &chv_lock)
> + ctrl0 = chv_readl(pctrl, offset, CHV_PADCTRL0);
>
> cfg = ctrl0 & CHV_PADCTRL0_GPIOCFG_MASK;
> cfg >>= CHV_PADCTRL0_GPIOCFG_SHIFT;
>
> if (cfg == CHV_PADCTRL0_GPIOCFG_GPO)
> return !!(ctrl0 & CHV_PADCTRL0_GPIOTXSTATE);
> +
Unrelated whitespace change.
Otherwise looks good,
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
next prev parent reply other threads:[~2023-10-06 10:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-06 9:40 [PATCH v1 1/2] pinctrl: cherryview: Avoid duplicated I/O Andy Shevchenko
2023-10-06 9:40 ` [PATCH v1 2/2] pinctrl: cherryview: Simplify code with cleanup helpers Andy Shevchenko
2023-10-06 10:26 ` Mika Westerberg [this message]
2023-10-06 10:32 ` Andy Shevchenko
2023-10-06 10:37 ` Andy Shevchenko
2023-10-06 10:24 ` [PATCH v1 1/2] pinctrl: cherryview: Avoid duplicated I/O Mika Westerberg
2023-10-06 10:26 ` Andy Shevchenko
2023-10-06 10:38 ` Andy Shevchenko
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=20231006102641.GZ3208943@black.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=raag.jadav@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.