Re: [PATCH] scripts/dtc: Fixed format mismatch in fprintf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, May 28, 2018 at 10:07:09PM -0700, Frank Rowand wrote:
> On 05/25/18 20:24, David Gibson wrote:
> > On Fri, May 25, 2018 at 09:32:56AM +0800, nixiaoming wrote:
> >> format specifier "d" need arg type "int" , but the according arg
> >> "fdt32_to_cpu(xxx)" has type "unsigned int"
> >>
> >> Signed-off-by: nixiaoming <nixiaoming@xxxxxxxxxx>
> > 
> > As Rob says this needs to be sent against upstream dtc.  But although
> > the bug is real the fix is not correct.  The type here is actually
> > uint32_t - that might be the same as unsigned int on your platform,
> > but it's not guaranateed to be.  You should use the PRIu32 format
> > string from inttypes.h instead.
> 
> nixiaoming might get a bit confused by Rob's and your responses.  His
> email is to the upstream dtc project (he originally sent it to Rob, me,
> and the devicetree list, then he sent this second email to David and
> the devicetree-compiler list).

It's sent to the devicetree-compiler list, but the paths in the patch
are still against the kernel-embedded version rather than upstream
dtc.

Never mind though, I fixed it up manually, and wrote a followup patch
to change a bunch of things to use the <inttypes.h> formats.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux