[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcgQcMjFe5NOpdU9Lm_rHBWWMzPFX5197uDofFrk-yn5w@mail.gmail.com>
Date: Tue, 29 Apr 2025 23:16:30 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Thomas Richard <thomas.richard@...tlin.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Bartosz Golaszewski <brgl@...ev.pl>,
Geert Uytterhoeven <geert+renesas@...der.be>, Kees Cook <kees@...nel.org>,
Andy Shevchenko <andy@...nel.org>, linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
thomas.petazzoni@...tlin.com, DanieleCleri@...on.eu, GaryWang@...on.com.tw,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH v4 08/12] gpio: aggregator: export symbols of the GPIO
forwarder library
On Tue, Apr 29, 2025 at 5:08 PM Thomas Richard
<thomas.richard@...tlin.com> wrote:
>
> Export all symbols and create header file for the GPIO forwarder library.
It will be used in the next changes.
...
> +int gpio_fwd_direction_output(struct gpio_chip *chip,
> + unsigned int offset, int value)
Is there room for offset in the previous line? (Looking at other
changes, seems to me so)
But probably you want to keep a logical split, so the current approach
is fine to me in this sense.
...
> +int gpio_fwd_set_multiple_locked(struct gpio_chip *chip,
> + unsigned long *mask, unsigned long *bits)
Ditto, and okay to have this logical split.
...
> +int gpio_fwd_set_config(struct gpio_chip *chip, unsigned int offset,
> + unsigned long config)
But this seems to be on one line, no?
...
> +struct gpiochip_fwd *
> +devm_gpio_fwd_alloc(struct device *dev, unsigned int ngpios)
Now one line?
...
> +#ifndef __LINUX_GPIO_FORWARDER_H
> +#define __LINUX_GPIO_FORWARDER_H
...
> +#include <linux/gpio/consumer.h>
> +#include <linux/gpio/driver.h>
> +#include <linux/mutex.h>
> +#include <linux/spinlock_types.h>
> +#include <linux/types.h>
Too many not used inclusions, please add them only when they are needed.
Actually it seems none of them is used, But there are absent forward
declarations:
struct device;
struct gpio_chip;
> +#endif
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists