Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2948135imm; Thu, 24 May 2018 19:41:12 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqWVAManrG7T1SIUvt/yBkSz+c/8fwhFkxLzchvjMD0es5rXP9rKmeWemtGzK/dL0+OlXQk X-Received: by 2002:a65:6354:: with SMTP id p20-v6mr444777pgv.437.1527216072906; Thu, 24 May 2018 19:41:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527216072; cv=none; d=google.com; s=arc-20160816; b=y7d4RkZ3vgTvQohO8Y24kkWjXZZdPGg7fJ2szgnCUhtU9EEaiyMS7mN+yTZYvxRd+o ZRPm020ENp4GhVlpWnYicyydKvQoc/DbWkwyQ7JIlBPtw44TEobg7knyiGNBtoSI8n9c 8H+SzAaMhWPf65rZ+mo58D9xC25ORqCphRiHGrCXprIzEnqBLLCq65K2FgM8dnoWTKPr 4iea6NkjcODNCF0kYWZgQlYD3zRMlzhr89Qv3gyaNQJVXWwmf3eflBngt+jLwn8dhCuG fUAFZT2FhUwKmhHWpe1LRYBEwSfTXMlA0hjkoo2CI/qnahlOEFNAetr4QU+D27m8ERxx Ti3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=DVhQuZFBfyP6ngzbLwaAXDwNj5AhrKOf6UcJ8tjtgGY=; b=dzIVFJX7PeaUTcejCR9Lba88sZG6BDnqcNkb5zhWsVpBYZyHUYtYnDnddwYLglfVyj sEnG8tDDePEDcIwR2ZDcTu9wDMOCb7UHPmR21BmYI3QU0vulca2/YBZoj856sBTa564G E1INNfpfV0pArLfe9k+6ati8iwDNdadQnuDj/I63WqgCOl4LDFLx11qVs4kpWMgLmxQh eW1X/o6RujutIW6n/7es0MB+WeD/pf6Isi6LqGs9J5T1AGyYf4zCo0YlYDCIPP3Pjlcx u7efsgLvaX0MBipol7DUTpyPL+0+A4uWcvrP0OAXrkJsB8PGbZV9H+/6RSot0jb0yY68 s2kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9-v6si18097646pgn.665.2018.05.24.19.40.58; Thu, 24 May 2018 19:41:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967926AbeEXUIS (ORCPT + 99 others); Thu, 24 May 2018 16:08:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:40594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967287AbeEXUIR (ORCPT ); Thu, 24 May 2018 16:08:17 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A59C020020; Thu, 24 May 2018 20:08:15 +0000 (UTC) Date: Thu, 24 May 2018 16:08:13 -0400 From: Steven Rostedt To: nixiaoming Cc: , , , , , , , , trivial@kernel.org Subject: Re: [PATCH] scripts: Fixed printf format mismatch Message-ID: <20180524160813.26dbf222@gandalf.local.home> In-Reply-To: <20180524031612.79723-1-nixiaoming@huawei.com> References: <20180524031612.79723-1-nixiaoming@huawei.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 24 May 2018 11:16:12 +0800 nixiaoming wrote: > scripts/kallsyms.c: function write_src: > "printf", the #1 format specifier "d" need arg type "int", > but the according arg "table_cnt" has type "unsigned int" > > scripts/recordmcount.c: function do_file: > "fprintf", the #1 format specifier "d" need arg type "int", > but the according arg "(*w2)(ehdr->e_machine)" has type "unsigned int" > > scripts/recordmcount.h: function find_secsym_ndx: > "fprintf", the #1 format specifier "d" need arg type "int", > but the according arg "txtndx" has type "unsigned int" Acked-by: Steven Rostedt (VMware) -- Steve > > Signed-off-by: nixiaoming > --- > scripts/kallsyms.c | 2 +- > scripts/recordmcount.c | 2 +- > scripts/recordmcount.h | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c > index 5abfbf1..e0c416a 100644 > --- a/scripts/kallsyms.c > +++ b/scripts/kallsyms.c > @@ -424,7 +424,7 @@ static void write_src(void) > } > > output_label("kallsyms_num_syms"); > - printf("\tPTR\t%d\n", table_cnt); > + printf("\tPTR\t%u\n", table_cnt); > printf("\n"); > > /* table of offset markers, that give the offset in the compressed stream > diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c > index 8c9691c..895c40e 100644 > --- a/scripts/recordmcount.c > +++ b/scripts/recordmcount.c > @@ -500,7 +500,7 @@ do_file(char const *const fname) > gpfx = 0; > switch (w2(ehdr->e_machine)) { > default: > - fprintf(stderr, "unrecognized e_machine %d %s\n", > + fprintf(stderr, "unrecognized e_machine %u %s\n", > w2(ehdr->e_machine), fname); > fail_file(); > break; > diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h > index b9897e2..2e77937 100644 > --- a/scripts/recordmcount.h > +++ b/scripts/recordmcount.h > @@ -441,7 +441,7 @@ static unsigned find_secsym_ndx(unsigned const txtndx, > return symp - sym0; > } > } > - fprintf(stderr, "Cannot find symbol for section %d: %s.\n", > + fprintf(stderr, "Cannot find symbol for section %u: %s.\n", > txtndx, txtname); > fail_file(); > }