From: David Rientjes <rientjes@google.com>
To: Martin Kepplinger <martink@posteo.de>
Cc: drbd-dev@lists.linbit.com, drbd-user@lists.linbit.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] drbd: change one-bit bitfield to be an unsigned int
Date: Mon, 16 Jun 2014 02:28:57 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.02.1406160225510.30205@chino.kir.corp.google.com> (raw)
In-Reply-To: <1402793121-17181-1-git-send-email-martink@posteo.de>
On Sun, 15 Jun 2014, Martin Kepplinger wrote:
> The one-bit bitfield has no negative values and thus becomes an
> unsigned int.
>
> Signed-off-by: Martin Kepplinger <martink@posteo.de>
I'm unsure what you're correcting here. These bitfields are inherently
signed, "int local:1" and "int waiting:1" are signed. They can have one
of two values, 0 or -1. So I don't know what you're saying in your
changelog.
This patch would only make sense if something is testing `local' or
`waiting' to be equal to 1. Is that what you're fixing? If so, please
specify it in the changelog with an example.
> ---
> Sorry for the visually ugly first patch. Take this one, if any.
>
> thanks,
> martin
>
>
> drivers/block/drbd/drbd_interval.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/block/drbd/drbd_interval.h b/drivers/block/drbd/drbd_interval.h
> index f38fcb0..8d670e6 100644
> --- a/drivers/block/drbd/drbd_interval.h
> +++ b/drivers/block/drbd/drbd_interval.h
> @@ -9,8 +9,8 @@ struct drbd_interval {
> sector_t sector; /* start sector of the interval */
> unsigned int size; /* size in bytes */
> sector_t end; /* highest interval end in subtree */
> - int local:1 /* local or remote request? */;
> - int waiting:1;
> + unsigned int local:1; /* local or remote request? */
> + unsigned int waiting:1;
> };
>
> static inline void drbd_clear_interval(struct drbd_interval *i)
next prev parent reply other threads:[~2014-06-16 9:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-14 23:07 [PATCH] " Martin Kepplinger
2014-06-15 0:45 ` [PATCH v2] " Martin Kepplinger
2014-06-16 9:28 ` David Rientjes [this message]
2014-06-17 6:54 ` Martin Kepplinger
2014-06-17 10:53 ` [Drbd-dev] " Lars Ellenberg
2014-06-17 19:46 ` David Rientjes
2014-06-18 5:50 ` Martin Kepplinger
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=alpine.DEB.2.02.1406160225510.30205@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=drbd-dev@lists.linbit.com \
--cc=drbd-user@lists.linbit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martink@posteo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®