Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
From: Philipp Reisner <philipp.reisner@linbit.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: David Howells <dhowells@redhat.com>, Jens Axboe <axboe@kernel.dk>,
	linux-kernel@vger.kernel.org, drbd-dev@lists.linbit.com
Subject: Re: [Drbd-dev] [PATCH 13/13] DRBD: Fix comparison always false warning due to long/long long compare
Date: Thu, 13 Oct 2011 10:25:24 +0200	[thread overview]
Message-ID: <201110131025.24950.philipp.reisner@linbit.com> (raw)
In-Reply-To: <CAMuHMdXGCEUGanrsyFkgyr3ZAr5YpgrjbVqJtvCu5Li6XMMDMA@mail.gmail.com>

Am Mittwoch, 12. Oktober 2011, 15:35:28 schrieb Geert Uytterhoeven:
> On Wed, Oct 12, 2011 at 14:27, Philipp Reisner
> 
> <philipp.reisner@linbit.com> wrote:
> > From: David Howells <dhowells@redhat.com>
> > 
> > Fix warnings of the following nature in the drbd header:
> > 
> > In file included from drivers/block/drbd/drbd_bitmap.c:32:
> > drivers/block/drbd/drbd_int.h: In function 'drbd_get_syncer_progress':
> > drivers/block/drbd/drbd_int.h:2234: warning: comparison is always false
> > due to limited range of data
> > 
> > where mdev->rs_total (an unsigned long) is being compared to 1ULL << 32,
> > which is always false on a 32-bit machine.
> 
> But on 32-bit, unsigned long is never larger than UINT_MAX neither, so
> it doesn't
> really change anything??
> 

Hi Geert,

As the commit message says, David's intention was to silence a compiler
warning, not to change anything.

Best,
 Phil
-- 
: Dipl-Ing Philipp Reisner
: LINBIT | Your Way to High Availability
: Tel: +43-1-8178292-50, Fax: +43-1-8178292-82
: http://www.linbit.com

DRBD(R) and LINBIT(R) are registered trademarks of LINBIT, Austria.

  reply	other threads:[~2011-10-13  8:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-12 12:27 [Drbd-dev] [RFC 00/13] drbd: part 18 of adding multiple volume support to drbd Philipp Reisner
2011-10-12 12:27 ` [Drbd-dev] [PATCH 01/13] drbd: Lower log priority for an event that is definitely not an error Philipp Reisner
2011-10-12 12:27 ` [Drbd-dev] [PATCH 02/13] drbd: Use DRBD_MINOR_COUNT_DEF in one more place Philipp Reisner
2011-10-12 12:27 ` [Drbd-dev] [PATCH 03/13] drbd: cosmetic: fix accidental division instead of modulo when pretty printing Philipp Reisner
2011-10-12 12:27 ` [Drbd-dev] [PATCH 04/13] drbd: spelling fix: too small Philipp Reisner
2011-10-12 12:27 ` [Drbd-dev] [PATCH 05/13] drbd: Use the terminology suggested by the command names in the source code and messages Philipp Reisner
2011-10-12 12:27 ` [Drbd-dev] [PATCH 06/13] drbd: Also need to check for DRBD_GENLA_F_MANDATORY flags before nla_find_nested() Philipp Reisner
2011-10-12 12:27 ` [Drbd-dev] [PATCH 07/13] drbd: Split off netlink mandatory attribute handling into separate file Philipp Reisner
2011-10-12 12:27 ` [Drbd-dev] [PATCH 08/13] drbd: Rename DRBD_ADM_NEED_{CONN -> RESOURCE} Philipp Reisner
2011-10-12 12:27 ` [Drbd-dev] [PATCH 09/13] drbd: Convert the generic netlink interface to accept connection endpoints Philipp Reisner
2011-10-12 12:27 ` [Drbd-dev] [PATCH 10/13] drbd: Allow to pass resource options to the new-resource command Philipp Reisner
2011-10-12 12:27 ` [Drbd-dev] [PATCH 11/13] drbd: Remove dead code Philipp Reisner
2011-10-12 12:27 ` [Drbd-dev] [PATCH 12/13] drbd: Rename --dry-run to --tentative Philipp Reisner
2011-10-12 12:27 ` [Drbd-dev] [PATCH 13/13] DRBD: Fix comparison always false warning due to long/long long compare Philipp Reisner
2011-10-12 13:35   ` Geert Uytterhoeven
2011-10-13  8:25     ` Philipp Reisner [this message]
2011-10-13  8:43       ` Geert Uytterhoeven

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=201110131025.24950.philipp.reisner@linbit.com \
    --to=philipp.reisner@linbit.com \
    --cc=axboe@kernel.dk \
    --cc=dhowells@redhat.com \
    --cc=drbd-dev@lists.linbit.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox