All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regmap: Fix printing of size_t variable
@ 2012-10-25 16:07 Fabio Estevam
  2012-10-25 17:55 ` Mark Brown
  2012-10-25 22:52 ` Randy Dunlap
  0 siblings, 2 replies; 4+ messages in thread
From: Fabio Estevam @ 2012-10-25 16:07 UTC (permalink / raw)
  To: broonie; +Cc: gregkh, linux-kernel, festevam, Fabio Estevam

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>
---
 drivers/base/regmap/regmap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 0585726..cc90dfc 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -869,7 +869,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);
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] regmap: Fix printing of size_t variable
  2012-10-25 16:07 [PATCH] regmap: Fix printing of size_t variable Fabio Estevam
@ 2012-10-25 17:55 ` Mark Brown
  2012-10-25 22:52 ` Randy Dunlap
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2012-10-25 17:55 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: gregkh, linux-kernel, festevam

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]

On Thu, Oct 25, 2012 at 02:07:18PM -0200, Fabio Estevam wrote:
> 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>

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] regmap: Fix printing of size_t variable
  2012-10-25 16:07 [PATCH] regmap: Fix printing of size_t variable Fabio Estevam
  2012-10-25 17:55 ` Mark Brown
@ 2012-10-25 22:52 ` Randy Dunlap
  2012-10-27 21:14   ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2012-10-25 22:52 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: broonie, gregkh, linux-kernel, festevam

On 10/25/2012 09:07 AM, Fabio Estevam wrote:

> 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>


Acked-by: Randy Dunlap <rdunlap@xenotime.net>

http://marc.info/?l=linux-kernel&m=135041943424273&w=2


> ---
>  drivers/base/regmap/regmap.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
> index 0585726..cc90dfc 100644
> --- a/drivers/base/regmap/regmap.c
> +++ b/drivers/base/regmap/regmap.c
> @@ -869,7 +869,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);



-- 
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] regmap: Fix printing of size_t variable
  2012-10-25 22:52 ` Randy Dunlap
@ 2012-10-27 21:14   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2012-10-27 21:14 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Fabio Estevam, gregkh, linux-kernel, festevam

[-- Attachment #1: Type: text/plain, Size: 711 bytes --]

On Thu, Oct 25, 2012 at 03:52:32PM -0700, Randy Dunlap wrote:

> Acked-by: Randy Dunlap <rdunlap@xenotime.net>

There's not much point in doing this after a patch has been applied...

> http://marc.info/?l=linux-kernel&m=135041943424273&w=2

So, the difference between Fabio's patch and your patch is that he sent
the patch in the normal fashion and didn't do the random extra stuff I
keep mentioning when I apply your patches.  The things you do like the
random recipient lists and CCs in the text of the mail get in the way
and mean that for things like minor warning fixes the patch is likely to
get deferred for a big mailbox cleanup or (like this time) superceeded
by a version that's easier to deal with.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-27 21:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-25 16:07 [PATCH] regmap: Fix printing of size_t variable Fabio Estevam
2012-10-25 17:55 ` Mark Brown
2012-10-25 22:52 ` Randy Dunlap
2012-10-27 21:14   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.