mei: use correct type for counter variable in for loops
authorTomas Winkler <tomas.winkler@intel.com>
Thu, 12 Jul 2018 14:10:09 +0000 (17:10 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jul 2018 14:23:19 +0000 (16:23 +0200)
In for loops use same type for counter variable
as has the limiting variable.

drivers/misc/mei/bus-fixup.c:489:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/misc/mei/hw-txe.c:725:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/misc/mei/hw-txe.c:744:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/bus-fixup.c
drivers/misc/mei/hw-me.c
drivers/misc/mei/hw-txe.c

index 4c232f0eae90425fe510a91317287581faf6c011..2b8390447117699d4e7ad10d1edcf14526ba7de6 100644 (file)
@@ -484,7 +484,7 @@ void mei_cl_bus_dev_fixup(struct mei_cl_device *cldev)
 {
        struct mei_fixup *f;
        const uuid_le *uuid = mei_me_cl_uuid(cldev->me_cl);
-       int i;
+       size_t i;
 
        for (i = 0; i < ARRAY_SIZE(mei_fixups); i++) {
 
index a12b464bc0b41ce0d97bd5053837413530234048..5bbea13ab171ace74eb3d646dfe564f207ca1228 100644 (file)
@@ -530,9 +530,9 @@ static int mei_me_hbuf_write(struct mei_device *dev,
 {
        unsigned long rem;
        unsigned long length = header->length;
+       unsigned long i;
        u32 *reg_buf = (u32 *)buf;
        u32 dw_cnt;
-       int i;
        int empty_slots;
 
        dev_dbg(dev->dev, MEI_HDR_FMT, MEI_HDR_PRM(header));
index 4c1acf68089ef4fffddc453b5a640b057324fa2b..a5e551ffb2dddd907aa1f75a3e187b5a8ca09acb 100644 (file)
@@ -709,10 +709,10 @@ static int mei_txe_write(struct mei_device *dev,
        struct mei_txe_hw *hw = to_txe_hw(dev);
        unsigned long rem;
        unsigned long length;
+       unsigned long i;
        u32 slots = dev->hbuf_depth;
        u32 *reg_buf = (u32 *)buf;
        u32 dw_cnt;
-       int i;
 
        if (WARN_ON(!header || !buf))
                return -EINVAL;