All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 2/5] Cast to 'int'
Date: Fri, 29 Apr 2011 13:21:41 +0200	[thread overview]
Message-ID: <4DBA9F45.9060608@redhat.com> (raw)
In-Reply-To: <7ef25f300a8bfeda9535d37cb63474bb6b78ac71.1303215346.git.zkabelac@redhat.com>

On 04/19/2011 02:55 PM, Zdenek Kabelac wrote:

>  #ifdef linux
> -#  define MAJOR(dev)	((dev & 0xfff00) >> 8)
> +#  define MAJOR(dev)	((int)(dev & 0xfff00) >> 8)
>  #  define MINOR(dev)	((dev & 0xff) | ((dev >> 12) & 0xfff00))
>  #  define MKDEV(ma,mi)	((mi & 0xff) | (ma << 8) | ((mi & ~0xff) << 12))
>  #else

I we really want to play this cast games (seems I was infected too:-),
please fix all defines to use (int) - like MAJOR() so it is consistent
despite there is no current gcc warning.

Milan
p.s.
or use gnu_dev_major()/minor, it is reliable these days.


  reply	other threads:[~2011-04-29 11:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-19 12:55 [PATCH 0/5] Fixes Zdenek Kabelac
2011-04-19 12:55 ` [PATCH 1/5] change API to use unsigned for #copies Zdenek Kabelac
2011-04-19 12:55 ` [PATCH 2/5] Cast to 'int' Zdenek Kabelac
2011-04-29 11:21   ` Milan Broz [this message]
2011-04-19 12:55 ` [PATCH 3/5] Fix sign warning Zdenek Kabelac
2011-04-19 12:55 ` [PATCH 4/5] Ignore dm_snprintf result Zdenek Kabelac
2011-04-19 12:55 ` [PATCH 5/5] Set our own in/out buffers Zdenek Kabelac
2011-04-29 11:15   ` Milan Broz

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=4DBA9F45.9060608@redhat.com \
    --to=mbroz@redhat.com \
    --cc=lvm-devel@redhat.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.