Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1295412

[PATCH] pinctrl-adi2: Use a signed return type for adi_gpio_irq_startup()

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH] pinctrl-adi2: Use a signed return type for adi_gpio_irq_startup()
Date 2015-12-19 18:10 +0100
Message-ID <qHtb3-60a-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 19 Dec 2015 17:55:39 +0100

The return type "unsigned int" was used by the adi_gpio_irq_startup()
function despite of the aspect that it will eventually return a negative
error code.
Improve this implementation detail by deletion of the type modifier then.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/pinctrl/pinctrl-adi2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-adi2.c b/drivers/pinctrl/pinctrl-adi2.c
index fd342df..4032004 100644
--- a/drivers/pinctrl/pinctrl-adi2.c
+++ b/drivers/pinctrl/pinctrl-adi2.c
@@ -329,7 +329,7 @@ static void adi_gpio_unmask_irq(struct irq_data *d)
 	spin_unlock_irqrestore(&port->lock, flags);
 }
 
-static unsigned int adi_gpio_irq_startup(struct irq_data *d)
+static int adi_gpio_irq_startup(struct irq_data *d)
 {
 	unsigned long flags;
 	struct gpio_port *port = irq_data_get_irq_chip_data(d);
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] pinctrl-adi2: Use a signed return type for  adi_gpio_irq_startup() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-19 18:10 +0100
  Re: [PATCH] pinctrl-adi2: Use a signed return type for  adi_gpio_irq_startup() Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-19 21:20 +0100
    Re: pinctrl-adi2: Use a signed return type for adi_gpio_irq_startup() Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-19 21:50 +0100
      Re: pinctrl-adi2: Use a signed return type for adi_gpio_irq_startup() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-19 23:30 +0100
    Re: pinctrl-adi2: Use a signed return type for adi_gpio_irq_startup() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-19 21:50 +0100
  Re: [PATCH] pinctrl-adi2: Use a signed return type for  adi_gpio_irq_startup() kbuild test robot <lkp@intel.com> - 2015-12-19 23:00 +0100

csiph-web