lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DC8RMCPRX0UZ.3RP6IGY2KJ96@kernel.org>
Date: Fri, 22 Aug 2025 09:07:32 +0200
From: "Michael Walle" <mwalle@...nel.org>
To: "Linus Walleij" <linus.walleij@...aro.org>, "Marcos Del Sol Vives"
 <marcos@...a.pet>
Cc: <linux-kernel@...r.kernel.org>, "Bartosz Golaszewski" <brgl@...ev.pl>,
 "Lee Jones" <lee@...nel.org>, "Bjorn Helgaas" <bhelgaas@...gle.com>,
 <linux-gpio@...r.kernel.org>, <linux-pci@...r.kernel.org>
Subject: Re: [PATCH v3 1/3] gpio: gpio-regmap: add flags to control some
 behaviour

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@...a.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@...nel.org>

Download attachment "signature.asc" of type "application/pgp-signature" (298 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ