[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMpxmJUgewcoK7YDi0MPNhmxefgeTaeaAQ19ey61740KDJz_KQ@mail.gmail.com>
Date: Wed, 13 Oct 2021 16:20:15 +0200
From: Bartosz Golaszewski <bgolaszewski@...libre.com>
To: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-gpio <linux-gpio@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: aggregator: Wrap access to gpiochip_fwd.tmp[]
On Mon, Oct 4, 2021 at 2:45 PM Geert Uytterhoeven
<geert+renesas@...der.be> wrote:
>
> The tmp[] member of the gpiochip_fwd structure is used to store both the
> temporary values bitmap and the desc pointers for operations on multiple
> GPIOs. As both are arrays with sizes unknown at compile-time, accessing
> them requires offset calculations, which are currently duplicated in
> gpio_fwd_get_multiple() and gpio_fwd_set_multiple().
>
> Introduce (a) accessors for both arrays and (b) a macro to calculate the
> needed storage size. This confines the layout of the tmp[] member into
> a single spot, to ease maintenance.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
> ---
Applied, thanks!
Bart
Powered by blists - more mailing lists