From: Dan Carpenter <dan.carpenter@oracle.com>
To: qipeng.zha@intel.com
Cc: linux-gpio@vger.kernel.org
Subject: re: gpiolib: translate pin number in GPIO ACPI callbacks
Date: Mon, 23 Mar 2015 18:55:27 +0300 [thread overview]
Message-ID: <20150323155527.GC24038@mwanda> (raw)
Hello qipeng.zha,
The patch 4de60970abf9: "gpiolib: translate pin number in GPIO ACPI
callbacks" from Mar 11, 2015, leads to the following static checker
warning:
drivers/gpio/gpiolib-acpi.c:559 acpi_gpio_adr_space_handler()
warn: unsigned 'pin' is never less than zero.
drivers/gpio/gpiolib-acpi.c
550
551 length = min(agpio->pin_table_length, (u16)(pin_index + bits));
552 for (i = pin_index; i < length; ++i) {
553 unsigned pin = agpio->pin_table[i];
^^^^^^^^^^^^^^^^^^^^^^^^^
"pin" is already assigned.
554 struct acpi_gpio_connection *conn;
555 struct gpio_desc *desc;
556 bool found;
557
558 pin = acpi_gpiochip_pin_to_gpio_offset(chip, pin);
559 if (pin < 0) {
^^^^^^^
Error checking doesn't work.
560 status = AE_BAD_PARAMETER;
561 goto out;
562 }
563
564 mutex_lock(&achip->conn_lock);
regards,
dan carpenter
reply other threads:[~2015-03-23 15:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20150323155527.GC24038@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-gpio@vger.kernel.org \
--cc=qipeng.zha@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.