From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56D98C43460 for ; Tue, 18 May 2021 14:51:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 032FB61001 for ; Tue, 18 May 2021 14:51:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243804AbhEROxA (ORCPT ); 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8432AC433ED for ; Tue, 18 May 2021 14:53:47 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 09F59610E9 for ; Tue, 18 May 2021 14:53:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 09F59610E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kCqX4ZtCzzMvYufBt2Balthf9fcSY7wfjvRi1hwFxZg=; b=HLi0SGrB7h1+zmepAYbD/G5Zs KNjvOaVdFkW0JLRMBM/NhrIciiiPYEK0BflAVcxd+jqECUC+a10lt7HyBvi4WqRyYnFPqaofnTX5d Aa2GMklK8cnlOFSZGHt1pZylPycr+8w4ErHeS5ud95V3DWQuELPJQeKn8gLCGkRdZIbLQ6aOsr1NJ 9NX+emESxwKvQ9Kje3Mrmb5MyOmTbaRqAdM883wLlbajOb3P7jNSev+0H6TtQwK5QK0nRjl9FZQP0 yVQAqXCxGXiNuefKQROVQ294jQv4Ztyl7ykeF+d3907BWr99YktG2EzgWgOXfXEZx9YI6RP/89SZZ iBMhFUAPg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lj14X-0016Se-Am; Tue, 18 May 2021 14:51:49 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj14U-0016SG-4N for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 14:51:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=vmuROq0D6YxXIDCZICAwW6w0g0CakT1xbJQQIamFFkM=; b=N11Mn3lG6hQ+4obyL4FQmkQhmk fuzGYqlY5WntPWe7X7xPN1VGbCO84FjQLckzk4w1H5jhPq67lnDTuQI15gVDVjOhvtTJNKoJnzlhF zEAOTNqEj38AsASrmAGN516FD825/3FKIXhvSLHgSIIEgTnSCJVfOVDLvAJBKvMoL4NgvhsbnVhSq 8ZIqWdmkYco7vbN8nDVBZ6ZSEcPlEcpWSjwUPY4DRBC/S45iGdwJMF2+64fZpm0EYirsy1uNAymqE ULyPACZshBj/ra5PQOmm2Loy9Tqxt2Fd3rTm1spsiOF+98+Bg1RitB9Y+6w1Qv6sBMvetyVKhwqqF Nz6FBe2A==; Received: from mail.skyhub.de ([5.9.137.197]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj14R-00EkID-CW for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 14:51:44 +0000 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-Disposition: inline In-Reply-To: <20210421135500.3518661-1-arnd@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_075143_598706_F18C8459 X-CRM114-Status: GOOD ( 18.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel