From patchwork Mon May 13 10:46:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1098793 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=toradex.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 452cvH7533z9s4Y for ; Mon, 13 May 2019 20:46:51 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 66F72C21F07; Mon, 13 May 2019 10:46:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B61ABC21E35; Mon, 13 May 2019 10:46:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id CE388C21DFD; Mon, 13 May 2019 10:46:40 +0000 (UTC) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by lists.denx.de (Postfix) with ESMTPS id 83400C21C57 for ; Mon, 13 May 2019 10:46:40 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id e15so2277548wrs.4 for ; Mon, 13 May 2019 03:46:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xA1F/B4CfTN9CiPo/QlR49gN1GLCD/t4omXP09jV20g=; b=HvhSdydchWDKiyo/rhaglGR/zyGFYeg0HRnQsm4AwdKrw2HRi2EbleEUNP344UTXzF WUFC807yaeJjIQN0CNy32JLnuAFsr7kx/5NiiWrE2sJwWaO9X+sHl1suqGhLiXj7YOl/ sWDaRjnnlqeVQn0BgYVE8WhrVOuFm954w+Q6oIGWzdlK8TZ2lpCze6IsUWiCLU/QPaZx Q1g6TxZ9mQsmMugIQLL2JCzULgP4rDMXz1Hpd59z839kp7u3p81uuuQ2r+yUEFyHIGBO gktsWE+cToOYEJde8uARAtq16bI+4YVa1cWX+gah2qyK2t+Z4w2vQEk/Vj8pQGGkrqBk cRXA== X-Gm-Message-State: APjAAAUKp6+dKr+P1Bhrq0Rd0a7n+WKrrXqYxJA9j4+cKTV/uiZ7SiEk NlMzjW0bvd/aw7wfbCOirtp24OIY X-Google-Smtp-Source: APXvYqxMYwBYRk79hMLamLGWGrJ9aEUJ/iCxsVYmHFP/ywPxw+e7JU/ynAgK7MFQH1FcOzQL2HaxOQ== X-Received: by 2002:adf:a202:: with SMTP id p2mr17096266wra.166.1557744399858; Mon, 13 May 2019 03:46:39 -0700 (PDT) Received: from localhost ([194.105.145.90]) by smtp.gmail.com with ESMTPSA id o8sm27317137wra.4.2019.05.13.03.46.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 May 2019 03:46:39 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Date: Mon, 13 May 2019 13:46:38 +0300 Message-Id: <20190513104638.9326-1-igor.opaniuk@toradex.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Cc: max.krummenacher@toradex.com, marcel.ziswiler@toradex.com, marcel@ziswiler.com, uboot-imx@nxp.com Subject: [U-Boot] [PATCH 1/1] imx8: cpu: fix warning for cpu_imx_get_temp X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" cpu_imx_get_temp() definition is wrapped with a ifdef macro, therefore all function references should be also wrapped the same way instead IS_ENABLED() usage. Fix warning: arch/arm/mach-imx/imx8/cpu.c: In function ‘cpu_imx_get_desc’: arch/arm/mach-imx/imx8/cpu.c:612:40: warning: implicit declaration of function ‘cpu_imx_get_temp’; did you mean ‘cpu_imx_get_desc’? [-Wimplicit-function-declaration] ret = snprintf(buf, size, " at %dC", cpu_imx_get_temp()); ^~~~~~~~~~~~~~~~ cpu_imx_get_desc cpu_imx_get_desc Fixes: 82467cb217 ("imx8: cpu: get temperature when print cpu desc") Signed-off-by: Igor Opaniuk --- arch/arm/mach-imx/imx8/cpu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c index 12596c6387..616baed7cc 100644 --- a/arch/arm/mach-imx/imx8/cpu.c +++ b/arch/arm/mach-imx/imx8/cpu.c @@ -606,11 +606,11 @@ int cpu_imx_get_desc(struct udevice *dev, char *buf, int size) ret = snprintf(buf, size, "NXP i.MX8%s Rev%s %s at %u MHz", plat->type, plat->rev, plat->name, plat->freq_mhz); - if (IS_ENABLED(CONFIG_IMX_SCU_THERMAL)) { - buf = buf + ret; - size = size - ret; - ret = snprintf(buf, size, " at %dC", cpu_imx_get_temp()); - } +#if defined(CONFIG_IMX_SCU_THERMAL) + buf = buf + ret; + size = size - ret; + ret = snprintf(buf, size, " at %dC", cpu_imx_get_temp()); +#endif snprintf(buf + ret, size - ret, "\n");