From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59744C433F5 for ; Sun, 7 Nov 2021 16:43:44 +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 28F4C61052 for ; Sun, 7 Nov 2021 16:43:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 28F4C61052 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org 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 22371837D9; Sun, 7 Nov 2021 17:43:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="NdbMZhg1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 97844837DE; Sun, 7 Nov 2021 17:43:37 +0100 (CET) Received: from mail-ua1-x930.google.com (mail-ua1-x930.google.com [IPv6:2607:f8b0:4864:20::930]) (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 07233837C0 for ; Sun, 7 Nov 2021 17:43:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-ua1-x930.google.com with SMTP id b17so27151830uas.0 for ; Sun, 07 Nov 2021 08:43:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=+i6CScFFHkH7H82Ljfx4eaVwpV/OJ/JfSQgcCOB+bGA=; b=NdbMZhg1R9mgRjld1SPRLQvU4VtRGu4ILcHKJCD/vk4JnFSLPafIF2fRJpajMtCh68 uxSC6gFLvbvToKFPQvjsBzUAtxTN9hdjDZG2FdlnogBIcJefb4MHPo2qNhusIQIjTd1U szGUg84ZobqyhePRiHtKTdLO9Vig/Aldjdzps= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=+i6CScFFHkH7H82Ljfx4eaVwpV/OJ/JfSQgcCOB+bGA=; b=xDoBpusqGiGhzDDRNuwByBPsSMNM7fiBxrFIUmdYO7TFXXDwFatnA3mYpMF4dslunx nng1CndtwaGNIcm3kdLcwS9CPt+6nqd59avMhWgoK1to/89p88WrO8MMaSiOs6C22gst UQGFzfumQlY46oS/TWeQuytNKhi7Pbljc9lvbrKFPSr5J5G917clb7guEYXXZl13C1RT tHCNGa5ivvnNIlDjAbI+T2HYsGelYNLr+kexOl2oWxfdjl/p5WTYpq22bLOSuXMNlexU 5WiUxKnwiDk17UmtQlMd0DedRj+l2LwhXhdI6bDfhUg0MeC6zXdqIuXEkjUWd2qHhIVY glbg== X-Gm-Message-State: AOAM532iqtfWAUINQiNrAik+S/dLmM4L08x/JenBvSBi7wrneYRU64rL Kmz/k5TgZGlsfovtyxHDKU9rtHqWfzcWGk3uxKCe7w== X-Google-Smtp-Source: ABdhPJyyV/KfyVxKnyl7r+DsUmfELT7PHK23psfanfghbf6IJD4rn0qk2VTqEaD29LoW4UXRmQB0p2CY0VHt+bLRjF8= X-Received: by 2002:a67:db0b:: with SMTP id z11mr15139738vsj.59.1636303412266; Sun, 07 Nov 2021 08:43:32 -0800 (PST) MIME-Version: 1.0 References: <20211105200952.47866-1-andriy.shevchenko@linux.intel.com> <20211105200952.47866-2-andriy.shevchenko@linux.intel.com> In-Reply-To: From: Simon Glass Date: Sun, 7 Nov 2021 09:43:20 -0700 Message-ID: Subject: Re: [PATCH v1 2/2] image: Explicitly declare do_bdinfo() To: Andy Shevchenko Cc: Andy Shevchenko , Ovidiu Panait , "u-boot@lists.denx.de" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hi Andy, On Sat, 6 Nov 2021 at 01:59, Andy Shevchenko wr= ote: > > > > On Saturday, November 6, 2021, Simon Glass wrote: >> >> Hi Andy, >> >> On Fri, 5 Nov 2021 at 14:10, Andy Shevchenko >> wrote: >> > >> > Compiler is not happy: >> > >> > common/image-board.c: In function =E2=80=98boot_get_kbd=E2=80=99: >> > common/image-board.c:902:17: warning: implicit declaration of function= =E2=80=98do_bdinfo=E2=80=99 [-Wimplicit-function-declaration] >> > 902 | do_bdinfo(NULL, 0, 0, NULL); >> > | ^~~~~~~~~ >> > >> > Move the forward declaration to a header. >> > >> > Signed-off-by: Andy Shevchenko >> > --- >> > common/image.c | 5 ----- >> > include/init.h | 5 +++++ >> > 2 files changed, 5 insertions(+), 5 deletions(-) >> > >> > diff --git a/common/image.c b/common/image.c >> > index 3fa60b582796..57bf86278149 100644 >> > --- a/common/image.c >> > +++ b/common/image.c >> > @@ -29,11 +29,6 @@ >> > #include >> > #include >> > >> > -#ifdef CONFIG_CMD_BDI >> > -extern int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, >> > - char *const argv[]); >> > -#endif >> > - >> > DECLARE_GLOBAL_DATA_PTR; >> > >> > /* Set this if we have less than 4 MB of malloc() space */ >> > diff --git a/include/init.h b/include/init.h >> > index c781789e367e..37ca9905414f 100644 >> > --- a/include/init.h >> > +++ b/include/init.h >> > @@ -332,6 +332,11 @@ void bdinfo_print_mhz(const char *name, unsigned = long hz); >> > /* Show arch-specific information for the 'bd' command */ >> > void arch_print_bdinfo(void); >> > >> > +#if defined(CONFIG_CMD_BDI) >> > +extern int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, >> > + char *const argv[]); >> > +#endif >> >> Can we drop the #if..#endif? > > > No, AFAICT, but you can do it later somehow. Currently this fixes a warni= ng. I mean drop the #if line and the #endif line. We try to avoid this sort that things like IS_ENABLED() work. Also please drop the 'extern'. > >> >> >> > + >> > #endif /* __ASSEMBLY__ */ >> > /* Put only stuff here that the assembler can digest */ >> > >> > -- >> > 2.33.0 >> > >> Regards, SImon