public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@kernel.org>
To: Mike Frysinger <vapier@gentoo.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [patch] linux/ufs_fs.h: use __u64 for userspace
Date: Wed, 2 Jan 2008 04:02:42 +0200	[thread overview]
Message-ID: <20080102020242.GP27566@does.not.exist> (raw)
In-Reply-To: <200801012051.41474.vapier@gentoo.org>

On Tue, Jan 01, 2008 at 08:51:40PM -0500, Mike Frysinger wrote:
> Fix the ufs_inotofsba macro to use __u64 rather than u64 since this is
> exported to userspace.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
> diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
> index 10b854d..35b6e59 100644
> --- a/include/linux/ufs_fs.h
> +++ b/include/linux/ufs_fs.h
> @@ -225,7 +225,7 @@ typedef __u16 __bitwise __fs16;
>   */
>  #define	ufs_inotocg(x)		((x) / uspi->s_ipg)
>  #define	ufs_inotocgoff(x)	((x) % uspi->s_ipg)
> -#define	ufs_inotofsba(x)	(((u64)ufs_cgimin(ufs_inotocg(x))) + ufs_inotocgoff(x) / uspi->s_inopf)
> +#define	ufs_inotofsba(x)	(((__u64)ufs_cgimin(ufs_inotocg(x))) + ufs_inotocgoff(x) / uspi->s_inopf)
>  #define	ufs_inotofsbo(x)	((x) % uspi->s_inopf)

But userspace anyway can't use them since it doesn't know what "uspi" 
is, so you should better reduce the userspace visibility of this header.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  reply	other threads:[~2008-01-02  2:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-02  1:51 [patch] linux/ufs_fs.h: use __u64 for userspace Mike Frysinger
2008-01-02  2:02 ` Adrian Bunk [this message]
2008-01-02  7:50   ` Christoph Hellwig
2008-01-02  8:04     ` David Miller
2008-01-02  8:10       ` Christoph Hellwig
2008-01-02 13:40       ` [patch] linux/ufs_fs.h: do not export to userspace anymore Mike Frysinger

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=20080102020242.GP27566@does.not.exist \
    --to=bunk@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vapier@gentoo.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