Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3375272imm; Fri, 25 May 2018 04:47:22 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrrLlqI/zg/eTU3EoPzHiN+h/bMkoB24K+dCDTBNg0pDBB3t4hoBUuCRipNkNNpZti7B68y X-Received: by 2002:a63:a513:: with SMTP id n19-v6mr1701735pgf.381.1527248842543; Fri, 25 May 2018 04:47:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527248842; cv=none; d=google.com; s=arc-20160816; b=sfR5+M1fTn2WeQtrm9POYin1CJTDsL16/BbzYJKQWMAiZ5c1RNXdImryQzjpFixbdZ dod0BPg4psn8M2OkCDvWNzxradRTyUoOoMbxpApu8zrJqc7iguupkabg17eatve5PSxY N045TpuuFmh/qc/nLo53W36YyZhRspYLvGTqQbNWhYe3s3aQVnNwGLdeBcYvaz5ORGU1 OmQNZ0qaOz00PlEOpoNWjkGhJWAb+kz9W9NfuN7TPrhTRlXuMXVVprf8jSYul7rKiINk mJzjpCL8EoRKViNI66urVUEzM846TOb1B/X6rgStneVjL85cPDmCzfIPaIO48OW1loYA uGhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:subject:cc:from:to :in-reply-to:arc-authentication-results; bh=WqotzjGdX/kx+qFqN0MUXGkU7DJJ5fK3+kk9+he0F/w=; b=BR6Lj8riJqm2pmn14Q15w808jchOS/0xda9RbKgeQDOc6aOyps2xcLvdV8OvOiG1NQ glncReQzPUu8qn4/mlcuQ8pzAqPB7KtGt4f7TfqZ0US0LVGVH08JLolLfEbGtXG2smOd wqpKUs0GIHLmJwatjWHXKeWevtrghuNDFmtJGGTH40QBxB8Hvtyh/WV8zDstZLhr2LKX 4rrEB6WIaJj18v/VtpJxvqSTpGopxVuY20dgg3X7vS5qd6ZeU5VX0ljFEspvSfgTlRil inxOOfGQKEQscxUu3XqtdqSQ3pGnkGS/Q3cnkXPRzwr4JeOtxrkCr1ZKCj38n0H/1rAM T4xg== 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 q2-v6si12300891pgf.432.2018.05.25.04.47.07; Fri, 25 May 2018 04:47: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; 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 S966528AbeEYLlb (ORCPT + 99 others); Fri, 25 May 2018 07:41:31 -0400 Received: from ozlabs.org ([203.11.71.1]:47105 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966419AbeEYLlZ (ORCPT ); Fri, 25 May 2018 07:41:25 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 40skq861hKz9s3c; Fri, 25 May 2018 21:41:24 +1000 (AEST) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: e70d8f55268ba95f00c61857df2bab638365f10f In-Reply-To: <20180325090648.1029-1-malat@debian.org> To: Mathieu Malaterre From: Michael Ellerman Cc: Mathieu Malaterre , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [v2] xmon: Use __printf markup to silence compiler Message-Id: <40skq861hKz9s3c@ozlabs.org> Date: Fri, 25 May 2018 21:41:24 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2018-03-25 at 09:06:47 UTC, Mathieu Malaterre wrote: > Update the other prototype declarations in asm/xmon.h. > > Silence warnings (triggered at W=1) by adding relevant __printf attribute. > Move #define at bottom of the file to prevent conflict with gcc attribute. > > Solve the original warning: > > arch/powerpc/xmon/nonstdio.c:178:2: error: function might be possible candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format] > > In turn this uncovered the following (partial list) warnings (treated as > errors with W=1): > > arch/powerpc/xmon/xmon.c:2866:17: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘unsigned char *’ [-Werror=format=] > arch/powerpc/xmon/xmon.c:1607:31: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘struct pt_regs *’ [-Werror=format=] > arch/powerpc/xmon/xmon.c:1611:9: error: too many arguments for format [-Werror=format-extra-args] > arch/powerpc/xmon/xmon.c:1623:26: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘struct task_struct *’ [-Werror=format=] > arch/powerpc/xmon/xmon.c:630:36: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘int’ [-Werror=format=] > arch/powerpc/xmon/xmon.c:1392:15: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Werror=format=] > arch/powerpc/xmon/xmon.c:2570:16: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u64 {aka long long unsigned int}’ [-Werror=format=] > arch/powerpc/xmon/xmon.c:1629:25: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘pid_t {aka int}’ [-Werror=format=] > arch/powerpc/xmon/xmon.c:1168:18: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ [-Werror=format=] > arch/powerpc/xmon/xmon.c:3016:24: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘pgd_t * {aka struct *}’ [-Werror=format=] > arch/powerpc/xmon/xmon.c:2339:9: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘u64 {aka long long unsigned int}’ [-Werror=format=] > arch/powerpc/xmon/xmon.c:2339:9: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘long unsigned int’ [-Werror=format=] > arch/powerpc/xmon/xmon.c:3827:10: error: format ‘%p’ expects argument of type ‘void *’, but argument 4 has type ‘long long unsigned int’ [-Werror=format=] > arch/powerpc/xmon/xmon.c:3896:50: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Werror=format=] > arch/powerpc/xmon/spu-dis.c:137:18: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Werror=format=] > arch/powerpc/xmon/xmon.c:3827:10: error: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘u64 {aka long long unsigned int}’ [-Werror=format=] > arch/powerpc/xmon/xmon.c:1665:17: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Werror=format=] > arch/powerpc/xmon/xmon.c:2339:9: error: '#' flag used with ‘%p’ gnu_printf format [-Werror=format=] > > Signed-off-by: Mathieu Malaterre Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/e70d8f55268ba95f00c61857df2bab cheers