OSDN Git Service

iio: Don't use bare "unsigned"
authorJoe Simmons-Talbott <joetalbott@gmail.com>
Fri, 24 Jun 2022 02:18:06 +0000 (22:18 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 1 Jul 2022 10:19:08 +0000 (11:19 +0100)
Use "unsigned int" rather than bare "unsigned". Reported by checkpatch.pl.

Signed-off-by: Joe Simmons-Talbott <joetalbott@gmail.com>
Link: https://lore.kernel.org/r/20220624021806.1010962-1-joetalbott@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-buffer.c
drivers/iio/industrialio-core.c
drivers/iio/industrialio-sw-device.c
drivers/iio/industrialio-sw-trigger.c

index 3d2b771..acc2b6c 100644 (file)
@@ -702,7 +702,7 @@ static unsigned int iio_storage_bytes_for_timestamp(struct iio_dev *indio_dev)
 static int iio_compute_scan_bytes(struct iio_dev *indio_dev,
                                const unsigned long *mask, bool timestamp)
 {
-       unsigned bytes = 0;
+       unsigned int bytes = 0;
        int length, i, largest = 0;
 
        /* How much space will the demuxed element take? */
@@ -931,9 +931,9 @@ static int iio_verify_update(struct iio_dev *indio_dev,
  * @l:         list head used for management
  */
 struct iio_demux_table {
-       unsigned from;
-       unsigned to;
-       unsigned length;
+       unsigned int from;
+       unsigned int to;
+       unsigned int length;
        struct list_head l;
 };
 
@@ -971,7 +971,7 @@ static int iio_buffer_update_demux(struct iio_dev *indio_dev,
                                   struct iio_buffer *buffer)
 {
        int ret, in_ind = -1, out_ind, length;
-       unsigned in_loc = 0, out_loc = 0;
+       unsigned int in_loc = 0, out_loc = 0;
        struct iio_demux_table *p = NULL;
 
        /* Clear out any old demux */
index dc3e1cb..358b909 100644 (file)
@@ -375,7 +375,7 @@ static ssize_t iio_debugfs_read_reg(struct file *file, char __user *userbuf,
 {
        struct iio_dev *indio_dev = file->private_data;
        struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
-       unsigned val = 0;
+       unsigned int val = 0;
        int ret;
 
        if (*ppos > 0)
@@ -405,7 +405,7 @@ static ssize_t iio_debugfs_write_reg(struct file *file,
 {
        struct iio_dev *indio_dev = file->private_data;
        struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
-       unsigned reg, val;
+       unsigned int reg, val;
        char buf[80];
        int ret;
 
index 49f775f..cdaf30a 100644 (file)
@@ -27,7 +27,7 @@ static DEFINE_MUTEX(iio_device_types_lock);
 
 static
 struct iio_sw_device_type *__iio_find_sw_device_type(const char *name,
-                                                    unsigned len)
+                                                    unsigned int len)
 {
        struct iio_sw_device_type *d = NULL, *iter;
 
index 9ae793a..994f03a 100644 (file)
@@ -27,7 +27,7 @@ static DEFINE_MUTEX(iio_trigger_types_lock);
 
 static
 struct iio_sw_trigger_type *__iio_find_sw_trigger_type(const char *name,
-                                                      unsigned len)
+                                                      unsigned int len)
 {
        struct iio_sw_trigger_type *t = NULL, *iter;