All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: aar@pengutronix.de
Cc: linux-bluetooth@vger.kernel.org
Subject: re: 6lowpan: iphc: add support for stateful compression
Date: Fri, 26 Feb 2016 00:29:21 +0300	[thread overview]
Message-ID: <20160225212921.GA439@mwanda> (raw)

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

                 reply	other threads:[~2016-02-25 21:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160225212921.GA439@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=aar@pengutronix.de \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.