Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1680417pxj; Wed, 19 May 2021 11:18:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVNBngvzt6s0J56tK3Xyd2JohcCAicS+NcACCX9FXY5ZbkXeRencIT+FQKLQjSoVd8djG2 X-Received: by 2002:a17:906:fcb4:: with SMTP id qw20mr483078ejb.216.1621448325251; Wed, 19 May 2021 11:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621448325; cv=none; d=google.com; s=arc-20160816; b=nWdt4CKVVc4hHGeLH1HfJ7Wl1B0cBhSUCMxLRMPoap0HPFCNQLnnTrUtecdA2T4Gbj 4LcL31PrYIGwucXXKeaS39sWiSkSf6KJmN/2rAMa3Yt4l4iQQyZquExWWdVF8UbQgOYC Zwv3FFE2gQw92S2D3cj/BnotwcQlQFkfS3u6tNE1tupDAiTbQl9crGGCtxf6Fe5Sd+Kx Bv7NoDab7UlCPtP85U+1kR1boKHD+/d25LX1fiKZcfhu7p/44BJ88+2fVoRfCSSAtLuP /z+uaFzhFTfEVhmBY6OOVL6VNQeXykrBCNW6DLW4q/yANcLx8LZY+Zu+5d7nbHCdkBla B1Ow== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vmuROq0D6YxXIDCZICAwW6w0g0CakT1xbJQQIamFFkM=; b=CEDPcfq7jMhvfjpyg+px/f79+kgcxUF8A5zwk1bV4ipU+rPVR75WnchwL+XY734cAm A+ouCpsCVOzzYD9fertjh0CQWdZM21iuYchOgSpUWISsAOAL00I8HWDC1ixY5SL3SEE6 HTX7zYLHUaMemjJMkqC4z0IJwSb1KhSvcRkJAs3XcqMKDd/jFVEEWqolPhfoNkoHap8I 2TzwtHN1pc4duTAiTS795Ezxx+xr+5GqBR34Vo7Kf84IIxHFeePdBYzlPed3Hkk/Rad+ Qotg4maFzlOfnz5KlsdjUH2nqB+kaEaxOxSjhQkySbA4rWOHfTBTIIIacC6MB+ic5WCI U95Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Vl7feaHx; 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=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n21si17282731edq.44.2021.05.19.11.18.21; Wed, 19 May 2021 11:18:45 -0700 (PDT) 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=@alien8.de header.s=dkim header.b=Vl7feaHx; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243725AbhEROxA (ORCPT + 99 others); Tue, 18 May 2021 10:53:00 -0400 Received: from mail.skyhub.de ([5.9.137.197]:44990 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235888AbhEROw7 (ORCPT ); Tue, 18 May 2021 10:52:59 -0400 Received: from zn.tnic (p200300ec2f0ae2009a42d70f2967689e.dip0.t-ipconnect.de [IPv6:2003:ec:2f0a:e200:9a42:d70f:2967:689e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E0BAE1EC030E; Tue, 18 May 2021 16:51:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1621349500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=vmuROq0D6YxXIDCZICAwW6w0g0CakT1xbJQQIamFFkM=; b=Vl7feaHxOFuwEGBUqtyn3LL2j859bfwfE7YHSlokhy5IGT6MkaA2BvjZuPXlilS/aR/SHa nZmYFRa841b2vEV3TNGAKEq4oze701YWm7x0mkoncV+eRocfUYWGS2dzBwCdOZZMPJcMSR MOHjp4p/ct0+TtuVpoqaTEVvIcFsbqs= Date: Tue, 18 May 2021 16:51:34 +0200 From: Borislav Petkov To: Arnd Bergmann Cc: Stefan Schaeckeler , Mauro Carvalho Chehab , Tony Luck , Joel Stanley , Troy Lee , Arnd Bergmann , James Morse , Robert Richter , Andrew Jeffery , Krzysztof Kozlowski , Liu Shixin , linux-edac@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] EDAC/aspeed: use proper format string for printing resource Message-ID: References: <20210421135500.3518661-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210421135500.3518661-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 21, 2021 at 03:54:53PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > On ARMv7, resource_size_t can be 64-bit, which breaks printing > it as %x: > > drivers/edac/aspeed_edac.c: In function 'init_csrows': > drivers/edac/aspeed_edac.c:257:28: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=] > 257 | dev_dbg(mci->pdev, "dt: /memory node resources: first page r.start=0x%x, resource_size=0x%x, PAGE_SHIFT macro=0x%x\n", > > Use the special %pR format string to pretty-print the entire > resource instead. > > Fixes: edfc2d73ca45 ("EDAC/aspeed: Add support for AST2400 and AST2600") > Signed-off-by: Arnd Bergmann > --- > drivers/edac/aspeed_edac.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c > index a46da56d6d54..6bd5f8815919 100644 > --- a/drivers/edac/aspeed_edac.c > +++ b/drivers/edac/aspeed_edac.c > @@ -254,8 +254,8 @@ static int init_csrows(struct mem_ctl_info *mci) > return rc; > } > > - dev_dbg(mci->pdev, "dt: /memory node resources: first page r.start=0x%x, resource_size=0x%x, PAGE_SHIFT macro=0x%x\n", > - r.start, resource_size(&r), PAGE_SHIFT); > + dev_dbg(mci->pdev, "dt: /memory node resources: first page %pR, PAGE_SHIFT macro=0x%x\n", > + &r, PAGE_SHIFT); > > csrow->first_page = r.start >> PAGE_SHIFT; > nr_pages = resource_size(&r) >> PAGE_SHIFT; > -- Applied, thanks. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette