Browse Source

HID: cp2112: use proper specifier for size_t

%zd is a proper format string specifier for size_t

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Jiri Kosina 11 năm trước cách đây
mục cha
commit
5a673fce04
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      drivers/hid/hid-cp2112.c

+ 2 - 2
drivers/hid/hid-cp2112.c

@@ -361,7 +361,7 @@ static int cp2112_read(struct cp2112_device *dev, u8 *data, size_t size)
 	if (ret)
 	if (ret)
 		return ret;
 		return ret;
 
 
-	hid_dbg(hdev, "read %d of %d bytes requested\n",
+	hid_dbg(hdev, "read %d of %zd bytes requested\n",
 		dev->read_length, size);
 		dev->read_length, size);
 
 
 	if (size > dev->read_length)
 	if (size > dev->read_length)
@@ -552,7 +552,7 @@ static int cp2112_xfer(struct i2c_adapter *adap, u16 addr,
 	if (ret < 0)
 	if (ret < 0)
 		goto power_normal;
 		goto power_normal;
 	if (ret != read_length) {
 	if (ret != read_length) {
-		hid_warn(hdev, "short read: %d < %d\n", ret, read_length);
+		hid_warn(hdev, "short read: %d < %zd\n", ret, read_length);
 		ret = -EIO;
 		ret = -EIO;
 		goto power_normal;
 		goto power_normal;
 	}
 	}