lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220727031100.112919-3-xuqiang36@huawei.com>
Date:   Wed, 27 Jul 2022 03:11:00 +0000
From:   Xu Qiang <xuqiang36@...wei.com>
To:     <linux@...linux.org.uk>, <robh@...nel.org>,
        <rmk+kernel@...linux.org.uk>, <kirill.shtuemov@...ux.intel.com>,
        <akpm@...ux-foundation.org>, <ardb@...nel.org>, <rppt@...nel.org>,
        <austindh.kim@...il.com>
CC:     <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>, <weiyongjun1@...wei.com>,
        <guohanjun@...wei.com>, <xuqiang36@...wei.com>
Subject: [PATCH -next 3/3] arm: Delete similar code across of_flat_dt_match_machine and setup_machine_fdt

of_flat_dt_match_machine() print compatible content when its
return value is NULL, and setup_machine_fdt print again when
mdesc is NULL. So remove duplicate print codes in setup_machine_fdt.

Signed-off-by: Xu Qiang <xuqiang36@...wei.com>
---
 arch/arm/kernel/devtree.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index 182a59b23b09..b6151bcf31cb 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -208,25 +208,8 @@ const struct machine_desc * __init setup_machine_fdt(void *dt_virt)
 
 	mdesc = of_flat_dt_match_machine(mdesc_best, arch_get_next_mach);
 
-	if (!mdesc) {
-		const char *prop;
-		int size;
-		unsigned long dt_root;
-
-		early_print("\nError: unrecognized/unsupported "
-			    "device tree compatible list:\n[ ");
-
-		dt_root = of_get_flat_dt_root();
-		prop = of_get_flat_dt_prop(dt_root, "compatible", &size);
-		while (size > 0) {
-			early_print("'%s' ", prop);
-			size -= strlen(prop) + 1;
-			prop += strlen(prop) + 1;
-		}
-		early_print("]\n\n");
-
+	if (!mdesc)
 		dump_machine_table(); /* does not return */
-	}
 
 	/* We really don't want to do this, but sometimes firmware provides buggy data */
 	if (mdesc->dt_fixup)
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ