greybus: fw-management: Fix 'make check' warnings
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 16 May 2016 02:19:43 +0000 (07:49 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 17 May 2016 02:59:50 +0000 (19:59 -0700)
Fix below warnings observed with 'make check'.

~/ara/greybus/fw-management.c:438:33: warning: incorrect type in assignment (different base types)
~/ara/greybus/fw-management.c:438:33:    expected unsigned short [unsigned] [addressable] [assigned] [usertype] major
~/ara/greybus/fw-management.c:438:33:    got restricted __le16 [usertype] <noident>
~/ara/greybus/fw-management.c:439:33: warning: incorrect type in assignment (different base types)
~/ara/greybus/fw-management.c:439:33:    expected unsigned short [unsigned] [addressable] [assigned] [usertype] minor
~/ara/greybus/fw-management.c:439:33:    got restricted __le16 [usertype] <noident>

Reported-by: Greg Kroah-Hartman <gregkh@google.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/fw-management.c

index 0c73f1e..96758f4 100644 (file)
@@ -434,8 +434,8 @@ static int fw_mgmt_ioctl(struct fw_mgmt *fw_mgmt, unsigned int cmd,
                }
 
                intf_load.status = fw_mgmt->intf_fw_status;
-               intf_load.major = cpu_to_le16(fw_mgmt->intf_fw_major);
-               intf_load.minor = cpu_to_le16(fw_mgmt->intf_fw_minor);
+               intf_load.major = fw_mgmt->intf_fw_major;
+               intf_load.minor = fw_mgmt->intf_fw_minor;
 
                if (copy_to_user(buf, &intf_load, sizeof(intf_load)))
                        return -EFAULT;