From: walter harms <wharms@bfs.de>
To: Dan Carpenter <error27@gmail.com>,
"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: Mon, 17 Jan 2011 09:08:07 +0100 [thread overview]
Message-ID: <4D33F8E7.5030900@bfs.de> (raw)
In-Reply-To: <20110115165401.GE2721@bicker>
Am 15.01.2011 17:54, schrieb Dan Carpenter:
> 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.
>
IMHO, it is better to just drop the bitfield. Most people expect int as return.
re,
wh
next prev parent reply other threads:[~2011-01-17 8:08 UTC|newest]
Thread overview: 5+ 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 16:36 ` walter harms
2011-01-15 16:54 ` Dan Carpenter
2011-01-17 8:08 ` walter harms [this message]
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=4D33F8E7.5030900@bfs.de \
--to=wharms@bfs.de \
--cc=James.Bottomley@suse.de \
--cc=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox