lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 04 Mar 2016 18:20:25 -0800
From:	Joe Perches <joe@...ches.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>,
	Varun Prakash <varun@...lsio.com>, linux-scsi@...r.kernel.org,
	target-devel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cxgbit: fix dma_addr_t printk format

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


Powered by blists - more mailing lists