* re: 6lowpan: iphc: add support for stateful compression
@ 2016-02-25 21:29 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-02-25 21:29 UTC (permalink / raw)
To: aar; +Cc: linux-bluetooth
Hello Alexander Aring,
The patch 5609c185f24d: "6lowpan: iphc: add support for stateful
compression" from Feb 22, 2016, leads to the following static checker
warning:
net/6lowpan/iphc.c:815 lowpan_compress_ctx_addr()
warn: signedness bug returning '(-22)'
net/6lowpan/iphc.c
812 }
813
814 WARN_ON_ONCE("context found but no address mode matched\n");
This isn't correct. WARN_ON_ONCE() takes a condition argument, not a
string. It should be:
WARN_ONCE(1, "context found but no address mode matched\n");
815 return -EINVAL;
^^^^^^^^^^^^^^
This is a u8 function and none of the callers check for error.
816 out:
817
818 if (sam)
819 return lowpan_iphc_dam_to_sam_value[dam];
820 else
821 return dam;
822 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-25 21:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-25 21:29 6lowpan: iphc: add support for stateful compression Dan Carpenter
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.