From patchwork Tue Jun 1 02:31:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 451561 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,USER_AGENT_GIT autolearn=unavailable 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 EB1DCC4709D for ; Tue, 1 Jun 2021 02:33:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CA0EA6101C for ; Tue, 1 Jun 2021 02:33:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232836AbhFACfQ (ORCPT ); Mon, 31 May 2021 22:35:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232744AbhFACfN (ORCPT ); Mon, 31 May 2021 22:35:13 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 140A5C061574; Mon, 31 May 2021 19:33:32 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id bn21so9880048ljb.1; Mon, 31 May 2021 19:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PnHT/nk8CJodgkwuBSRTekimstD88D/By8a3gAk3kxw=; b=k/pMzHgG8hATlQQ+ok7gsve0AhesGFTrdUwA7wPJtgsSWc42ty+QmB6qy7PqiaZLu2 hF++84na4qbiZvNL663+FbDANKfVc0204sE8g8gAKzh04QmIZCBdQxUANyNQ2Nbtw5ri iJdGx2azUU2CriRkaxTQ8ruo0d+2GnuLUz51UolAK6Pm97hzBtGdLhOAyyJo8WS98/qK b+P5Cang85Vgjg7O/TBRZjZLXeUg3wwlWfmnMco2gXvB8w/1bgEUvEumdq1JmFGNUdrD LsoC97RTTuaWcFZB9XK8yLD9/CioFHzGvkmYjjZxg7wT6bznf0j3uA8Mhg/IRw5sc6HO haHA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=PnHT/nk8CJodgkwuBSRTekimstD88D/By8a3gAk3kxw=; b=TlENU4gwy+84/W02aulSz2tAQrt+tmPLYeZouoPOcIMynevrziaFVaMlBHxujpvi2B jUDzhb9ngCmmRw46PfZ573TcfbRnWSN+Ns4iEmohsWAxLe9kT7iVNOchr6rk1qQugDbq AXakyFfRs6E53IeGmxDowSYbuQitCe/bBgW5XRBaUXtK1w+kUxAgQVeRMkwS8GWgZ+kw 9E1YpErXm+t99bVgw395r/KryvQaK4kACnGB/9tv72p2vhvHj7yYRMXRRsJaqc7z6CQC lvGAonUeNy8wvwYzMQUjXMYuw6woMpQBNPzgx5h966aeljn9OpxVnAqbLPB5I3Bbbb3l OSdA== X-Gm-Message-State: AOAM530a/VuU9K11LMS+El3a89kUkkRUI8PTpUtxdcCFJZxCN9X3w/QL O29kAhAmDIZbUz+D/6fCRBA= X-Google-Smtp-Source: ABdhPJxBnzJ//qQTiZyjhsMUjoiChvAsrs9NG52I4Fd0TKkWTwm4SPzvR8WVOeKEFs8xpuyMVQukXQ== X-Received: by 2002:a2e:908e:: with SMTP id l14mr18933182ljg.372.1622514810502; Mon, 31 May 2021 19:33:30 -0700 (PDT) Received: from localhost.localdomain (79-139-170-222.dynamic.spd-mgts.ru. [79.139.170.222]) by smtp.gmail.com with ESMTPSA id l21sm107848lfc.28.2021.05.31.19.33.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 May 2021 19:33:30 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= , =?utf-8?q?Nikola_Milosavljevi=C4=87?= , Ulf Hansson , Peter Geis , Nicolas Chauvet , Viresh Kumar , Stephen Boyd , Matt Merhar , Paul Fertser , Mark Brown , Liam Girdwood , Krzysztof Kozlowski , Mikko Perttunen Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, Nathan Chancellor , linux-clk@vger.kernel.org Subject: [PATCH v6 07/14] memory: tegra: Fix compilation warnings on 64bit platforms Date: Tue, 1 Jun 2021 05:31:12 +0300 Message-Id: <20210601023119.22044-8-digetx@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210601023119.22044-1-digetx@gmail.com> References: <20210601023119.22044-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Fix compilation warning on 64bit platforms caused by implicit promotion of 32bit signed integer to a 64bit unsigned value which happens after enabling compile-testing of the EMC drivers. Reported-by: kernel test robot Reviewed-by: Nathan Chancellor Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra124-emc.c | 4 ++-- drivers/memory/tegra/tegra30-emc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/memory/tegra/tegra124-emc.c b/drivers/memory/tegra/tegra124-emc.c index 5699d909abc2..a21ca8e0841a 100644 --- a/drivers/memory/tegra/tegra124-emc.c +++ b/drivers/memory/tegra/tegra124-emc.c @@ -272,8 +272,8 @@ #define EMC_PUTERM_ADJ 0x574 #define DRAM_DEV_SEL_ALL 0 -#define DRAM_DEV_SEL_0 (2 << 30) -#define DRAM_DEV_SEL_1 (1 << 30) +#define DRAM_DEV_SEL_0 BIT(31) +#define DRAM_DEV_SEL_1 BIT(30) #define EMC_CFG_POWER_FEATURES_MASK \ (EMC_CFG_DYN_SREF | EMC_CFG_DRAM_ACPD | EMC_CFG_DRAM_CLKSTOP_SR | \ diff --git a/drivers/memory/tegra/tegra30-emc.c b/drivers/memory/tegra/tegra30-emc.c index 829f6d673c96..a2f2738ccb94 100644 --- a/drivers/memory/tegra/tegra30-emc.c +++ b/drivers/memory/tegra/tegra30-emc.c @@ -150,8 +150,8 @@ #define EMC_SELF_REF_CMD_ENABLED BIT(0) #define DRAM_DEV_SEL_ALL (0 << 30) -#define DRAM_DEV_SEL_0 (2 << 30) -#define DRAM_DEV_SEL_1 (1 << 30) +#define DRAM_DEV_SEL_0 BIT(31) +#define DRAM_DEV_SEL_1 BIT(30) #define DRAM_BROADCAST(num) \ ((num) > 1 ? DRAM_DEV_SEL_ALL : DRAM_DEV_SEL_0)