pinctrl: pinctrl-single.c: Cleaning up wrong format string usage
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Thu, 26 Jun 2014 16:58:46 +0000 (18:58 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 11 Jul 2014 12:08:35 +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-single.c

index efeb12ad7b195123d479578c207b494449bf9b59..95dd9cf55cb36ab2d5af88b21a437b89adba8656 100644 (file)
@@ -780,7 +780,7 @@ static int pcs_add_pin(struct pcs_device *pcs, unsigned offset,
 
        pin = &pcs->pins.pa[i];
        pn = &pcs->names[i];
-       sprintf(pn->name, "%lx.%d",
+       sprintf(pn->name, "%lx.%u",
                (unsigned long)pcs->res->start + offset, pin_pos);
        pin->name = pn->name;
        pin->number = i;