staging: iio: adc: mxs-lradc: Change type in printf format string
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Tue, 27 Jan 2015 22:23:33 +0000 (23:23 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sun, 8 Feb 2015 12:07:15 +0000 (12:07 +0000)
Wrong type in printf format string, requires 'int'
but the argument type is 'unsigned int'

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/mxs-lradc.c

index d9d6fad7cb00725f43142967bad4ca6b39a32b06..d5f8ea96f4bc10c61e4b2ed202fbe3b9ca71b477 100644 (file)
@@ -1008,7 +1008,7 @@ static ssize_t mxs_lradc_show_scale_available_ch(struct device *dev,
        int i, len = 0;
 
        for (i = 0; i < ARRAY_SIZE(lradc->scale_avail[ch]); i++)
-               len += sprintf(buf + len, "%d.%09u ",
+               len += sprintf(buf + len, "%u.%09u ",
                               lradc->scale_avail[ch][i].integer,
                               lradc->scale_avail[ch][i].nano);