Skip to content

Commit 2ce5b34

Browse files
David BrownellJean Delvare
authored andcommitted
i2c: correct some size_t printk formats
Fix various printk format strings where %zd was passed a size_t; those should be %zu instead. (Courtesy of a version of GCC which warns when these details are wrong.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
1 parent c1159f9 commit 2ce5b34

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/i2c/chips/at24.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static ssize_t at24_eeprom_read(struct at24_data *at24, char *buf,
188188
count = I2C_SMBUS_BLOCK_MAX;
189189
status = i2c_smbus_read_i2c_block_data(client, offset,
190190
count, buf);
191-
dev_dbg(&client->dev, "smbus read %zd@%d --> %d\n",
191+
dev_dbg(&client->dev, "smbus read %zu@%d --> %d\n",
192192
count, offset, status);
193193
return (status < 0) ? -EIO : status;
194194
}
@@ -214,7 +214,7 @@ static ssize_t at24_eeprom_read(struct at24_data *at24, char *buf,
214214
msg[1].len = count;
215215

216216
status = i2c_transfer(client->adapter, msg, 2);
217-
dev_dbg(&client->dev, "i2c read %zd@%d --> %d\n",
217+
dev_dbg(&client->dev, "i2c read %zu@%d --> %d\n",
218218
count, offset, status);
219219

220220
if (status == 2)
@@ -334,7 +334,7 @@ static ssize_t at24_eeprom_write(struct at24_data *at24, char *buf,
334334
if (status == 1)
335335
status = count;
336336
}
337-
dev_dbg(&client->dev, "write %zd@%d --> %zd (%ld)\n",
337+
dev_dbg(&client->dev, "write %zu@%d --> %zd (%ld)\n",
338338
count, offset, status, jiffies);
339339

340340
if (status == count)
@@ -512,7 +512,7 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id)
512512

513513
i2c_set_clientdata(client, at24);
514514

515-
dev_info(&client->dev, "%Zd byte %s EEPROM %s\n",
515+
dev_info(&client->dev, "%zu byte %s EEPROM %s\n",
516516
at24->bin.size, client->name,
517517
writable ? "(writable)" : "(read-only)");
518518
dev_dbg(&client->dev,

drivers/i2c/i2c-dev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static ssize_t i2cdev_read (struct file *file, char __user *buf, size_t count,
147147
if (tmp==NULL)
148148
return -ENOMEM;
149149

150-
pr_debug("i2c-dev: i2c-%d reading %zd bytes.\n",
150+
pr_debug("i2c-dev: i2c-%d reading %zu bytes.\n",
151151
iminor(file->f_path.dentry->d_inode), count);
152152

153153
ret = i2c_master_recv(client,tmp,count);
@@ -175,7 +175,7 @@ static ssize_t i2cdev_write (struct file *file, const char __user *buf, size_t c
175175
return -EFAULT;
176176
}
177177

178-
pr_debug("i2c-dev: i2c-%d writing %zd bytes.\n",
178+
pr_debug("i2c-dev: i2c-%d writing %zu bytes.\n",
179179
iminor(file->f_path.dentry->d_inode), count);
180180

181181
ret = i2c_master_send(client,tmp,count);

0 commit comments

Comments
 (0)