linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] include/linux/arm-smccc.h: avoid sign extension problem
@ 2016-06-01 12:49 Jens Wiklander
  2016-06-01 16:04 ` Russell King - ARM Linux
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Wiklander @ 2016-06-01 12:49 UTC (permalink / raw)
  To: linux-arm-kernel

Prior to this patch the ARM_SMCCC_FAST_CALL constant was of a signed
type causing unwanted sign extension. This patch explicitly selects an
unsigned type for the constant.

Reported-by: Saksham Jain <sakjain92@gmail.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
---
 include/linux/arm-smccc.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
index b5abfda..699c0d8 100644
--- a/include/linux/arm-smccc.h
+++ b/include/linux/arm-smccc.h
@@ -23,8 +23,9 @@
  * http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html
  */
 
-#define ARM_SMCCC_STD_CALL		0
-#define ARM_SMCCC_FAST_CALL		1
+/* This constant is shifted by 31, make sure it's of an unsigned type */
+#define ARM_SMCCC_STD_CALL		0UL
+#define ARM_SMCCC_FAST_CALL		1UL
 #define ARM_SMCCC_TYPE_SHIFT		31
 
 #define ARM_SMCCC_SMC_32		0
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] include/linux/arm-smccc.h: avoid sign extension problem
  2016-06-01 12:49 [PATCH] include/linux/arm-smccc.h: avoid sign extension problem Jens Wiklander
@ 2016-06-01 16:04 ` Russell King - ARM Linux
  2016-06-02  8:28   ` Jens Wiklander
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2016-06-01 16:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 01, 2016 at 02:49:21PM +0200, Jens Wiklander wrote:
> Prior to this patch the ARM_SMCCC_FAST_CALL constant was of a signed
> type causing unwanted sign extension. This patch explicitly selects an
> unsigned type for the constant.
> 
> Reported-by: Saksham Jain <sakjain92@gmail.com>
> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

Looks fine to me.  Who's merging this change?  If they're going some
other route:

Acked-by: Russell King <rmk+kernel@armlinux.org.uk>

Thanks.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] include/linux/arm-smccc.h: avoid sign extension problem
  2016-06-01 16:04 ` Russell King - ARM Linux
@ 2016-06-02  8:28   ` Jens Wiklander
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Wiklander @ 2016-06-02  8:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 1, 2016 at 6:04 PM, Russell King - ARM Linux
<linux@armlinux.org.uk> wrote:
> On Wed, Jun 01, 2016 at 02:49:21PM +0200, Jens Wiklander wrote:
>> Prior to this patch the ARM_SMCCC_FAST_CALL constant was of a signed
>> type causing unwanted sign extension. This patch explicitly selects an
>> unsigned type for the constant.
>>
>> Reported-by: Saksham Jain <sakjain92@gmail.com>
>> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
>
> Looks fine to me.  Who's merging this change?  If they're going some
> other route:
>
> Acked-by: Russell King <rmk+kernel@armlinux.org.uk>

Thanks, Russel. I was hoping you would take it when it's reviewed.

Thanks,
Jens

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-02  8:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-01 12:49 [PATCH] include/linux/arm-smccc.h: avoid sign extension problem Jens Wiklander
2016-06-01 16:04 ` Russell King - ARM Linux
2016-06-02  8:28   ` Jens Wiklander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).