All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: walter harms <wharms@bfs.de>
Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org>,
	James Bottomley <James.Bottomley@suse.de>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] [SCSI] target: dubious one-bit signed bitfield
Date: Sat, 15 Jan 2011 16:54:01 +0000	[thread overview]
Message-ID: <20110115165401.GE2721@bicker> (raw)
In-Reply-To: <4D31CCFB.1060504@bfs.de>

On Sat, Jan 15, 2011 at 05:36:11PM +0100, walter harms wrote:
> 
> 
> Am 15.01.2011 15:04, schrieb Dan Carpenter:
> > The signed one-bit types can be 0 or -1 which can cause a problem if
> > someone ever checks if (foo->lu_gp_assoc = 1).  The current code is
> > fine because everyone just checks zero vs non-zero.  But Sparse
> > complains about it so lets change it.  The warnings look like this:
> > 
> 
> Your code looks ok,
> but to avoid that kind of errors it may be better to use int here.
> 

I'm afraid I don't understand what you are saying.

regards,
dan carpenter

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: walter harms <wharms@bfs.de>
Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org>,
	James Bottomley <James.Bottomley@suse.de>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] [SCSI] target: dubious one-bit signed bitfield
Date: Sat, 15 Jan 2011 19:54:01 +0300	[thread overview]
Message-ID: <20110115165401.GE2721@bicker> (raw)
In-Reply-To: <4D31CCFB.1060504@bfs.de>

On Sat, Jan 15, 2011 at 05:36:11PM +0100, walter harms wrote:
> 
> 
> Am 15.01.2011 15:04, schrieb Dan Carpenter:
> > The signed one-bit types can be 0 or -1 which can cause a problem if
> > someone ever checks if (foo->lu_gp_assoc == 1).  The current code is
> > fine because everyone just checks zero vs non-zero.  But Sparse
> > complains about it so lets change it.  The warnings look like this:
> > 
> 
> Your code looks ok,
> but to avoid that kind of errors it may be better to use int here.
> 

I'm afraid I don't understand what you are saying.

regards,
dan carpenter

  reply	other threads:[~2011-01-15 16:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-15 14:04 [patch] [SCSI] target: dubious one-bit signed bitfield Dan Carpenter
2011-01-15 14:04 ` Dan Carpenter
2011-01-15 16:36 ` walter harms
2011-01-15 16:36   ` walter harms
2011-01-15 16:54   ` Dan Carpenter [this message]
2011-01-15 16:54     ` Dan Carpenter
2011-01-17  8:08     ` walter harms
2011-01-17  8:08       ` walter harms
2011-01-15 20:53 ` Nicholas A. Bellinger
2011-01-15 20:53   ` Nicholas A. Bellinger

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=20110115165401.GE2721@bicker \
    --to=error27@gmail.com \
    --cc=James.Bottomley@suse.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    --cc=wharms@bfs.de \
    /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.