mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next] net: vlan: Fixed signedness in vlan_group_prealloc_vid()
@ 2020-09-28  2:31 Florian Fainelli
  2020-09-28  7:51 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2020-09-28  2:31 UTC (permalink / raw)
  To: netdev
  Cc: olteanv, Florian Fainelli, kernel test robot, David S. Miller,
	Jakub Kicinski, Taehee Yoo, open list

After commit d0186842ec5f ("net: vlan: Avoid using BUG() in
vlan_proto_idx()"), vlan_proto_idx() was changed to return a signed
integer, however one of its called: vlan_group_prealloc_vid() was still
using an unsigned integer for its return value, fix that.

Fixes: d0186842ec5f ("net: vlan: Avoid using BUG() in vlan_proto_idx()")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 net/8021q/vlan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 6c08de1116c1..f292e0267bb9 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -51,8 +51,9 @@ static int vlan_group_prealloc_vid(struct vlan_group *vg,
 				   __be16 vlan_proto, u16 vlan_id)
 {
 	struct net_device **array;
-	unsigned int pidx, vidx;
+	unsigned int vidx;
 	unsigned int size;
+	int pidx;
 
 	ASSERT_RTNL();
 
-- 
2.25.1


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

* Re: [PATCH net-next] net: vlan: Fixed signedness in vlan_group_prealloc_vid()
  2020-09-28  2:31 [PATCH net-next] net: vlan: Fixed signedness in vlan_group_prealloc_vid() Florian Fainelli
@ 2020-09-28  7:51 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-09-28  7:51 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, olteanv, lkp, kuba, ap420073, linux-kernel

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Sun, 27 Sep 2020 19:31:50 -0700

> After commit d0186842ec5f ("net: vlan: Avoid using BUG() in
> vlan_proto_idx()"), vlan_proto_idx() was changed to return a signed
> integer, however one of its called: vlan_group_prealloc_vid() was still
> using an unsigned integer for its return value, fix that.
> 
> Fixes: d0186842ec5f ("net: vlan: Avoid using BUG() in vlan_proto_idx()")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied, thanks Florian.

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

end of thread, other threads:[~2020-09-28  7:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-28  2:31 [PATCH net-next] net: vlan: Fixed signedness in vlan_group_prealloc_vid() Florian Fainelli
2020-09-28  7:51 ` David Miller

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®