From patchwork Sun May 23 23:13:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 446328 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.7 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=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 53ACEC4709F for ; Sun, 23 May 2021 23:14:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B35B6115C for ; Sun, 23 May 2021 23:14:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232269AbhEWXPg (ORCPT ); Sun, 23 May 2021 19:15:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232167AbhEWXP0 (ORCPT ); Sun, 23 May 2021 19:15:26 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 947BEC061345; Sun, 23 May 2021 16:13:55 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id r5so37964013lfr.5; Sun, 23 May 2021 16:13:55 -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=OErM4JnD/gNFlqVqIfLc/n1bSFiUmbHNPFwSueq2QklEP6f+NAhNETDOLYVqxwmbRX ivXdvTxPtUFu4a4y/+LOWquMHqFuWQ65SU5N4S2S3pZudUc/WB8U0M9HXggXHTSZOmOK yV+iNAaGq8KWr283xFa2OqjSeTR6+raNTXq7ueA3fGNDSIO6khcCmQ5zlTSdQ26+AsHW K1Rt6VtvdEu/Vx3edtIBDAiOXjym175w8cpPRTMcYaLSiaesHFGXdSytJ6Ew6AcDG/OM wF46nsWL9PZKiJmAi/lMeTav+kdd/lzUT+bpyviHLQfcYd7k5PiMXO+X5JYlYDgMsH7+ /UFw== 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=EuHfgXag3mIhWMMEmCJ/rNQBAj00ARJtPd9zkrKnBRNQ4GLTbDhtHR1nA5jsfcSovg svxhzMf5m6EblTm12mtODdOhFIhQikMfg5XBMJP19gTdUSNzx+1jdFiYP4uUPbDru0Tg GAV8DhYxR5ip9/ahrpGeX35UkVSsxsSJC2QzZTCsIb+iIJ9AxmZhjA1onIJ9Zg62CXls cKXYYO3mUq5NmsGASy2FavZJi+y7+UrG4Qbe4U7b8YrHgW9AB2p0uHvUAE+eOGeXsksD vefMmImDc/TkhF7axEiKJkQpTeemwKy9EIg967UBkeOtGvltK4OYWVuojYeGQwPzrc63 qdIA== X-Gm-Message-State: AOAM5319nSmqkF/ZWSLFQFoSWBxpDvZ7pQ78MopP4D/A3hjeSLbfR+jQ 5iVA/Qz0c/n/qT6Jwxirtj8= X-Google-Smtp-Source: ABdhPJwHw77jRCGdYpUCUG2K1ICDGwBzfbsCsdbUy3ZzArG9bswCglF7/0ZUFRhjxGhiC0ZSwJl92g== X-Received: by 2002:a05:6512:2399:: with SMTP id c25mr8981296lfv.59.1621811633986; Sun, 23 May 2021 16:13:53 -0700 (PDT) Received: from localhost.localdomain (109-252-193-110.dynamic.spd-mgts.ru. [109.252.193.110]) by smtp.gmail.com with ESMTPSA id p7sm1268619lfr.184.2021.05.23.16.13.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 May 2021 16:13:53 -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 v2 08/14] memory: tegra: Fix compilation warnings on 64bit platforms Date: Mon, 24 May 2021 02:13:29 +0300 Message-Id: <20210523231335.8238-9-digetx@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210523231335.8238-1-digetx@gmail.com> References: <20210523231335.8238-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@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)