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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 8F8B3C433EF for ; Sat, 11 Sep 2021 14:28:08 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EAEA3611BF for ; Sat, 11 Sep 2021 14:28:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EAEA3611BF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B0CCD837FC; Sat, 11 Sep 2021 16:28:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="bDoE8gR5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DADAB837FC; Sat, 11 Sep 2021 16:28:02 +0200 (CEST) Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A5D97837F6 for ; Sat, 11 Sep 2021 16:27:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bmeng.cn@gmail.com Received: by mail-pj1-x1032.google.com with SMTP id w19-20020a17090aaf9300b00191e6d10a19so3414427pjq.1 for ; Sat, 11 Sep 2021 07:27:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=94+w6t3BsW1viZekndpDQwF5fq0yX4xlR6Zjqsmh2L0=; b=bDoE8gR5Exu4n24IpTpX0acl2YtrWcpCx93pQe7ZUnE8yusPVjem/p7YXWtJQ+75rv iVDBLGw37EpYh9HYUN+fQ/T842bPIeSoXFDAyRQEQuQjYyv0sQEBLf7dR4fp7UPFS3oN NZUpTELf3HfluoRYQr5MwvxsgrehUNzptCTE/ByIksEmQPYOQQa+Ik32CmN/RfRdyHcH goRAVH79SxSt4P89p4L2gAG6PkR3AbtJ+9PNwM8bf6/He+iH0WdWDdg/g3FiMlxsVmh2 zmuUBpHPVeh3bqIsXmVq/nHNMDzqnEYGsHVM/1DRUXg7njAoiV2zKcIDknO3KvezdpNk auUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=94+w6t3BsW1viZekndpDQwF5fq0yX4xlR6Zjqsmh2L0=; b=FWg8w4mrif0eadbaxvA7hzNih6/pDA91ESjEBjrfuLX0YWxt9gcUB07ReVL8ai8N5c eRxE9bFFstHSRRTpK8rGgOP/GALGzYzaKJgztx927IM3B7i9viED9Ec5PN7uCsX4AWdh B39PWwtJQMqyUweIqftqY7bFtYCMpttZHsXDZfEoJJElhYCD42gDuLDTfDuE3EBchgLl AQQpMHZsseIcYHyWjo28Ibk8IZMULIJ0sEYOrbRE4sjpaAwqjt5NMv4pzbpJDgTDHUJs K+OBFLsVEZJMNi0+DlRH3T5BrBYJmJQouXh8tVI4dp/jJ0MdXQqdyFH9Qk+kD2Q0LIHJ j7Yg== X-Gm-Message-State: AOAM530sGtFTeLMIfpmB52t7sc0WrCwL8FVI35T7xDsiSfYQPV3Ei5g0 eYuaTOW3Axq8luXaMCtlkxM= X-Google-Smtp-Source: ABdhPJyCFncpg5Bt339OPMLpsiaUrnJbMQCp/9FUzroQAo/yb0Xgc06XDir8jBq5weMHfYlhwfhr2A== X-Received: by 2002:a17:902:7687:b0:13a:8c8:dbc6 with SMTP id m7-20020a170902768700b0013a08c8dbc6mr2530226pll.89.1631370476658; Sat, 11 Sep 2021 07:27:56 -0700 (PDT) Received: from i9-aorus-gtx1080.localdomain (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id u9sm2305013pgp.83.2021.09.11.07.27.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 07:27:56 -0700 (PDT) From: Bin Meng To: Zong Li , Leo Yu-Chi Liang , Rick Chen , u-boot@lists.denx.de Subject: [PATCH] board: sifive: overwrite board_fdt_blob_setup in u-boot proper Date: Sat, 11 Sep 2021 22:27:48 +0800 Message-Id: <20210911142748.10074-1-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Commit 47d73ba4f4a4 ("board: sifive: overwrite board_fdt_blob_setup in u-boot proper") added a board-specific implementation of board_fdt_blob_setup() which takes a pointer as the return value, but it does not return anything if CONFIG_OF_SEPARATE is not enabled. This will cause a build warning seen when testing booting S-mode U-Boot directly from QEMU, per the instructions in [1]: board/sifive/unleashed/unleashed.c: In function ‘board_fdt_blob_setup’: board/sifive/unleashed/unleashed.c:125:1: warning: control reaches end of non-void function [-Wreturn-type] Return &_end as the default case. [1] https://qemu.readthedocs.io/en/latest/system/riscv/sifive_u.html#running-u-boot Signed-off-by: Bin Meng --- board/sifive/unleashed/unleashed.c | 4 ++-- board/sifive/unmatched/unmatched.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/board/sifive/unleashed/unleashed.c b/board/sifive/unleashed/unleashed.c index 8cd514df30..33baeda986 100644 --- a/board/sifive/unleashed/unleashed.c +++ b/board/sifive/unleashed/unleashed.c @@ -119,9 +119,9 @@ void *board_fdt_blob_setup(void) if (IS_ENABLED(CONFIG_OF_SEPARATE)) { if (gd->arch.firmware_fdt_addr) return (ulong *)gd->arch.firmware_fdt_addr; - else - return (ulong *)&_end; } + + return (ulong *)&_end; } int board_init(void) diff --git a/board/sifive/unmatched/unmatched.c b/board/sifive/unmatched/unmatched.c index d90b252bae..8773b660fa 100644 --- a/board/sifive/unmatched/unmatched.c +++ b/board/sifive/unmatched/unmatched.c @@ -16,9 +16,9 @@ void *board_fdt_blob_setup(void) if (IS_ENABLED(CONFIG_OF_SEPARATE)) { if (gd->arch.firmware_fdt_addr) return (ulong *)gd->arch.firmware_fdt_addr; - else - return (ulong *)&_end; } + + return (ulong *)&_end; } int board_init(void) -- 2.25.1