public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org>,
	Varun Prakash <varun@chelsio.com>,
	linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cxgbit: fix dma_addr_t printk format
Date: Fri, 04 Mar 2016 18:20:25 -0800	[thread overview]
Message-ID: <1457144425.4044.147.camel@perches.com> (raw)
In-Reply-To: <1512908.OAtrKYf46L@wuerfel>

On Sat, 2016-03-05 at 01:34 +0100, Arnd Bergmann wrote:
> On Friday 04 March 2016 16:25:07 Joe Perches wrote:
> > > diff --git a/drivers/target/iscsi/cxgbit/cxgbit_ddp.c b/drivers/target/iscsi/cxgbit/cxgbit_ddp.c
[]
> > > @@ -179,7 +179,7 @@ cxgbit_dump_sgl(const char *cap, struct scatterlist *sgl, int nents)
> > >       for_each_sg(sgl, sg, nents, i)
> > >               pr_info("\t%d/%u, 0x%p: len %u, off %u, pg 0x%p, dma 0x%llx, %u\n",
> > >                       i, nents, sg, sg->length, sg->offset, sg_page(sg),
> > > -                     sg_dma_address(sg), sg_dma_len(sg));
> > > +                     (u64)sg_dma_address(sg), sg_dma_len(sg));
[]
> > You could create a temporary:


        for_each_sg(sgl, sg, nents, i) {
                dma_addr_t addr = sg_dma_address(sg);


                pr_info("\t%d/%u, 0x%p: len %u, off %u, pg 0x%p, dma %pad, %u\n",
                        i, nents, sg, sg->length, sg->offset, sg_page(sg),
                        &addr, sg_dma_len(sg));
        }

Sure, but the cast seemed nicer in this case, the result is the same.

Not quite as 0x%llx isn't always the same width and doesn't
have leading 0's like %pad

  reply	other threads:[~2016-03-05  2:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-05  0:04 [PATCH] cxgbit: fix dma_addr_t printk format Arnd Bergmann
2016-03-05  0:25 ` Joe Perches
2016-03-05  0:34   ` Arnd Bergmann
2016-03-05  2:20     ` Joe Perches [this message]
2016-03-07 14:14 ` Varun Prakash

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457144425.4044.147.camel@perches.com \
    --to=joe@perches.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    --cc=target-devel@vger.kernel.org \
    --cc=varun@chelsio.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox