All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: maximlevitsky@gmail.com
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: re: memstick: add support for legacy memorysticks
Date: Fri, 21 Sep 2012 14:37:45 +0300	[thread overview]
Message-ID: <20120921113745.GA21483@elgon.mountain> (raw)

Hello Maxim Levitsky,

The patch d59dd7c61b24: "memstick: add support for legacy 
memorysticks" from Sep 21, 2012, leads to the following warning:
drivers/memstick/core/ms_block.c:147 sg_compare_to_buffer()
	 warn: signedness bug returning '-1'

   141  
   142          if (!retval && len)
   143                  retval = -1;
                        ^^^^^^^^^^^
   144  
   145          sg_miter_stop(&miter);
   146          local_irq_restore(flags);
   147          return retval;
   148  }

This function is bool so it always returns true if len is non-zero.

The comments at the top of the function don't talk about if a 1 means
the same and 0 means different or if it's the other way around.

regards,
dan carpenter


             reply	other threads:[~2012-09-21 11:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-21 11:37 Dan Carpenter [this message]
2012-09-21 11:39 ` memstick: add support for legacy memorysticks Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2016-02-12 20:45 Dan Carpenter

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=20120921113745.GA21483@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maximlevitsky@gmail.com \
    /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.