regmap: Fix printing of size_t variable
authorFabio Estevam <fabio.estevam@freescale.com>
Thu, 25 Oct 2012 16:07:18 +0000 (14:07 -0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 25 Oct 2012 17:55:11 +0000 (18:55 +0100)
val_bytes is of 'size_t', so it should be printed as '%zu'.

Fixes the following build warning on x86:

drivers/base/regmap/regmap.c:872:4: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' [-Wformat]

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/base/regmap/regmap.c

index 96253cd949e98cddbf433e68913b6c4051d337fa..336bedb04ba8e8fa4e664b1c8de8baab71bb4c28 100644 (file)
@@ -858,7 +858,7 @@ static int _regmap_raw_write(struct regmap *map, unsigned int reg,
 
                /* If the write goes beyond the end of the window split it */
                while (val_num > win_residue) {
-                       dev_dbg(map->dev, "Writing window %d/%d\n",
+                       dev_dbg(map->dev, "Writing window %d/%zu\n",
                                win_residue, val_len / map->format.val_bytes);
                        ret = _regmap_raw_write(map, reg, val, win_residue *
                                                map->format.val_bytes);
This page took 0.033446 seconds and 5 git commands to generate.