All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Talel Shenhar <talel@amazon.com>
Cc: <robh+dt@kernel.org>, <tglx@linutronix.de>,
	<jason@lakedaemon.net>, <mark.rutland@arm.com>,
	<nicolas.ferre@microchip.com>, <mchehab+samsung@kernel.org>,
	<shawn.lin@rock-chips.com>, <gregkh@linuxfoundation.org>,
	<dwmw@amazon.co.uk>, <benh@kernel.crashing.org>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 3/3] soc: amazon: al-pos: cast to u64 before left shifting
Date: Wed, 11 Sep 2019 15:18:31 +0100	[thread overview]
Message-ID: <86blvqsyq0.wl-maz@kernel.org> (raw)
In-Reply-To: <1568142310-17622-4-git-send-email-talel@amazon.com>

On Tue, 10 Sep 2019 20:05:10 +0100,
Talel Shenhar <talel@amazon.com> wrote:
> 
> Fix wrap around for pos errors on addresses above 32 bit.
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Talel Shenhar <talel@amazon.com>
> ---
>  drivers/soc/amazon/al_pos.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/amazon/al_pos.c b/drivers/soc/amazon/al_pos.c
> index a865111..e95e1fc 100644
> --- a/drivers/soc/amazon/al_pos.c
> +++ b/drivers/soc/amazon/al_pos.c
> @@ -49,7 +49,7 @@ static irqreturn_t al_pos_irq_handler(int irq, void *info)
>  	writel(0, pos->mmio_base + AL_POS_ERROR_LOG_1);
>  
>  	addr = FIELD_GET(AL_POS_ERROR_LOG_0_ADDR_LOW, log0);
> -	addr |= (FIELD_GET(AL_POS_ERROR_LOG_1_ADDR_HIGH, log1) << 32);
> +	addr |= (((u64)FIELD_GET(AL_POS_ERROR_LOG_1_ADDR_HIGH, log1)) << 32);
>  	request_id = FIELD_GET(AL_POS_ERROR_LOG_1_REQUEST_ID, log1);
>  	bresp = FIELD_GET(AL_POS_ERROR_LOG_1_BRESP, log1);
>  
> -- 
> 2.7.4
> 

This fix should be squashed into the previous patch.

Thanks,

	M.

-- 
Jazz is not dead, it just smells funny.

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Talel Shenhar <talel@amazon.com>
Cc: robh+dt@kernel.org, tglx@linutronix.de, jason@lakedaemon.net,
	mark.rutland@arm.com, nicolas.ferre@microchip.com,
	mchehab+samsung@kernel.org, shawn.lin@rock-chips.com,
	gregkh@linuxfoundation.org, dwmw@amazon.co.uk,
	benh@kernel.crashing.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v2 3/3] soc: amazon: al-pos: cast to u64 before left shifting
Date: Wed, 11 Sep 2019 15:18:31 +0100	[thread overview]
Message-ID: <86blvqsyq0.wl-maz@kernel.org> (raw)
In-Reply-To: <1568142310-17622-4-git-send-email-talel@amazon.com>

On Tue, 10 Sep 2019 20:05:10 +0100,
Talel Shenhar <talel@amazon.com> wrote:
> 
> Fix wrap around for pos errors on addresses above 32 bit.
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Talel Shenhar <talel@amazon.com>
> ---
>  drivers/soc/amazon/al_pos.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/amazon/al_pos.c b/drivers/soc/amazon/al_pos.c
> index a865111..e95e1fc 100644
> --- a/drivers/soc/amazon/al_pos.c
> +++ b/drivers/soc/amazon/al_pos.c
> @@ -49,7 +49,7 @@ static irqreturn_t al_pos_irq_handler(int irq, void *info)
>  	writel(0, pos->mmio_base + AL_POS_ERROR_LOG_1);
>  
>  	addr = FIELD_GET(AL_POS_ERROR_LOG_0_ADDR_LOW, log0);
> -	addr |= (FIELD_GET(AL_POS_ERROR_LOG_1_ADDR_HIGH, log1) << 32);
> +	addr |= (((u64)FIELD_GET(AL_POS_ERROR_LOG_1_ADDR_HIGH, log1)) << 32);
>  	request_id = FIELD_GET(AL_POS_ERROR_LOG_1_REQUEST_ID, log1);
>  	bresp = FIELD_GET(AL_POS_ERROR_LOG_1_BRESP, log1);
>  
> -- 
> 2.7.4
> 

This fix should be squashed into the previous patch.

Thanks,

	M.

-- 
Jazz is not dead, it just smells funny.

  reply	other threads:[~2019-09-11 14:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-10 19:05 [PATCH v2 0/3] Amazon's Annapurna Labs POS Driver Talel Shenhar
2019-09-10 19:05 ` Talel Shenhar
2019-09-10 19:05 ` [PATCH v2 1/3] dt-bindings: soc: al-pos: Amazon's Annapurna Labs POS Talel Shenhar
2019-09-10 19:05   ` Talel Shenhar
2019-09-18 13:32   ` Rob Herring
2019-09-18 13:44     ` Shenhar, Talel
2019-09-18 13:44       ` Shenhar, Talel
2019-09-10 19:05 ` [PATCH v2 2/3] soc: amazon: al-pos: Introduce Amazon's Annapurna Labs POS driver Talel Shenhar
2019-09-10 19:05   ` Talel Shenhar
2019-09-11 14:15   ` Marc Zyngier
2019-09-11 14:15     ` Marc Zyngier
2019-09-12  6:50     ` [UNVERIFIED SENDER] " Shenhar, Talel
2019-09-12  6:50       ` Shenhar, Talel
2019-09-12  8:50       ` Marc Zyngier
2019-09-12  8:50         ` Marc Zyngier
2019-09-12  9:19         ` [UNVERIFIED SENDER] " Shenhar, Talel
2019-09-12  9:19           ` Shenhar, Talel
2019-09-19 14:42           ` James Morse
2019-09-22  6:55             ` Shenhar, Talel
2019-09-22  6:55               ` Shenhar, Talel
2019-09-10 19:05 ` [PATCH v2 3/3] soc: amazon: al-pos: cast to u64 before left shifting Talel Shenhar
2019-09-10 19:05   ` Talel Shenhar
2019-09-11 14:18   ` Marc Zyngier [this message]
2019-09-11 14:18     ` Marc Zyngier
2019-09-12  6:51     ` [UNVERIFIED SENDER] " Shenhar, Talel
2019-09-12  6:51       ` Shenhar, Talel

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=86blvqsyq0.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=benh@kernel.crashing.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dwmw@amazon.co.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mchehab+samsung@kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=robh+dt@kernel.org \
    --cc=shawn.lin@rock-chips.com \
    --cc=talel@amazon.com \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.