Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7507338pxb; Thu, 18 Feb 2021 11:55:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxs/z/j8CUZyJiM30K1MIRdQU6kM8glIAVGK1q9kM8AAwS02hBZ6Q6OO56DhwA4DLYH37CL X-Received: by 2002:a05:6402:a49:: with SMTP id bt9mr5673999edb.127.1613678136753; Thu, 18 Feb 2021 11:55:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613678136; cv=none; d=google.com; s=arc-20160816; b=BEfLNzbFobBQUk8DZ+lv5/oJFQKmTLxr5W3xQicfPmQV03qier7hJvr1AYFvY6wbzC iVLSU9jFXs3r+7sJxPtWQ6vQ2mvAs4tQfKUkJxb3P435fIQZl2ccW7CyM2SIJ7lsPxFk vQbe+wVAOhyQ9gpcNTx2qTjvonOLCXSvabK8ZOr8SVBwsmUVE2fIWFmOjO3OZA3YcD+0 sluyYRsOgeCFVI0ahKsrmCH+/jOeVC7IZwIgc5IKylQSjx9TI3ziy7phMlBLZPp/LzHN OCBWbYz8NjL09Pb9rEQ8RI4X/isAI6dqYuHOxaq2Q9kMBV0gJqcjMZAvlimtpWojy1pu uTjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gVn0Q86GPbzdGHaHIl+CWJ/4fh6GJGfagggwEXaKbEw=; b=ZhjKdfg0vxK9hrZCwFIwvCaj0u/wiJWub/2e3gEf5bb4VXzIUMvfZ9oXWo1ZNAXcvy VKJyB0NmKpoSwDhMXIFBxMX6Vz8IWSJTQ1tchOorTkvn3St5sW7S2YI0ETWJhCzixbut DOOHkGPUNfteTvUGfwNJwBBAVUmryjSCoETPAI21kT7I06AxRv6VCl6gv+jAwYZFeOzh DQ32DgnmN72TipUls3/bXOrf3EOhedb686/2cnUCWqCsxL6gonPFFDvTvEwOYwyopFf5 jLIImqidm50frfpn+j1EDExu79HFix66eQ0iFbjVJo6DQYP47qm0GyP3TdZAgJNHPqeH 8j2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bxXcMD6W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by17si4306459ejb.604.2021.02.18.11.55.12; Thu, 18 Feb 2021 11:55:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bxXcMD6W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232345AbhBRTxb (ORCPT + 99 others); Thu, 18 Feb 2021 14:53:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:57036 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232187AbhBRTZr (ORCPT ); Thu, 18 Feb 2021 14:25:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3C12164E2F; Thu, 18 Feb 2021 19:25:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613676306; bh=zTgIYlyFaDJGycAett61ACFbsNZyANa5pHJS8Y3xQDg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bxXcMD6Wg3j5UI9wGwDU9FR2+01yr/5Ai+kpVSL+AJ22vI7CyWMfS5PkvvKHKMbG2 LvmfEPhSSQ7gPeGhjWYQsMeNiBVm5X+6JG6d0gK6TjbucfWSSC9kgjk6NMOM65QGsZ /OgVUsGSxMy4+ZKJSJ3U6Cdp7ayZbnkot/6ksWkYQJRQRtO8K2dcZGGtg9q+gibars 8+Yg4rPQ7n7ZUzM+MiyPTh01GkueVEBr5Q2keoAHQuiqO8IXzWhd/0J8NALs3GHlVB faSiI3d95wb9DigwxDw7wa5d+HOb0NXjsxMEI8UZycysjBheHik6BU05OBWSeRnbRg +P6FmbgfjcQAQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id F205E40CD9; Thu, 18 Feb 2021 16:25:03 -0300 (-03) Date: Thu, 18 Feb 2021 16:25:03 -0300 From: Arnaldo Carvalho de Melo To: John Garry Cc: Jianlin Lv , will@kernel.org, mathieu.poirier@linaro.org, leo.yan@linaro.org, peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, guoren@kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, kjain@linux.ibm.com, atrajeev@linux.vnet.ibm.com, ravi.bangoria@linux.ibm.com, anju@linux.vnet.ibm.com, iecedge@gmail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v5] perf tools: Fix arm64 build error with gcc-11 Message-ID: References: <20210218031245.2078492-1-Jianlin.Lv@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Feb 18, 2021 at 09:26:17AM +0000, John Garry escreveu: > On 18/02/2021 03:12, Jianlin Lv wrote: > > gcc version: 11.0.0 20210208 (experimental) (GCC) > > > > Following build error on arm64: > > > > ....... > > In function ‘printf’, > > inlined from ‘regs_dump__printf’ at util/session.c:1141:3, > > inlined from ‘regs__printf’ at util/session.c:1169:2: > > /usr/include/aarch64-linux-gnu/bits/stdio2.h:107:10: \ > > error: ‘%-5s’ directive argument is null [-Werror=format-overflow=] > > > > 107 | return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, \ > > __va_arg_pack ()); > > > > ...... > > In function ‘fprintf’, > > inlined from ‘perf_sample__fprintf_regs.isra’ at \ > > builtin-script.c:622:14: > > /usr/include/aarch64-linux-gnu/bits/stdio2.h:100:10: \ > > error: ‘%5s’ directive argument is null [-Werror=format-overflow=] > > 100 | return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt, > > 101 | __va_arg_pack ()); > > > > cc1: all warnings being treated as errors > > ....... > > > > This patch fixes Wformat-overflow warnings. Add helper function to > > convert NULL to "unknown". > > > > Signed-off-by: Jianlin Lv > > thanks > Reviewed-by: John Garry Thanks, applied. - Arnaldo