All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net:gue.h:Fix shifting signed 32-bit value by 31 bits problem
@ 2019-07-01 14:16 ` bnvandana
  0 siblings, 0 replies; 6+ messages in thread
From: Vandana BN @ 2019-07-01 14:16 UTC (permalink / raw)
  To: David S . Miller , netdev, linux-kernel
  Cc: skhan, gregkh, linux-kernel-mentees, Vandana BN

Fix GUE_PFLAG_REMCSUM to use "U" cast to avoid shifting signed
32-bit value by 31 bits problem.

Signed-off-by: Vandana BN <bnvandana@gmail.com>
---
 include/net/gue.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/gue.h b/include/net/gue.h
index fdad41469b65..3a6595bfa641 100644
--- a/include/net/gue.h
+++ b/include/net/gue.h
@@ -60,7 +60,7 @@ struct guehdr {

 /* Private flags in the private option extension */

-#define GUE_PFLAG_REMCSUM	htonl(1 << 31)
+#define GUE_PFLAG_REMCSUM	htonl(1U << 31)
 #define GUE_PLEN_REMCSUM	4

 #define GUE_PFLAGS_ALL	(GUE_PFLAG_REMCSUM)
--
2.17.1


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

* [Linux-kernel-mentees] [PATCH] net:gue.h:Fix shifting signed 32-bit value by 31 bits problem
@ 2019-07-01 14:16 ` bnvandana
  0 siblings, 0 replies; 6+ messages in thread
From: bnvandana @ 2019-07-01 14:16 UTC (permalink / raw)


Fix GUE_PFLAG_REMCSUM to use "U" cast to avoid shifting signed
32-bit value by 31 bits problem.

Signed-off-by: Vandana BN <bnvandana at gmail.com>
---
 include/net/gue.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/gue.h b/include/net/gue.h
index fdad41469b65..3a6595bfa641 100644
--- a/include/net/gue.h
+++ b/include/net/gue.h
@@ -60,7 +60,7 @@ struct guehdr {

 /* Private flags in the private option extension */

-#define GUE_PFLAG_REMCSUM	htonl(1 << 31)
+#define GUE_PFLAG_REMCSUM	htonl(1U << 31)
 #define GUE_PLEN_REMCSUM	4

 #define GUE_PFLAGS_ALL	(GUE_PFLAG_REMCSUM)
--
2.17.1

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

* [Linux-kernel-mentees] [PATCH] net:gue.h:Fix shifting signed 32-bit value by 31 bits problem
@ 2019-07-01 14:16 ` bnvandana
  0 siblings, 0 replies; 6+ messages in thread
From: Vandana BN @ 2019-07-01 14:16 UTC (permalink / raw)


Fix GUE_PFLAG_REMCSUM to use "U" cast to avoid shifting signed
32-bit value by 31 bits problem.

Signed-off-by: Vandana BN <bnvandana at gmail.com>
---
 include/net/gue.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/gue.h b/include/net/gue.h
index fdad41469b65..3a6595bfa641 100644
--- a/include/net/gue.h
+++ b/include/net/gue.h
@@ -60,7 +60,7 @@ struct guehdr {

 /* Private flags in the private option extension */

-#define GUE_PFLAG_REMCSUM	htonl(1 << 31)
+#define GUE_PFLAG_REMCSUM	htonl(1U << 31)
 #define GUE_PLEN_REMCSUM	4

 #define GUE_PFLAGS_ALL	(GUE_PFLAG_REMCSUM)
--
2.17.1

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

* Re: [PATCH] net:gue.h:Fix shifting signed 32-bit value by 31 bits problem
  2019-07-01 14:16 ` bnvandana
  (?)
@ 2019-07-01 18:00   ` davem
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2019-07-01 18:00 UTC (permalink / raw)
  To: bnvandana; +Cc: netdev, linux-kernel, skhan, gregkh, linux-kernel-mentees

From: Vandana BN <bnvandana@gmail.com>
Date: Mon,  1 Jul 2019 19:46:10 +0530

> Fix GUE_PFLAG_REMCSUM to use "U" cast to avoid shifting signed
> 32-bit value by 31 bits problem.
> 
> Signed-off-by: Vandana BN <bnvandana@gmail.com>

Applied.

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

* [Linux-kernel-mentees] [PATCH] net:gue.h:Fix shifting signed 32-bit value by 31 bits problem
@ 2019-07-01 18:00   ` davem
  0 siblings, 0 replies; 6+ messages in thread
From: davem @ 2019-07-01 18:00 UTC (permalink / raw)


From: Vandana BN <bnvandana at gmail.com>
Date: Mon,  1 Jul 2019 19:46:10 +0530

> Fix GUE_PFLAG_REMCSUM to use "U" cast to avoid shifting signed
> 32-bit value by 31 bits problem.
> 
> Signed-off-by: Vandana BN <bnvandana at gmail.com>

Applied.

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

* [Linux-kernel-mentees] [PATCH] net:gue.h:Fix shifting signed 32-bit value by 31 bits problem
@ 2019-07-01 18:00   ` davem
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2019-07-01 18:00 UTC (permalink / raw)


From: Vandana BN <bnvandana@gmail.com>
Date: Mon,  1 Jul 2019 19:46:10 +0530

> Fix GUE_PFLAG_REMCSUM to use "U" cast to avoid shifting signed
> 32-bit value by 31 bits problem.
> 
> Signed-off-by: Vandana BN <bnvandana at gmail.com>

Applied.

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

end of thread, other threads:[~2019-07-01 18:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-01 14:16 [PATCH] net:gue.h:Fix shifting signed 32-bit value by 31 bits problem Vandana BN
2019-07-01 14:16 ` [Linux-kernel-mentees] " Vandana BN
2019-07-01 14:16 ` bnvandana
2019-07-01 18:00 ` David Miller
2019-07-01 18:00   ` [Linux-kernel-mentees] " David Miller
2019-07-01 18:00   ` davem

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.