pinctrl: pinctrl-adi2.c: Cleaning up wrong format string usage
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Thu, 26 Jun 2014 16:57:14 +0000 (18:57 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 11 Jul 2014 12:08:34 +0000 (14:08 +0200)
%d in format string used, but the type is unsigned int

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-adi2.c

index b02ee4f882c0bc9b6e9205543ddf2908772cabe9..46413e93d850ccee97b453c5bd3364892bd96999 100644 (file)
@@ -401,7 +401,7 @@ static int adi_gpio_irq_type(struct irq_data *d, unsigned int type)
 
        if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING |
                    IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) {
-               snprintf(buf, 16, "gpio-irq%d", irq);
+               snprintf(buf, 16, "gpio-irq%u", irq);
                port_setup(port, d->hwirq, true);
        } else
                goto out;