[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180902132154.aishrx5shpvjrm2x@wunner.de>
Date: Sun, 2 Sep 2018 15:21:54 +0200
From: Lukas Wunner <lukas@...ner.de>
To: Janusz Krzysztofik <jmkrzyszt@...il.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Jonathan Corbet <corbet@....net>,
Miguel Ojeda Sandonis <miguel.ojeda.sandonis@...il.com>,
Peter Korsgaard <peter.korsgaard@...co.com>,
Peter Rosin <peda@...ntia.se>,
Ulf Hansson <ulf.hansson@...aro.org>,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Dominik Brodowski <linux@...inikbrodowski.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kishon Vijay Abraham I <kishon@...com>,
Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>,
Hartmut Knaack <knaack.h@....de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
Jiri Slaby <jslaby@...e.com>, Willy Tarreau <w@....eu>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
linux-doc@...r.kernel.org, linux-i2c@...r.kernel.org,
linux-mmc@...r.kernel.org, netdev@...r.kernel.org,
linux-iio@...r.kernel.org, devel@...verdev.osuosl.org,
linux-serial@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org,
Sebastien Bourdelin <sebastien.bourdelin@...oirfairelinux.com>,
Rojhalat Ibrahim <imr@...chenk.de>,
Russell King <rmk+kernel@...linux.org.uk>,
Tony Lindgren <tony@...mide.com>,
Yegor Yefremov <yegorslists@...glemail.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
Subject: Re: [PATCH v7 1/4] gpiolib: Pass bitmaps, not integer arrays, to
get/set array
On Sun, Sep 02, 2018 at 02:01:41PM +0200, Janusz Krzysztofik wrote:
> @@ -461,7 +461,7 @@ static long linehandle_ioctl(struct file *filep, unsigned int cmd,
>
> /* Clamp all values to [0,1] */
> for (i = 0; i < lh->numdescs; i++)
> - vals[i] = !!ghd.values[i];
> + __assign_bit(i, vals, !!ghd.values[i]);
The "!!" becomes unnecessary and can be removed, same for the code
comment above.
> /**
> * gpiod_get_array_value() - read values from an array of GPIOs
> - * @array_size: number of elements in the descriptor / value arrays
> + * @array_size: number of elements in the descriptor array / value bitmap
> * @desc_array: array of GPIO descriptors whose values will be read
> - * @value_array: array to store the read values
> + * @value_bitnap: bitmap to store the read values
Typo, s/bitnap/bitmap/
Otherwise LGTM.
Powered by blists - more mailing lists