All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: usdhi6rol0: fix compiler warnings
@ 2014-06-11 21:30 Guennadi Liakhovetski
  2014-06-12  8:56 ` Ulf Hansson
  2014-06-12 17:46 ` Randy Dunlap
  0 siblings, 2 replies; 4+ messages in thread
From: Guennadi Liakhovetski @ 2014-06-11 21:30 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Randy Dunlap, Phil Edworthy

Fix a number of wrong print formats.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
---

Chris, the "possibl NULL mrq" warning is bogus. It cannot be NULL in the 
USDHI6_WAIT_FOR_STOP state. But if you prefer, I can fix that one too.

 drivers/mmc/host/usdhi6rol0.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c
index eb2bbbe..f0a39eb 100644
--- a/drivers/mmc/host/usdhi6rol0.c
+++ b/drivers/mmc/host/usdhi6rol0.c
@@ -357,7 +357,7 @@ static void *usdhi6_sg_map(struct usdhi6_host *host)
 
 	WARN(host->pg.page, "%p not properly unmapped!\n", host->pg.page);
 	if (WARN(sg_dma_len(sg) % data->blksz,
-		 "SG size %zd isn't a multiple of block size %zd\n",
+		 "SG size %u isn't a multiple of block size %u\n",
 		 sg_dma_len(sg), data->blksz))
 		return NULL;
 
@@ -459,7 +459,7 @@ static void usdhi6_sg_advance(struct usdhi6_host *host)
 	done = (host->page_idx << PAGE_SHIFT) + host->offset;
 	total = host->sg->offset + sg_dma_len(host->sg);
 
-	dev_dbg(mmc_dev(host->mmc), "%s(): %zu of %zu @ %u\n", __func__,
+	dev_dbg(mmc_dev(host->mmc), "%s(): %zu of %zu @ %zu\n", __func__,
 		done, total, host->offset);
 
 	if (done < total && host->offset) {
@@ -489,7 +489,7 @@ static void usdhi6_sg_advance(struct usdhi6_host *host)
 		host->sg = next;
 
 		if (WARN(next && sg_dma_len(next) % data->blksz,
-			 "SG size %zd isn't a multiple of block size %zd\n",
+			 "SG size %u isn't a multiple of block size %u\n",
 			 sg_dma_len(next), data->blksz))
 			data->error = -EINVAL;
 
@@ -896,7 +896,7 @@ static void usdhi6_request_done(struct usdhi6_host *host)
 	struct mmc_data *data = mrq->data;
 
 	if (WARN(host->pg.page || host->head_pg.page,
-		 "Page %p or %p not unmapped: wait %u, CMD%d(%c) @ +0x%x %ux%u in SG%u!\n",
+		 "Page %p or %p not unmapped: wait %u, CMD%d(%c) @ +0x%zx %ux%u in SG%u!\n",
 		 host->pg.page, host->head_pg.page, host->wait, mrq->cmd->opcode,
 		 data ? (data->flags & MMC_DATA_READ ? 'R' : 'W') : '-',
 		 data ? host->offset : 0, data ? data->blocks : 0,
@@ -1666,7 +1666,7 @@ static void usdhi6_timeout_work(struct work_struct *work)
 	case USDHI6_WAIT_FOR_READ:
 	case USDHI6_WAIT_FOR_WRITE:
 		dev_dbg(mmc_dev(host->mmc),
-			"%c: page #%u @ +0x%x %ux%u in SG%u. Current SG %u bytes @ %u\n",
+			"%c: page #%u @ +0x%zx %ux%u in SG%u. Current SG %u bytes @ %u\n",
 			data->flags & MMC_DATA_READ ? 'R' : 'W', host->page_idx,
 			host->offset, data->blocks, data->blksz, data->sg_len,
 			sg_dma_len(host->sg), host->sg->offset);
-- 
1.9.3


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

* Re: [PATCH] mmc: usdhi6rol0: fix compiler warnings
  2014-06-11 21:30 [PATCH] mmc: usdhi6rol0: fix compiler warnings Guennadi Liakhovetski
@ 2014-06-12  8:56 ` Ulf Hansson
  2014-06-12  9:31   ` Guennadi Liakhovetski
  2014-06-12 17:46 ` Randy Dunlap
  1 sibling, 1 reply; 4+ messages in thread
From: Ulf Hansson @ 2014-06-12  8:56 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-mmc, Chris Ball, Randy Dunlap, Phil Edworthy

On 11 June 2014 23:30, Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> Fix a number of wrong print formats.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>

Thanks Guennadi! Applied for fixes.

Kind regards
Uffe

> ---
>
> Chris, the "possibl NULL mrq" warning is bogus. It cannot be NULL in the
> USDHI6_WAIT_FOR_STOP state. But if you prefer, I can fix that one too.
>
>  drivers/mmc/host/usdhi6rol0.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c
> index eb2bbbe..f0a39eb 100644
> --- a/drivers/mmc/host/usdhi6rol0.c
> +++ b/drivers/mmc/host/usdhi6rol0.c
> @@ -357,7 +357,7 @@ static void *usdhi6_sg_map(struct usdhi6_host *host)
>
>         WARN(host->pg.page, "%p not properly unmapped!\n", host->pg.page);
>         if (WARN(sg_dma_len(sg) % data->blksz,
> -                "SG size %zd isn't a multiple of block size %zd\n",
> +                "SG size %u isn't a multiple of block size %u\n",
>                  sg_dma_len(sg), data->blksz))
>                 return NULL;
>
> @@ -459,7 +459,7 @@ static void usdhi6_sg_advance(struct usdhi6_host *host)
>         done = (host->page_idx << PAGE_SHIFT) + host->offset;
>         total = host->sg->offset + sg_dma_len(host->sg);
>
> -       dev_dbg(mmc_dev(host->mmc), "%s(): %zu of %zu @ %u\n", __func__,
> +       dev_dbg(mmc_dev(host->mmc), "%s(): %zu of %zu @ %zu\n", __func__,
>                 done, total, host->offset);
>
>         if (done < total && host->offset) {
> @@ -489,7 +489,7 @@ static void usdhi6_sg_advance(struct usdhi6_host *host)
>                 host->sg = next;
>
>                 if (WARN(next && sg_dma_len(next) % data->blksz,
> -                        "SG size %zd isn't a multiple of block size %zd\n",
> +                        "SG size %u isn't a multiple of block size %u\n",
>                          sg_dma_len(next), data->blksz))
>                         data->error = -EINVAL;
>
> @@ -896,7 +896,7 @@ static void usdhi6_request_done(struct usdhi6_host *host)
>         struct mmc_data *data = mrq->data;
>
>         if (WARN(host->pg.page || host->head_pg.page,
> -                "Page %p or %p not unmapped: wait %u, CMD%d(%c) @ +0x%x %ux%u in SG%u!\n",
> +                "Page %p or %p not unmapped: wait %u, CMD%d(%c) @ +0x%zx %ux%u in SG%u!\n",
>                  host->pg.page, host->head_pg.page, host->wait, mrq->cmd->opcode,
>                  data ? (data->flags & MMC_DATA_READ ? 'R' : 'W') : '-',
>                  data ? host->offset : 0, data ? data->blocks : 0,
> @@ -1666,7 +1666,7 @@ static void usdhi6_timeout_work(struct work_struct *work)
>         case USDHI6_WAIT_FOR_READ:
>         case USDHI6_WAIT_FOR_WRITE:
>                 dev_dbg(mmc_dev(host->mmc),
> -                       "%c: page #%u @ +0x%x %ux%u in SG%u. Current SG %u bytes @ %u\n",
> +                       "%c: page #%u @ +0x%zx %ux%u in SG%u. Current SG %u bytes @ %u\n",
>                         data->flags & MMC_DATA_READ ? 'R' : 'W', host->page_idx,
>                         host->offset, data->blocks, data->blksz, data->sg_len,
>                         sg_dma_len(host->sg), host->sg->offset);
> --
> 1.9.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] mmc: usdhi6rol0: fix compiler warnings
  2014-06-12  8:56 ` Ulf Hansson
@ 2014-06-12  9:31   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 4+ messages in thread
From: Guennadi Liakhovetski @ 2014-06-12  9:31 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-mmc, Chris Ball, Randy Dunlap, Phil Edworthy

Hi Ulf,

On Thu, 12 Jun 2014, Ulf Hansson wrote:

> On 11 June 2014 23:30, Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> > Fix a number of wrong print formats.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
> 
> Thanks Guennadi! Applied for fixes.

Thanks for your quick help!

Regards
Guennadi

> Kind regards
> Uffe
> 
> > ---
> >
> > Chris, the "possibl NULL mrq" warning is bogus. It cannot be NULL in the
> > USDHI6_WAIT_FOR_STOP state. But if you prefer, I can fix that one too.
> >
> >  drivers/mmc/host/usdhi6rol0.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c
> > index eb2bbbe..f0a39eb 100644
> > --- a/drivers/mmc/host/usdhi6rol0.c
> > +++ b/drivers/mmc/host/usdhi6rol0.c
> > @@ -357,7 +357,7 @@ static void *usdhi6_sg_map(struct usdhi6_host *host)
> >
> >         WARN(host->pg.page, "%p not properly unmapped!\n", host->pg.page);
> >         if (WARN(sg_dma_len(sg) % data->blksz,
> > -                "SG size %zd isn't a multiple of block size %zd\n",
> > +                "SG size %u isn't a multiple of block size %u\n",
> >                  sg_dma_len(sg), data->blksz))
> >                 return NULL;
> >
> > @@ -459,7 +459,7 @@ static void usdhi6_sg_advance(struct usdhi6_host *host)
> >         done = (host->page_idx << PAGE_SHIFT) + host->offset;
> >         total = host->sg->offset + sg_dma_len(host->sg);
> >
> > -       dev_dbg(mmc_dev(host->mmc), "%s(): %zu of %zu @ %u\n", __func__,
> > +       dev_dbg(mmc_dev(host->mmc), "%s(): %zu of %zu @ %zu\n", __func__,
> >                 done, total, host->offset);
> >
> >         if (done < total && host->offset) {
> > @@ -489,7 +489,7 @@ static void usdhi6_sg_advance(struct usdhi6_host *host)
> >                 host->sg = next;
> >
> >                 if (WARN(next && sg_dma_len(next) % data->blksz,
> > -                        "SG size %zd isn't a multiple of block size %zd\n",
> > +                        "SG size %u isn't a multiple of block size %u\n",
> >                          sg_dma_len(next), data->blksz))
> >                         data->error = -EINVAL;
> >
> > @@ -896,7 +896,7 @@ static void usdhi6_request_done(struct usdhi6_host *host)
> >         struct mmc_data *data = mrq->data;
> >
> >         if (WARN(host->pg.page || host->head_pg.page,
> > -                "Page %p or %p not unmapped: wait %u, CMD%d(%c) @ +0x%x %ux%u in SG%u!\n",
> > +                "Page %p or %p not unmapped: wait %u, CMD%d(%c) @ +0x%zx %ux%u in SG%u!\n",
> >                  host->pg.page, host->head_pg.page, host->wait, mrq->cmd->opcode,
> >                  data ? (data->flags & MMC_DATA_READ ? 'R' : 'W') : '-',
> >                  data ? host->offset : 0, data ? data->blocks : 0,
> > @@ -1666,7 +1666,7 @@ static void usdhi6_timeout_work(struct work_struct *work)
> >         case USDHI6_WAIT_FOR_READ:
> >         case USDHI6_WAIT_FOR_WRITE:
> >                 dev_dbg(mmc_dev(host->mmc),
> > -                       "%c: page #%u @ +0x%x %ux%u in SG%u. Current SG %u bytes @ %u\n",
> > +                       "%c: page #%u @ +0x%zx %ux%u in SG%u. Current SG %u bytes @ %u\n",
> >                         data->flags & MMC_DATA_READ ? 'R' : 'W', host->page_idx,
> >                         host->offset, data->blocks, data->blksz, data->sg_len,
> >                         sg_dma_len(host->sg), host->sg->offset);
> > --
> > 1.9.3
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH] mmc: usdhi6rol0: fix compiler warnings
  2014-06-11 21:30 [PATCH] mmc: usdhi6rol0: fix compiler warnings Guennadi Liakhovetski
  2014-06-12  8:56 ` Ulf Hansson
@ 2014-06-12 17:46 ` Randy Dunlap
  1 sibling, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2014-06-12 17:46 UTC (permalink / raw)
  To: Guennadi Liakhovetski, linux-mmc; +Cc: Chris Ball, Phil Edworthy

On 06/11/14 14:30, Guennadi Liakhovetski wrote:
> Fix a number of wrong print formats.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
> 
> Chris, the "possibl NULL mrq" warning is bogus. It cannot be NULL in the 
> USDHI6_WAIT_FOR_STOP state. But if you prefer, I can fix that one too.
> 
>  drivers/mmc/host/usdhi6rol0.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c
> index eb2bbbe..f0a39eb 100644
> --- a/drivers/mmc/host/usdhi6rol0.c
> +++ b/drivers/mmc/host/usdhi6rol0.c
> @@ -357,7 +357,7 @@ static void *usdhi6_sg_map(struct usdhi6_host *host)
>  
>  	WARN(host->pg.page, "%p not properly unmapped!\n", host->pg.page);
>  	if (WARN(sg_dma_len(sg) % data->blksz,
> -		 "SG size %zd isn't a multiple of block size %zd\n",
> +		 "SG size %u isn't a multiple of block size %u\n",
>  		 sg_dma_len(sg), data->blksz))
>  		return NULL;
>  
> @@ -459,7 +459,7 @@ static void usdhi6_sg_advance(struct usdhi6_host *host)
>  	done = (host->page_idx << PAGE_SHIFT) + host->offset;
>  	total = host->sg->offset + sg_dma_len(host->sg);
>  
> -	dev_dbg(mmc_dev(host->mmc), "%s(): %zu of %zu @ %u\n", __func__,
> +	dev_dbg(mmc_dev(host->mmc), "%s(): %zu of %zu @ %zu\n", __func__,
>  		done, total, host->offset);
>  
>  	if (done < total && host->offset) {
> @@ -489,7 +489,7 @@ static void usdhi6_sg_advance(struct usdhi6_host *host)
>  		host->sg = next;
>  
>  		if (WARN(next && sg_dma_len(next) % data->blksz,
> -			 "SG size %zd isn't a multiple of block size %zd\n",
> +			 "SG size %u isn't a multiple of block size %u\n",
>  			 sg_dma_len(next), data->blksz))
>  			data->error = -EINVAL;
>  
> @@ -896,7 +896,7 @@ static void usdhi6_request_done(struct usdhi6_host *host)
>  	struct mmc_data *data = mrq->data;
>  
>  	if (WARN(host->pg.page || host->head_pg.page,
> -		 "Page %p or %p not unmapped: wait %u, CMD%d(%c) @ +0x%x %ux%u in SG%u!\n",
> +		 "Page %p or %p not unmapped: wait %u, CMD%d(%c) @ +0x%zx %ux%u in SG%u!\n",
>  		 host->pg.page, host->head_pg.page, host->wait, mrq->cmd->opcode,
>  		 data ? (data->flags & MMC_DATA_READ ? 'R' : 'W') : '-',
>  		 data ? host->offset : 0, data ? data->blocks : 0,
> @@ -1666,7 +1666,7 @@ static void usdhi6_timeout_work(struct work_struct *work)
>  	case USDHI6_WAIT_FOR_READ:
>  	case USDHI6_WAIT_FOR_WRITE:
>  		dev_dbg(mmc_dev(host->mmc),
> -			"%c: page #%u @ +0x%x %ux%u in SG%u. Current SG %u bytes @ %u\n",
> +			"%c: page #%u @ +0x%zx %ux%u in SG%u. Current SG %u bytes @ %u\n",
>  			data->flags & MMC_DATA_READ ? 'R' : 'W', host->page_idx,
>  			host->offset, data->blocks, data->blksz, data->sg_len,
>  			sg_dma_len(host->sg), host->sg->offset);
> 


-- 
~Randy

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

end of thread, other threads:[~2014-06-12 17:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-11 21:30 [PATCH] mmc: usdhi6rol0: fix compiler warnings Guennadi Liakhovetski
2014-06-12  8:56 ` Ulf Hansson
2014-06-12  9:31   ` Guennadi Liakhovetski
2014-06-12 17:46 ` Randy Dunlap

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.