Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2898560pxj; Mon, 17 May 2021 12:30:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtdsPMPvtkjS3zEcVapxDNVj5lKFufATyF1TLb3iQrM04tQ2VoyhuZkMvdyecrewA06aht X-Received: by 2002:a50:d69c:: with SMTP id r28mr2017527edi.64.1621279837741; Mon, 17 May 2021 12:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621279837; cv=none; d=google.com; s=arc-20160816; b=KnSUgc3ak/g4y3OqNU2/kg7c0Y45LHPISvQMGiz8iAYo+8SuXs4W4L3nQQoHMCLLSR KYrvDVXauElrIz89l6pob5J2lfuJ/p3ZMmcC/XugiLl2Tpic2WyZlx6AA8a8VJ64Llaj b+whC+EtKjt6MZxICPOokZuo0upRZDfdGFRGo0oB+3DV+PZvP2p7sfo5GoYr5UquVSr/ 9K57O21M7wM3pN1MSozAXllw59ZLzKPjyMqfGJfuGGN69MEcwz1gRms9E3GLqFuAxL2g gy0xTbLmwrxPFPM39Eo2sszEAEmLgvZf43u7lAptQIHp40v8nQHos3pFHlTODAG1v0Zb YUbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=WQqDABHDGgDQCU0WnTFwCSsQA9jF51qzAZtjkZ18AOU=; b=ilSDuSFuvGwaORjhRPqbCHR4hqZWAg6IxEccpyItHkq5ngsJjGNYaXDsvIlmZZuesd DkR2PZt/ZhNPjs5zcANjLYt8CRkNfMa6pdANbd08I7mTqaYAaaSotADcXdSt0gosFGR+ 1ga/wSZV//d9V8BebyK4MAYPyY4Lo4nNTLYh5vZfzzshFcKSwKx5dXk+EUBTCCDW+LtW TbIW+rSAxUmllTNjI8imu0mrknhEywby3yRUbHOFK31xPeuzlvkUmbh/tOUf0tfaYB4e JyPP6tnhIthOWC10APfv7M9p1AkSJ9v/tXoqQVadSna4QC9aJhTRLRVK5VgTu6EZ8bgl 2V6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I1RXfaR+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si9116216ejt.443.2021.05.17.12.30.14; Mon, 17 May 2021 12:30:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I1RXfaR+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237385AbhEQNhI (ORCPT + 99 others); Mon, 17 May 2021 09:37:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237379AbhEQNhH (ORCPT ); Mon, 17 May 2021 09:37:07 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03EF4C061756; Mon, 17 May 2021 06:35:50 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id v6so7280082ljj.5; Mon, 17 May 2021 06:35:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=WQqDABHDGgDQCU0WnTFwCSsQA9jF51qzAZtjkZ18AOU=; b=I1RXfaR+fQaCMswosSWi6tpGukzhRb3nEIRrgwDshVD4JWgGPCaYncHyUcfiGgpTYv q8+LYoXpZ4yUAJdPJgbAxMAx0Xompgtm5vMgehYbmlEdmBPghejbOxbr1iO9JTrznqdQ FRDLcCYbmyeis2gIfFsnoM06Vb4a4meVjfQ9kz24/DlNHeSlugf6YMpg7O6VS8DIjcLU oLce8CT73ZVcZMdAisEVg6rID4detd8vdc1giOQUDmDTZArfjJeFyrZt/0/l+c9djIiZ mOJLullq7A1zmTyNWeJnbos7uQPPgldvpBRugOfsSSvdCronpcATZjBfntWkAIyLv9yt MTKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WQqDABHDGgDQCU0WnTFwCSsQA9jF51qzAZtjkZ18AOU=; b=PndERzeBVDFftRGNhF/KLCSizDrgp0wxfb1gMLfXCcsV1HB2HmHhn1tah7IRFmY5KE PkYxaJSw6KfG5lO0zES67OY5LGd6j0g5jqqkzsHqeJ93kSL4mCtBnJtFsuwzfZoBLJ3F IBmfLK3pbVkV4EOrzfAYBJp3+YaeR9WNsAVsDNJDEOJxrEovJNO295/qP6ohoFcfJueJ gzxuGckLLNeIUkaRMIDJlXnvHW4AaLFC0+S9drJQOVOH4apRJfwB26lfDLtodxdm8Ywt JYzXnNmMHLHvi+znjacnGWGJNXxAuajnjU+s6ennYJ4HtGlBGcRlE4bxytcdx3i3vmbI DzTA== X-Gm-Message-State: AOAM531tcWK8kXr8FfLQfsjGdUarqnVI+TH5Bj6Iy02qALJJXVnINvet bbmmiOQ906AB+YFon7NI6wfNlfgFJ0I= X-Received: by 2002:a2e:b4b1:: with SMTP id q17mr41060196ljm.40.1621258548300; Mon, 17 May 2021 06:35:48 -0700 (PDT) Received: from [192.168.2.145] (109-252-193-91.dynamic.spd-mgts.ru. [109.252.193.91]) by smtp.googlemail.com with ESMTPSA id a9sm145819ljb.73.2021.05.17.06.35.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 May 2021 06:35:47 -0700 (PDT) Subject: Re: [PATCH v2 3/4] memory: tegra124-emc: Fix compilation warnings on 64bit platforms To: Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter , Stephen Boyd , Nathan Chancellor , Mikko Perttunen Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org References: <20210516161214.4693-1-digetx@gmail.com> <20210516161214.4693-4-digetx@gmail.com> <936cfc7d-737e-a582-ea60-ad2ba5b4ca72@canonical.com> From: Dmitry Osipenko Message-ID: <1d80ee0f-de4c-24d0-154f-20841874bf20@gmail.com> Date: Mon, 17 May 2021 16:35:47 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <936cfc7d-737e-a582-ea60-ad2ba5b4ca72@canonical.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 17.05.2021 14:28, Krzysztof Kozlowski пишет: > On 16/05/2021 12:12, Dmitry Osipenko wrote: >> 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 driver. >> >> Suggested-by: Nathan Chancellor >> Signed-off-by: Dmitry Osipenko >> --- >> drivers/memory/tegra/tegra124-emc.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/memory/tegra/tegra124-emc.c b/drivers/memory/tegra/tegra124-emc.c >> index 5699d909abc2..c9eb948cf4df 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 (2u << 30) >> +#define DRAM_DEV_SEL_1 (1u << 30) > > Why not using BIT()? This would make even this 2<<30 less awkard... The bitfield 31:30 is a enum, 3 is a wrong value. Formally it's incorrect to use the BIT() macro here.