Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1272246pxp; Thu, 10 Mar 2022 02:08:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqsmO3n72f+WX0zo6L0Huxwg0mSVNlB1nQBZAlG/CzZUTJdeEJNUd/XWvbl1im/Q6WjCWE X-Received: by 2002:a05:6402:2683:b0:416:7a16:f2bc with SMTP id w3-20020a056402268300b004167a16f2bcmr3460682edd.398.1646906885506; Thu, 10 Mar 2022 02:08:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646906885; cv=none; d=google.com; s=arc-20160816; b=CIBfn6R+fhRhxMbY/SWGqUeOYDFWx+h3aHwIxcIiFutT/bchgWepDuzIjlqSfSSN0P yLeR6CyWQkMag8/0FZ1A48H+perh7/Dg90pUKz1SCvZjSOaRhCKV/vXkXUDT6K6GvEo3 xLU989D3ox0ac81EX9DHT2gAYmHxXaGgS1ynWXJ7p+M866OW8QLXH2vL7GJO6JDhH27K nvphgEAe4pwXpdoQnuxrLxWsgcOP2L4aj1t/TxlNBDUeidBGQ1v3jMxJsoKwCpGAuD/f 8fDjHKtqTfkMd8Fbltd/yp1OoW6y1hPntRU9zLzJXM3gw1BX9dyXe9wTRY8caEwYt+V7 w0NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=XycY1KLIB3oI3dMdMh60HbRg4Nd6NSlRj5a068HZVKc=; b=jhN60qFmjWzh3R1re/d9fmWqjJIkn+By9KRH2K4pjiI1zF95KaPLqrQFNo2gVT/Y2F FM9vTzLv2m0/8LNITK5lNV3GkcKNgfGmN9qkNM9uFPMWx442My9LCHkX6xm2IKKFBIr3 L/xhvyBiWWhClsP/VSl7ij7489PTyu/wGleIvUAu0H3/YfsnEPu3Cmef2mkOq7e6t02/ dGotqrKq7fVLmDKu5dYoQyuyhyHtiaKmLfzIkF3Wmz+sp6OmEZIjGVGQmfh+CTBLLXAC Ovb/c8o+nZm8HhkL/rtR9fgOWlKOhG+Aw2UCeVEJ96PwSAIHphRKFfvElD5zRrMuM4Si VkEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fi23-20020a1709073ad700b006db575f29bcsi2340110ejc.911.2022.03.10.02.07.42; Thu, 10 Mar 2022 02:08:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239934AbiCJGv0 (ORCPT + 99 others); Thu, 10 Mar 2022 01:51:26 -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: 1UD129KBjvJXoW7uF18ZryrtF18GF4xAr1kKrg_yoW8JF4xp3 yFyas7KrW5ur47AFs3CrWkZr15CFZ3Aa1xXay09rWruasxur95Xrs2kFn8Cw1UJr43J3WF 9ryF9w4xWF40yFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUBa14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_Jr4l82xGYIkIc2 x26xkF7I0E14v26r1Y6r1xM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0 Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr1UM2 8EF7xvwVC2z280aVAFwI0_Cr1j6rxdM28EF7xvwVC2z280aVCY1x0267AKxVW0oVCq3wAS 0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2 IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0 Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCY02Avz4vE14v_GF1l42xK82 IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC2 0s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMI IF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF 0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87 Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x0JUy6wZUUUUU= X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(); } -- 2.1.0