mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
To: Marc Zyngier <maz@kernel.org>
Cc: Will Deacon <will@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Steven Rostedt <rostedt@goodmis.org>,
	gregkh <gregkh@linuxfoundation.org>, <quic_psodagud@quicinc.com>,
	Trilok Soni <quic_tsoni@quicinc.com>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-arm-msm@vger.kernel.org>
Subject: Re: [PATCHv9 2/5] irqchip/tegra: Fix overflow implicit truncation warnings
Date: Tue, 25 Jan 2022 19:05:27 +0530	[thread overview]
Message-ID: <dc36531d-0e03-94f3-3e77-0108fbe41e63@quicinc.com> (raw)
In-Reply-To: <8735lc88n9.wl-maz@kernel.org>

On 1/25/2022 3:00 PM, Marc Zyngier wrote:
> On Mon, 24 Jan 2022 06:33:31 +0000,
> Sai Prakash Ranjan <quic_saipraka@quicinc.com> wrote:
>> Fix -Woverflow warnings for tegra irqchip driver which is a result
>> of moving arm64 custom MMIO accessor macros to asm-generic function
>> implementations giving a bonus type-checking now and uncovering these
>> overflow warnings.
>>
>> drivers/irqchip/irq-tegra.c: In function ‘tegra_ictlr_suspend’:
>> drivers/irqchip/irq-tegra.c:151:18: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>>     writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR);
>>                    ^
>>
>> Cc: Marc Zyngier <maz@kernel.org>
>> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
>> Signed-off-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
>> ---
>>   drivers/irqchip/irq-tegra.c | 10 +++++-----
>>   1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/irqchip/irq-tegra.c b/drivers/irqchip/irq-tegra.c
>> index e1f771c72fc4..9e4e5b39c701 100644
>> --- a/drivers/irqchip/irq-tegra.c
>> +++ b/drivers/irqchip/irq-tegra.c
>> @@ -148,10 +148,10 @@ static int tegra_ictlr_suspend(void)
>>   		lic->cop_iep[i] = readl_relaxed(ictlr + ICTLR_COP_IEP_CLASS);
>>   
>>   		/* Disable COP interrupts */
>> -		writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR);
>> +		writel_relaxed(~0u, ictlr + ICTLR_COP_IER_CLR);
> Aside from the 'l' in writel really meaning 'long' (a historical
> artefact), it would probably be better to lift the ambiguity entirely
> and write this as GENMASK(31, 0), making it clear what is being set,
> no matter what the revision of the architecture is (this driver also
> works on 32bit machines).
>

Sure, I will make this change.

Thanks,
Sai

  parent reply	other threads:[~2022-01-25 13:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24  6:33 [PATCHv9 0/5] lib/rwmmio/arm64: Add support to trace register reads/writes Sai Prakash Ranjan
2022-01-24  6:33 ` [PATCHv9 1/5] arm64: io: Use asm-generic high level MMIO accessors Sai Prakash Ranjan
2022-02-09 18:52   ` Catalin Marinas
2022-02-10  7:36     ` Sai Prakash Ranjan
2022-01-24  6:33 ` [PATCHv9 2/5] irqchip/tegra: Fix overflow implicit truncation warnings Sai Prakash Ranjan
     [not found]   ` <8735lc88n9.wl-maz@kernel.org>
2022-01-25 13:35     ` Sai Prakash Ranjan [this message]
2022-01-24  6:33 ` [PATCHv9 3/5] drm/meson: " Sai Prakash Ranjan
2022-01-24  6:33 ` [PATCHv9 4/5] lib: Add register read/write tracing support Sai Prakash Ranjan
2022-02-14  3:37   ` Sai Prakash Ranjan
2022-01-24  6:33 ` [PATCHv9 5/5] asm-generic/io: Add logging support for MMIO accessors Sai Prakash Ranjan
2022-02-14  3:40   ` Sai Prakash Ranjan
2022-01-31 18:56 ` [PATCHv9 0/5] lib/rwmmio/arm64: Add support to trace register reads/writes Sai Prakash Ranjan
2022-02-08  9:31   ` Sai Prakash Ranjan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc36531d-0e03-94f3-3e77-0108fbe41e63@quicinc.com \
    --to=quic_saipraka@quicinc.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=quic_psodagud@quicinc.com \
    --cc=quic_tsoni@quicinc.com \
    --cc=rostedt@goodmis.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®