From: William Breathitt Gray <vilhelm.gray@gmail.com>
To: Srinivas Neeli <srinivas.neeli@xilinx.com>
Cc: linux-gpio@vger.kernel.org, sgoud@xilinx.com,
linus.walleij@linaro.org, shubhrajyoti.datta@xilinx.com,
michal.simek@xilinx.com, linux-kernel@vger.kernel.org,
bgolaszewski@baylibre.com, git@xilinx.com, syednwaris@gmail.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V5 5/5] gpio: gpio-xilinx: Add check if width exceeds 32
Date: Sat, 30 Jan 2021 11:05:08 +0900 [thread overview]
Message-ID: <YBS+1EljcGLDq8U+@shinobu> (raw)
In-Reply-To: <1611930410-25747-6-git-send-email-srinivas.neeli@xilinx.com>
[-- Attachment #1.1: Type: text/plain, Size: 1312 bytes --]
On Fri, Jan 29, 2021 at 07:56:50PM +0530, Srinivas Neeli wrote:
> Add check to see if gpio-width property does not exceed 32.
> If it exceeds then return -EINVAL.
>
> Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
> ---
> Changes in V5:
> -None
> Changes in V4:
> -New patch.
> ---
> drivers/gpio/gpio-xilinx.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c
> index acd574779ca6..b411d3156e0b 100644
> --- a/drivers/gpio/gpio-xilinx.c
> +++ b/drivers/gpio/gpio-xilinx.c
> @@ -589,6 +589,9 @@ static int xgpio_probe(struct platform_device *pdev)
> if (of_property_read_u32(np, "xlnx,gpio-width", &chip->gpio_width[0]))
> chip->gpio_width[0] = 32;
>
> + if (chip->gpio_width[0] > 32)
> + return -EINVAL;
> +
> spin_lock_init(&chip->gpio_lock);
>
> if (of_property_read_u32(np, "xlnx,is-dual", &is_dual))
> @@ -613,6 +616,8 @@ static int xgpio_probe(struct platform_device *pdev)
> &chip->gpio_width[1]))
> chip->gpio_width[1] = 32;
>
> + if (chip->gpio_width[1] > 32)
> + return -EINVAL;
> }
>
> chip->gc.base = -1;
> --
> 2.7.4
>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-01-30 2:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-29 14:26 [PATCH V5 0/5] gpio-xilinx: Update on xilinx gpio driver Srinivas Neeli
2021-01-29 14:26 ` [PATCH V5 1/5] gpio: gpio-xilinx: Simplify with dev_err_probe() Srinivas Neeli
2021-01-29 14:26 ` [PATCH V5 2/5] gpio: gpio-xilinx: Reduce spinlock array to array Srinivas Neeli
2021-01-29 14:26 ` [PATCH V5 3/5] gpio: gpio-xilinx: Add interrupt support Srinivas Neeli
2021-01-30 0:34 ` Robert Hancock
2021-02-02 19:36 ` Linus Walleij
2021-01-29 14:26 ` [PATCH V5 4/5] gpio: gpio-xilinx: Add support for suspend and resume Srinivas Neeli
2021-02-02 19:28 ` Linus Walleij
2021-01-29 14:26 ` [PATCH V5 5/5] gpio: gpio-xilinx: Add check if width exceeds 32 Srinivas Neeli
2021-01-30 2:05 ` William Breathitt Gray [this message]
2021-02-05 10:23 ` [PATCH V5 0/5] gpio-xilinx: Update on xilinx gpio driver Bartosz Golaszewski
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=YBS+1EljcGLDq8U+@shinobu \
--to=vilhelm.gray@gmail.com \
--cc=bgolaszewski@baylibre.com \
--cc=git@xilinx.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=sgoud@xilinx.com \
--cc=shubhrajyoti.datta@xilinx.com \
--cc=srinivas.neeli@xilinx.com \
--cc=syednwaris@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox