]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
staging: unisys: visorbus: fix sloppy unsigned/signed int conversions
authorTim Sell <Timothy.Sell@unisys.com>
Tue, 27 Sep 2016 18:42:21 +0000 (14:42 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2016 09:30:52 +0000 (11:30 +0200)
Several implicit unsigned --> signed int conversions were corrected.
No runtime effects were observed here, nevertheless implicit conversions
between integral types can lead to unexpected behavior.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorbus/visorbus_main.c

index 1f3d2e0bf966319510015c191632d8b4ee45fe2f..ccdb5a1f45d94f8eb7465ce93e2fd479e90c392b 100644 (file)
@@ -762,7 +762,7 @@ write_vbus_bus_info(struct visorchannel *chan,
 static void
 write_vbus_dev_info(struct visorchannel *chan,
                    struct spar_vbus_headerinfo *hdr_info,
-                   struct ultra_vbus_deviceinfo *info, int devix)
+                   struct ultra_vbus_deviceinfo *info, unsigned int devix)
 {
        int off =
            (sizeof(struct channel_header) + hdr_info->dev_info_offset) +
@@ -787,8 +787,8 @@ fix_vbus_dev_info(struct visor_device *visordev)
        int i;
        struct visor_device *bdev;
        struct visor_driver *visordrv;
-       int bus_no = visordev->chipset_bus_no;
-       int dev_no = visordev->chipset_dev_no;
+       u32 bus_no = visordev->chipset_bus_no;
+       u32 dev_no = visordev->chipset_dev_no;
        struct ultra_vbus_deviceinfo dev_info;
        const char *chan_type_name = NULL;
        struct spar_vbus_headerinfo *hdr_info;