From patchwork Thu Mar 10 06:50:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 12775975 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10B7BC4332F for ; Thu, 10 Mar 2022 06:50:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239910AbiCJGvT (ORCPT ); Thu, 10 Mar 2022 01:51:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238833AbiCJGvR (ORCPT ); Thu, 10 Mar 2022 01:51:17 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9067111AA17; Wed, 9 Mar 2022 22:50:15 -0800 (PST) Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9BxsM6lnyliK0MGAA--.27068S3; Thu, 10 Mar 2022 14:50:13 +0800 (CST) From: Tiezhu Yang To: Thomas Bogendoerfer Cc: Xuefeng Li , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] MIPS: Remove redundant check in device_tree_init() Date: Thu, 10 Mar 2022 14:50:10 +0800 Message-Id: <1646895012-3143-2-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1646895012-3143-1-git-send-email-yangtiezhu@loongson.cn> References: <1646895012-3143-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf9BxsM6lnyliK0MGAA--.27068S3 X-Coremail-Antispam: 1UD129KBjvJXoW7uF18ZryrtF18GF4xAr1kKr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1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org In device_tree_init(), unflatten_and_copy_device_tree() checks initial_boot_params, so remove the redundant check. drivers/of/fdt.c void __init unflatten_and_copy_device_tree(void) { int size; void *dt; if (!initial_boot_params) { pr_warn("No valid device tree found, continuing without\n"); return; } ... } Signed-off-by: Tiezhu Yang --- arch/mips/loongson64/setup.c | 3 --- arch/mips/pic32/pic32mzda/init.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/arch/mips/loongson64/setup.c b/arch/mips/loongson64/setup.c index 6fe3fff..1973eb0 100644 --- a/arch/mips/loongson64/setup.c +++ b/arch/mips/loongson64/setup.c @@ -39,8 +39,5 @@ void __init plat_mem_setup(void) void __init device_tree_init(void) { - if (!initial_boot_params) - return; - unflatten_and_copy_device_tree(); } diff --git a/arch/mips/pic32/pic32mzda/init.c b/arch/mips/pic32/pic32mzda/init.c index 764f2d0..a1860f2 100644 --- a/arch/mips/pic32/pic32mzda/init.c +++ b/arch/mips/pic32/pic32mzda/init.c @@ -80,9 +80,6 @@ void __init prom_init(void) void __init device_tree_init(void) { - if (!initial_boot_params) - return; - unflatten_and_copy_device_tree(); }