From patchwork Wed Jun 16 09:27:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 461568 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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT 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 BBE0AC48BE8 for ; Wed, 16 Jun 2021 09:27:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8F98761241 for ; Wed, 16 Jun 2021 09:27:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232303AbhFPJ37 (ORCPT ); Wed, 16 Jun 2021 05:29:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232284AbhFPJ36 (ORCPT ); Wed, 16 Jun 2021 05:29:58 -0400 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12F54C061760 for ; Wed, 16 Jun 2021 02:27:51 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:cc2e:97ae:7127:22f8]) by albert.telenet-ops.be with bizsmtp id HlTo2500h51zX4F06lToBR; Wed, 16 Jun 2021 11:27:49 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1ltRps-0009M7-GT; Wed, 16 Jun 2021 11:27:48 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1ltRpr-0060Z3-Nn; Wed, 16 Jun 2021 11:27:47 +0200 From: Geert Uytterhoeven To: Rob Herring , Frank Rowand , Marek Szyprowski Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 2/3] of: Remove superfluous casts when printing u64 values Date: Wed, 16 Jun 2021 11:27:45 +0200 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org "u64" is "unsigned long long" on all architectures now. Hence there is no longer a need to use casts when formatting using the "ll" length modifier. Signed-off-by: Geert Uytterhoeven --- drivers/of/address.c | 14 ++++---------- drivers/of/fdt.c | 6 ++---- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/of/address.c b/drivers/of/address.c index 350b2baa0af38497..c04fce0fb1790cb6 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -78,9 +78,7 @@ static u64 of_bus_default_map(__be32 *addr, const __be32 *range, s = of_read_number(range + na + pna, ns); da = of_read_number(addr, na); - pr_debug("default map, cp=%llx, s=%llx, da=%llx\n", - (unsigned long long)cp, (unsigned long long)s, - (unsigned long long)da); + pr_debug("default map, cp=%llx, s=%llx, da=%llx\n", cp, s, da); if (da < cp || da >= (cp + s)) return OF_BAD_ADDR; @@ -187,9 +185,7 @@ static u64 of_bus_pci_map(__be32 *addr, const __be32 *range, int na, int ns, s = of_read_number(range + na + pna, ns); da = of_read_number(addr + 1, na - 1); - pr_debug("PCI map, cp=%llx, s=%llx, da=%llx\n", - (unsigned long long)cp, (unsigned long long)s, - (unsigned long long)da); + pr_debug("PCI map, cp=%llx, s=%llx, da=%llx\n", cp, s, da); if (da < cp || da >= (cp + s)) return OF_BAD_ADDR; @@ -302,9 +298,7 @@ static u64 of_bus_isa_map(__be32 *addr, const __be32 *range, int na, int ns, s = of_read_number(range + na + pna, ns); da = of_read_number(addr + 1, na - 1); - pr_debug("ISA map, cp=%llx, s=%llx, da=%llx\n", - (unsigned long long)cp, (unsigned long long)s, - (unsigned long long)da); + pr_debug("ISA map, cp=%llx, s=%llx, da=%llx\n", cp, s, da); if (da < cp || da >= (cp + s)) return OF_BAD_ADDR; @@ -459,7 +453,7 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus, finish: of_dump_addr("parent translation for:", addr, pna); - pr_debug("with offset: %llx\n", (unsigned long long)offset); + pr_debug("with offset: %llx\n", offset); /* Translate it into parent bus space */ return pbus->translate(addr, offset, pna); diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 970fa8cdc9303195..344f16bb04ccf081 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -900,8 +900,7 @@ static void __init early_init_dt_check_for_initrd(unsigned long node) phys_initrd_start = start; phys_initrd_size = end - start; - pr_debug("initrd_start=0x%llx initrd_end=0x%llx\n", - (unsigned long long)start, (unsigned long long)end); + pr_debug("initrd_start=0x%llx initrd_end=0x%llx\n", start, end); } #else static inline void early_init_dt_check_for_initrd(unsigned long node) @@ -1027,8 +1026,7 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname, if (size == 0) continue; - pr_debug(" - %llx , %llx\n", (unsigned long long)base, - (unsigned long long)size); + pr_debug(" - %llx, %llx\n", base, size); early_init_dt_add_memory_arch(base, size); From patchwork Wed Jun 16 09:27:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 461567 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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT 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 DE122C49361 for ; Wed, 16 Jun 2021 09:27:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BF8CE6024A for ; Wed, 16 Jun 2021 09:27:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232306AbhFPJ37 (ORCPT ); Wed, 16 Jun 2021 05:29:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232043AbhFPJ36 (ORCPT ); Wed, 16 Jun 2021 05:29:58 -0400 Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E230C061767 for ; Wed, 16 Jun 2021 02:27:51 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:cc2e:97ae:7127:22f8]) by michel.telenet-ops.be with bizsmtp id HlTo2500d51zX4F06lToiJ; Wed, 16 Jun 2021 11:27:49 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1ltRps-0009M8-AF; Wed, 16 Jun 2021 11:27:48 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1ltRpr-0060ZB-Og; Wed, 16 Jun 2021 11:27:47 +0200 From: Geert Uytterhoeven To: Rob Herring , Frank Rowand , Marek Szyprowski Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 3/3] of: kexec: Always use FDT_PROP_INITRD_START and FDT_PROP_INITRD_END Date: Wed, 16 Jun 2021 11:27:46 +0200 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Commit b30be4dc733e5067 ("of: Add a common kexec FDT setup function") introduced macros FDT_PROP_INITRD_* to refer to initrd properties, but didn't use them everywhere. Convert the remaining users from string literals to macros. Signed-off-by: Geert Uytterhoeven --- drivers/of/kexec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/of/kexec.c b/drivers/of/kexec.c index f335d941a716e841..3fe585d5a82732e7 100644 --- a/drivers/of/kexec.c +++ b/drivers/of/kexec.c @@ -318,13 +318,13 @@ void *of_kexec_alloc_and_setup_fdt(const struct kimage *image, goto out; /* Did we boot using an initrd? */ - prop = fdt_getprop(fdt, chosen_node, "linux,initrd-start", NULL); + prop = fdt_getprop(fdt, chosen_node, FDT_PROP_INITRD_START, NULL); if (prop) { u64 tmp_start, tmp_end, tmp_size; tmp_start = fdt64_to_cpu(*((const fdt64_t *) prop)); - prop = fdt_getprop(fdt, chosen_node, "linux,initrd-end", NULL); + prop = fdt_getprop(fdt, chosen_node, FDT_PROP_INITRD_END, NULL); if (!prop) { ret = -EINVAL; goto out;