From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Mon, 29 Jun 2015 11:27:19 -0700 Subject: [U-Boot] [PATCH 1/2] qe: transform parameter to compatible type In-Reply-To: <1430812413-7633-1-git-send-email-B45475@freescale.com> References: <1430812413-7633-1-git-send-email-B45475@freescale.com> Message-ID: <55918E07.6010808@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/05/2015 12:53 AM, Zhao Qiang wrote: > when using printf, the parameter type need to be compatible > type, so transform them to compatible type > > Signed-off-by: Zhao Qiang > --- > drivers/qe/qe.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c > index 84e1433..f1df0a4 100644 > --- a/drivers/qe/qe.c > +++ b/drivers/qe/qe.c > @@ -313,9 +313,10 @@ static void qe_upload_microcode(const void *base, > > if (ucode->major || ucode->minor || ucode->revision) > printf("QE: uploading microcode '%s' version %u.%u.%u\n", > - ucode->id, ucode->major, ucode->minor, ucode->revision); > + (char *)ucode->id, (u16)ucode->major, (u16)ucode->minor, > + (u16)ucode->revision); > else > - printf("QE: uploading microcode '%s'\n", ucode->id); > + printf("QE: uploading microcode '%s'\n", (char *)ucode->id); > Would it be more appropriate to fix the structure in qe.h? Is the size fixed for major and minor? They are declared as u8. I can't find doc/README.qe_firmware as mentioned in the comment. York