staging: iio: resolver: ad2s1210: Change type in printf format string
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Tue, 27 Jan 2015 22:22:34 +0000 (23:22 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sun, 8 Feb 2015 12:05:44 +0000 (12:05 +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>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/resolver/ad2s1210.c

index b4c14ba5fdee3dca1a2585b43e5858f03b53af5c..a8ecf87ef4a961f1c938dffc0839b25e5b5ed92b 100644 (file)
@@ -198,7 +198,7 @@ static ssize_t ad2s1210_show_fclkin(struct device *dev,
 {
        struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev));
 
-       return sprintf(buf, "%d\n", st->fclkin);
+       return sprintf(buf, "%u\n", st->fclkin);
 }
 
 static ssize_t ad2s1210_store_fclkin(struct device *dev,
@@ -237,7 +237,7 @@ static ssize_t ad2s1210_show_fexcit(struct device *dev,
 {
        struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev));
 
-       return sprintf(buf, "%d\n", st->fexcit);
+       return sprintf(buf, "%u\n", st->fexcit);
 }
 
 static ssize_t ad2s1210_store_fexcit(struct device *dev,