All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Walle" <mwalle@kernel.org>
To: "Linus Walleij" <linus.walleij@linaro.org>,
	"Marcos Del Sol Vives" <marcos@orca.pet>
Cc: <linux-kernel@vger.kernel.org>,
	"Bartosz Golaszewski" <brgl@bgdev.pl>,
	"Lee Jones" <lee@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	<linux-gpio@vger.kernel.org>, <linux-pci@vger.kernel.org>
Subject: Re: [PATCH v3 1/3] gpio: gpio-regmap: add flags to control some behaviour
Date: Fri, 22 Aug 2025 09:07:32 +0200	[thread overview]
Message-ID: <DC8RMCPRX0UZ.3RP6IGY2KJ96@kernel.org> (raw)
In-Reply-To: <CACRpkdb7PZTx8WPQP8Jrj_sR8X2ejK3OgA+9v2PUaOcTM4NnrQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]

Hi,

On Thu Aug 21, 2025 at 6:40 PM CEST, Linus Walleij wrote:
> On Thu, Aug 21, 2025 at 12:19 PM Marcos Del Sol Vives <marcos@orca.pet> wrote:
>
> >  static int gpio_regmap_direction_output(struct gpio_chip *chip,
> >                                         unsigned int offset, int value)
> >  {
> > -       gpio_regmap_set(chip, offset, value);
> > +       struct gpio_regmap *gpio = gpiochip_get_data(chip);
> > +       int ret;
> > +
> > +       if (gpio->flags & GPIO_REGMAP_DIR_BEFORE_SET) {
> > +               ret = gpio_regmap_set_direction(chip, offset, true);
> > +               if (ret)
> > +                       return ret;
> > +
> > +               return gpio_regmap_set(chip, offset, value);
> > +       }
> > +
> > +       ret = gpio_regmap_set(chip, offset, value);
> > +       if (ret)
> > +               return ret;

Could you add a short paragraph to the commit message that you've
added error checking? Something like:

  While at it, add the missing error check in
  gpio_regmap_direction_output().

> >
> >         return gpio_regmap_set_direction(chip, offset, true);
>
> I guess this looks like this because it is just copied from
> gpio-mmio.c:

Yeah probably :)

With that above fixed:

Reviewed-by: Michael Walle <mwalle@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]

  reply	other threads:[~2025-08-22  7:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-21 10:18 [PATCH v3 0/3] Introduce support for Vortex GPIO pins Marcos Del Sol Vives
2025-08-21 10:18 ` [PATCH v3 1/3] gpio: gpio-regmap: add flags to control some behaviour Marcos Del Sol Vives
2025-08-21 14:32   ` Bjorn Helgaas
2025-08-21 17:14     ` Marcos Del Sol Vives
2025-08-21 16:40   ` Linus Walleij
2025-08-22  7:07     ` Michael Walle [this message]
2025-08-22 11:04       ` Marcos Del Sol Vives
2025-08-22  3:27   ` kernel test robot
2025-08-22 11:11     ` Marcos Del Sol Vives
2025-08-21 10:18 ` [PATCH v3 2/3] gpio: vortex: add new GPIO device driver Marcos Del Sol Vives
2025-08-21 16:48   ` Linus Walleij
2025-08-21 17:05   ` Marcos Del Sol Vives
2025-08-22 15:47     ` Bjorn Helgaas
2025-08-22 15:49       ` Bjorn Helgaas
2025-08-22 16:08         ` Marcos Del Sol Vives
2025-08-21 10:18 ` [PATCH v3 3/3] mfd: vortex: implement new driver for Vortex southbridges Marcos Del Sol Vives

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=DC8RMCPRX0UZ.3RP6IGY2KJ96@kernel.org \
    --to=mwalle@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=brgl@bgdev.pl \
    --cc=lee@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=marcos@orca.pet \
    /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.