Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp654605pxy; Wed, 21 Apr 2021 11:32:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiReJttEbTBXo/aetjv0tRJb+Bi2tePXfBzHkqEquPBFREg1SJkJkxoSK45mp7PozsIwY7 X-Received: by 2002:a17:906:44b:: with SMTP id e11mr34657585eja.551.1619029957025; Wed, 21 Apr 2021 11:32:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619029957; cv=none; d=google.com; s=arc-20160816; b=Y+Dv+ERUXPVmn2I4dEJPA0uEy4pvqRGnJ+ZhyD8M0Vnx/dpPKGaB+d9avYe16fO7s4 gnOoCtmOXhIx/hmybe9Jyl99cEGr9vflJX9DlcShrvsvGrVW4dxLFK2hmmVQ2gzWYS/e deWhgMGe5xb65mGnj+51wMTUBW6uR0u37ICldDDs7vmb18q8mEyfdyOBY29wZwfn1uwd HyceOZmer/VHzgNfQeba9o4095KO4elevxksfI29mAxTsbhKV7+3cxZQ7DN0k6mAlVqr rGt74IscI9mxqBKtov5se0wai2Z8W2YQNfT5Lds2fpXVowaKml0pnc0fvcPQzg0ZLjPO X+sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=8c1Hv0iETCYWFw8G4ODyDWe1xqcfab7qlRAqI0CZSU0=; b=F/iF+JksvTgNIAdJchUYPHCCoTjQWvYQuBQ/RI8RkQDEuANYzoSvE9YaS2uZLZE4rK 29TrQSLc2Jeja7qOQfXONRV9LFdWGLRlklh2MdU6Qgz6g0qvQaEo6wgcVB1+IH6DgkJc zbcXIv8NRWoJJaQ2znGEXOb5ragTe6Qc5MyAxTr3v0mCHJVm1dopmNMKHTKHwdKDM0KX ZecVKDkSahmSD3AGmmzN0PYLTVaYswsqovJf5uxYt9PD/bMH2Ry1RJ2qoKkiMjC6MrB6 4ZcyGQUXynoTxqQanK80cm7eLaIM9o3fU6bWhj1cSXQh6M9GHDld4XZb06oomkq5XQ3t /OBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i0gTfVfz; 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 pj1si25554ejb.586.2021.04.21.11.32.13; Wed, 21 Apr 2021 11:32:37 -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=@kernel.org header.s=k20201202 header.b=i0gTfVfz; 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 S235489AbhDUNzl (ORCPT + 99 others); Wed, 21 Apr 2021 09:55:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:60892 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235434AbhDUNzl (ORCPT ); Wed, 21 Apr 2021 09:55:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CAC6B611F2; Wed, 21 Apr 2021 13:55:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619013307; bh=JD5ziEk/FB8CNzMad7zbcOvmZivcvUwNl7nwAGloB5w=; h=From:To:Cc:Subject:Date:From; b=i0gTfVfze0/PUJiMP682KpT9c250YJgN8nYi7fAF1ZSJklOTRE7NrVvG0j+02PR45 Ls4m1q+1KehLZmP8q3ld7gfP5y5ufPdyN8SFN0xnzE22DmWq4tAfQEbrSKcfQeH4U2 zkaX3jmIYXWFa2dQ1RJsAZWtXW1pKR1xeZ/E4tmsKb/AADmC5HcISI008N6qAZb3hp 2UrWjqEd0UOtC9nVlQesswvXD9QYKaUYqvPXazujPkCfwoY2LwvAQ+dFR+KNXMakFD MK0Ms+CkWg9nJuuzex4fZo4CxhWInZ1CFfIWxmUYk1GrFNmtLg13+tdKO4MFpJni6A ZJX8EbmUw/AdA== From: Arnd Bergmann To: Stefan Schaeckeler , Borislav Petkov , Mauro Carvalho Chehab , Tony Luck , Joel Stanley , Troy Lee Cc: 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: [PATCH] EDAC/aspeed: use proper format string for printing resource Date: Wed, 21 Apr 2021 15:54:53 +0200 Message-Id: <20210421135500.3518661-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.29.2