Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3369222imm; Tue, 29 May 2018 06:10:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJe6hjw/SqAb40Y2Hx/UVNSZ7QfgswCRrfQO/bTIfWYGk5Vo7fO0vyX9+h021qu5eVNtB56 X-Received: by 2002:a17:902:7d89:: with SMTP id a9-v6mr13448986plm.238.1527599422526; Tue, 29 May 2018 06:10:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527599422; cv=none; d=google.com; s=arc-20160816; b=mzh/6zZ8yobhVZiXCTO3UZZOapF0ErhVaRomWtF7l2xbIBqvyc8FtScaJdb0+4UA5l 836j/eeQ4ctMOVyXepsHJHi1eq08jH6WRPmvGYLNazmOpqfuBMGbajbhOczHtKdtwP/n JQEUudocG2cqorxMx1aA+e+BGkuTSrTCjNImHKe3Z9meKV4sCIbzH9y7q2yC3a4h8XJe aWMy5/rHwIse3h1RgKRA96aAor/22GFgw6T2+KkNfkQBEzm17EP33XAOzfSF35uvqrdE TJAKaaB0oSYMEB0fgIkDFbHk8jUMANPa6/lvEemGc/VdeNi4ynLgeNa032FbOETe8gaW 6qGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=sRBKUDotPwYuBPXGgS0cSMZqOmodtAPMERXM+TQNFZQ=; b=zde5ev7SSeTrTpdw08RNAOD3dovPNh8a68/N+RbUCwvh+4dzERu+8I4+nVHaakl57o SmqG8qJuJ7liKlthzt5jK/CKWTGVhjYMpbVQmAKACJWlmhS/yQLQdaO4JckGJW+hFRTh s1huF/csNUlmPWru+FDd3nB3R+aIYtgsQjuc7yPchh5DAAtPayg1i6knauPxwbOxNa70 fSK0HwFCKW5VYq6kwA/mWNTW0LlKSxDObZo8NtnUicVaQpzdPyZU5qKm09JjkysgB8wz qwwy3y0sCm0h34Gu+P9F19NP7W0jAmABwkkKnybE3v9Pasef7Zf8DtWeoWPHruK03AzY zu9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ZbfU/Va/; 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 o23-v6si10846547pfi.302.2018.05.29.06.09.38; Tue, 29 May 2018 06:10:22 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ZbfU/Va/; 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 S934070AbeE2NIJ (ORCPT + 99 others); Tue, 29 May 2018 09:08:09 -0400 Received: from conssluserg-06.nifty.com ([210.131.2.91]:36690 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933548AbeE2NII (ORCPT ); Tue, 29 May 2018 09:08:08 -0400 Received: from mail-vk0-f48.google.com (mail-vk0-f48.google.com [209.85.213.48]) (authenticated) by conssluserg-06.nifty.com with ESMTP id w4TD7s6S028853 for ; Tue, 29 May 2018 22:07:55 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com w4TD7s6S028853 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1527599275; bh=sRBKUDotPwYuBPXGgS0cSMZqOmodtAPMERXM+TQNFZQ=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=ZbfU/Va/qggtqsbwTTOYjg0g/PqJQtXb8WQLnRqHjqJRQbfChxxBXEzVGRYm1RaRs Yq+J2FxJI8GG2C8uriQYRno3IzicNWZ6Fk/9lxR0u1fEUeuV9NM3byTWowSphguadB iHCUpTslVHmPECPppsi6c6vglDloOY6R/1mpjSv7S4aaRn/xivHCiWHja4xVMQ6b+5 AEax3Lyiik4y+73sxP4mN/porw0iT07z2aCNZN6WJZbCw4MNNJ2cRtC7LaIVOF0mBA c1MjFKOe8sgQyk6HKeAmnHP4t3AVgx4y/SqrtKKmu5S3pAXs3po/vrZK6iygIpUZ7H WjnQlV67zjuBQ== X-Nifty-SrcIP: [209.85.213.48] Received: by mail-vk0-f48.google.com with SMTP id m144-v6so8808194vke.4 for ; Tue, 29 May 2018 06:07:55 -0700 (PDT) X-Gm-Message-State: ALKqPwfIaZ7GHn+AYJziyK7ZMKN325SsDXYElO1AsIygrpTeWOsUgyU3 yj7ToXMoaq9hvD1E1UFBiIoLGcpk3+vC7irwlbk= X-Received: by 2002:a1f:cc85:: with SMTP id c127-v6mr10157406vkg.166.1527599274113; Tue, 29 May 2018 06:07:54 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:55d8:0:0:0:0:0 with HTTP; Tue, 29 May 2018 06:07:13 -0700 (PDT) In-Reply-To: <20180524031612.79723-1-nixiaoming@huawei.com> References: <20180524031612.79723-1-nixiaoming@huawei.com> From: Masahiro Yamada Date: Tue, 29 May 2018 22:07:13 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] scripts: Fixed printf format mismatch To: nixiaoming Cc: Ard Biesheuvel , Andrew Morton , Cao jin , Guenter Roeck , Steven Rostedt , "Peter Zijlstra (Intel)" , James Hogan , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-05-24 12:16 GMT+09:00 nixiaoming : > 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" > > Signed-off-by: nixiaoming Applied to linux-kbuild with Steven's Ack. Thanks. > --- > 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(); > } > -- > 2.10.1 > -- Best Regards Masahiro Yamada