This is just a cleanup.

The "count" variable here is type size_t so casting it to int in
min_t() truncates the higher values.  Of course, this is sysfs so
count is capped at a PAGE_SIZE but static checkers don't know that.

Signed-off-by: Dan Carpenter <[email protected]>

diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
index ab7fc60..feb9867 100644
--- a/drivers/infiniband/core/sysfs.c
+++ b/drivers/infiniband/core/sysfs.c
@@ -641,7 +641,7 @@ static ssize_t set_node_desc(struct device *device,
        if (!dev->modify_device)
                return -EIO;
 
-       memcpy(desc.node_desc, buf, min_t(int, count, 64));
+       memcpy(desc.node_desc, buf, min_t(size_t, count, 64));
        ret = ib_modify_device(dev, IB_DEVICE_MODIFY_NODE_DESC, &desc);
        if (ret)
                return ret;
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to