From patchwork Thu May 27 21:43:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 448958 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 D1598C4708D for ; Thu, 27 May 2021 21:44:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B35E3613C9 for ; Thu, 27 May 2021 21:44:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235928AbhE0Vpn (ORCPT ); Thu, 27 May 2021 17:45:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235193AbhE0Vpf (ORCPT ); Thu, 27 May 2021 17:45:35 -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 7110BC0613CE; Thu, 27 May 2021 14:43:59 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id f30so2281695lfj.1; Thu, 27 May 2021 14:43:59 -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=UvAFDXd9ZhY5H5Qe2SorzXqtsMKT7W8IWcpABGT7kN0kOSrqn0hnfOywyzzdF/5dIC jfCM/qF9WtOkERpUUU/URO/lGzjf29oxT61cfsn5zSZxKeRbSoeooIynAkmybiSi93ty t0s5Pdekqd/sbk5sRPA+NQLX/L2QRbJvhKIl/eYlaJDdmkRwdotVCzjZaamWZ4Delaai sDcjpnqTQohwNKNImQ0GtvGASqdI6wLyj426CXdcQ2NTWNrCDxvxu5PFfznz1AkVvK5H 57iHwJ+EnhBWH+s//jcMVMa6mLl3bW2JOSDUJELpoBb1CacxuDkbhA7PP0AwhQlz8gUR GmLw== 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=VjFnbs4/soII4Bx4zCY+VzjS8aE0t37t67gaQfm6L+kdVK+BrJaWelWaKvAi1Wc0tz GNZx22UiK0QyC0oFFZyKSF7XIM4qZWjFx3jXJ9tRc7qCgKkA4OQyLUArYgSJXgBEvh3Q acBzfDsOZ0GMMpNJY4b7kASPCku2td7B1q8zJIlMcFvDNVDzUb4LzMu8vr8oXlmJwF0C bF/nGayOUeHsgWarObAZ3jeloJGrqtqGaWUW+FbcxwVs+yYv1FbPtJwJ3kO+pdLp1KZ6 SS0OTw5N+QFWVk2c8j+MoAQg8d8+/h5ntbCKBVi9Pw8ZoUmkUo2XFEPTFMNdi4/Oo1Fl Utdg== X-Gm-Message-State: AOAM532P3HeG/3DxhqVJWIOY0ylJeTDSo9q/ww+BXq8H/LBDFvDoj1fB xF3zscR90CT3Yaf7gn75zPo= X-Google-Smtp-Source: ABdhPJy5GkP3F1HXH3SDY5dJLOmOHXkyM1oICtkpsLFoDAOVoOlhJiVL9lgrhtoSTX2C92/Kqo7LXA== X-Received: by 2002:ac2:4281:: with SMTP id m1mr3505892lfh.164.1622151837830; Thu, 27 May 2021 14:43:57 -0700 (PDT) Received: from localhost.localdomain (46-138-12-55.dynamic.spd-mgts.ru. [46.138.12.55]) by smtp.gmail.com with ESMTPSA id v11sm298153lfr.44.2021.05.27.14.43.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 14:43:57 -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 v4 07/14] memory: tegra: Fix compilation warnings on 64bit platforms Date: Fri, 28 May 2021 00:43:10 +0300 Message-Id: <20210527214317.31014-8-digetx@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210527214317.31014-1-digetx@gmail.com> References: <20210527214317.31014-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)