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 284EFC433F5 for ; Sat, 6 Nov 2021 03:16:58 +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 8D7A761165 for ; Sat, 6 Nov 2021 03:16:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8D7A761165 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 7B4488374E; Sat, 6 Nov 2021 04:16:49 +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="CXeYZd1D"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1F8DE8327C; Sat, 6 Nov 2021 04:16:40 +0100 (CET) Received: from mail-ua1-x936.google.com (mail-ua1-x936.google.com [IPv6:2607:f8b0:4864:20::936]) (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 12CAC8327C for ; Sat, 6 Nov 2021 04:16:36 +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-x936.google.com with SMTP id az37so20615942uab.13 for ; Fri, 05 Nov 2021 20:16:36 -0700 (PDT) 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=hw2QHxUZMt7jdm9wv4ALqALs0QSAc33baUeOL26jeQw=; b=CXeYZd1DFY6tXJ+BBk/rey9fiZspOS8FWJnLn0/Jzh0X0A83Cx0Z4ZboTFazTsxkXy 6aSdd198Qcaz351K2AVkcP72nEJxpsHptYhditvYqFnNqDLbiaBTojV20tUJj0bDHDzh Rmi7IA2p5Ps+h4cbJRsXF2rAmN6wbWFGWAMHE= 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=hw2QHxUZMt7jdm9wv4ALqALs0QSAc33baUeOL26jeQw=; b=lgsaR0GMB3yRZjSnT6laQdHiOffjr4z+D4L39hLGhToJAQJTvC6n+n+ggdaNb6iMxj M8/94ntvC1w9yyiS1DI8s3V208BM2cUHq/HeVc1Scy5EvrAZQcEjw5Cw5N/78z6fSq7m K1qgY+F8wPurGtPpKnK9zNnh87HnOhnCHk/Cvuiezr9Dm5CCJ+Px+K5sJKBRJztNb1WO xqF5abqOtmKsES1uMU2st0MC0xtKHV1XM3GzPkNBE31GvvBWDvIuYqT6jydBTQLsy/7O 516Sf4T7tf/3fh/Vck0oReKqVI4bGYbGr/lHMp+o35eAfb1zy46rQMBaK5zxLpT4Z5tK xFTg== X-Gm-Message-State: AOAM5322O/L0y6IshCoBrw9yJsfgFlleWEv3P63R+sMywOCfbzqvLb0U xuOdkWI6+mLSVnXRBS1sXdQSj5amp1wREHWodyN0vDjl6A4= X-Google-Smtp-Source: ABdhPJwyt9HZPIS0Tpq53yt4DdraDvXh3hCtOczyrNhNBJGRlk/85AQvbLYmN0HSXrvuLrCTC9G5yNWje+okUfQ5mqw= X-Received: by 2002:ab0:7784:: with SMTP id x4mr22401637uar.143.1636168594663; Fri, 05 Nov 2021 20:16:34 -0700 (PDT) MIME-Version: 1.0 References: <20211105200952.47866-1-andriy.shevchenko@linux.intel.com> <20211105200952.47866-2-andriy.shevchenko@linux.intel.com> In-Reply-To: <20211105200952.47866-2-andriy.shevchenko@linux.intel.com> From: Simon Glass Date: Fri, 5 Nov 2021 21:16:23 -0600 Message-ID: Subject: Re: [PATCH v1 2/2] image: Explicitly declare do_bdinfo() To: Andy Shevchenko Cc: 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 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 lon= g 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? > + > #endif /* __ASSEMBLY__ */ > /* Put only stuff here that the assembler can digest */ > > -- > 2.33.0 > Regards, SImon