re: 6lowpan: iphc: add support for stateful compression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux