From patchwork Thu May 20 23:07:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 12271579 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 2E80DC43618 for ; Thu, 20 May 2021 23:08:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08EAB613C4 for ; Thu, 20 May 2021 23:08:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233520AbhETXKR (ORCPT ); Thu, 20 May 2021 19:10:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233304AbhETXKJ (ORCPT ); Thu, 20 May 2021 19:10:09 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C21EC06138B; Thu, 20 May 2021 16:08:47 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id 131so21797567ljj.3; Thu, 20 May 2021 16:08:47 -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=vyfuUJygPypv3PLq8+UwCGzuqV5dXIOCDthlvjoInWA=; b=lrCzowrEA2YL5iBi5edNzQ+WSfZSB+9c0qNQDEe3fkMhAStJG0QnIVnJe4Q/aV6RcG 55LDUra4Qrct/27K3vrAmF7egfwsr3FmU6PDzPDkgZh/4dRBjI0gWvkBJ4llg+PF/9zi mmyr1WgOlnpTLWApwP4H2XzUONL5NFszPF9ZwgBVt+f2lAVMOw+E5utIa7vTDBH5lVSH uBzzSlXy48vpO/TKgXQ+V2uYkzIbahqKnWyIyMGHUnPY1jsaLhNoQSiBMD6eeUrC2cIt rOmW5YYH8tEHJry44EMhZ44jOxVKKpUkpsqByx1397N1NQAxFq8obRqpsrc/CqtMNyag 9rZg== 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=vyfuUJygPypv3PLq8+UwCGzuqV5dXIOCDthlvjoInWA=; b=nmCDJUy/R1tK/9RokBncUZSOSmrEpWctmb2RQdYxIDKbgsA0a2+Z24WNqsNFcBVjMw jYy66LFSxj5VR8gyXlT9+MIHU2PjLvu/lAMBIDQqt4t16Ci8CWpz7gAFVeRoRkj3LzXp 6KUd6ZkiZtNHH/mj4Uyj8zRKcVWFIHFZTuSayShrqjHj4HLXyOIN3908gnxYYx7Pppz7 V4L7d+MT1iLsdvZWs1V/P3l/c5Amd6DjFW3TPRbPhKTgAr/xla3ZnyH7XpzSC82BwEJh U1UcIH8YasvR8zL0wY+5y2RH3N39TzOEqVX/KKy3DA8WmNFOmeqIPk2Yw0DGewWGPgHG Qw+Q== X-Gm-Message-State: AOAM533fng/RE8tAd/Fb32XUuFW9voRmGU6ZkjhcFHxkUX8gEPxVGO1U Lu9rJf35xTCjCvJ+jIRK+RA= X-Google-Smtp-Source: ABdhPJy4cHP6cqgA7BLVTv7uNonvfnAu9aOfdSUF9/JoTjuLftMsSikVyUxDnan3jb7UqTzaDAWQ0w== X-Received: by 2002:a05:651c:1404:: with SMTP id u4mr4456555lje.451.1621552125727; Thu, 20 May 2021 16:08:45 -0700 (PDT) Received: from localhost.localdomain (109-252-193-76.dynamic.spd-mgts.ru. [109.252.193.76]) by smtp.gmail.com with ESMTPSA id 4sm427821lfr.175.2021.05.20.16.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 May 2021 16:08:45 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= , =?utf-8?q?N?= =?utf-8?q?ikola_Milosavljevi=C4=87?= , Ulf Hansson , Peter Geis , Nicolas Chauvet , Viresh Kumar , Stephen Boyd , Matt Merhar , Paul Fertser , Krzysztof Kozlowski , Mikko Perttunen Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, Mark Brown , Liam Girdwood , devicetree@vger.kernel.org, linux-pm@vger.kernel.org, Nathan Chancellor , linux-clk@vger.kernel.org Subject: [PATCH v1 07/13] memory: tegra: Fix compilation warnings on 64bit platforms Date: Fri, 21 May 2021 02:07:45 +0300 Message-Id: <20210520230751.26848-8-digetx@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210520230751.26848-1-digetx@gmail.com> References: <20210520230751.26848-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@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 Signed-off-by: Dmitry Osipenko Reviewed-by: Krzysztof Kozlowski --- 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)