From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@lists.ozlabs.org
Cc: Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: [PATCH] pmu: add compat_pmu_ioctl
Date: Sun, 22 Aug 2010 13:33:50 +0200 [thread overview]
Message-ID: <201008221333.50575.arnd@arndb.de> (raw)
In-Reply-To: <m2lj7zzm6w.fsf@igel.home>
On Saturday 21 August 2010 23:32:23 Andreas Schwab wrote:
> The ioctls are actually compatible, but due to historical mistake the
> numbers differ between 32bit and 64bit.
Looks good to me, but
> +#ifdef CONFIG_COMPAT
> +#define PMU_IOC_GET_BACKLIGHT32 _IOR('B', 1, u32)
> +#define PMU_IOC_SET_BACKLIGHT32 _IOW('B', 2, u32)
> +#define PMU_IOC_GET_MODEL32 _IOR('B', 3, u32)
> +#define PMU_IOC_HAS_ADB32 _IOR('B', 4, u32)
> +#define PMU_IOC_CAN_SLEEP32 _IOR('B', 5, u32)
> +#define PMU_IOC_GRAB_BACKLIGHT32 _IOR('B', 6, u32)
It would be nicer to use compat_size_t instead of u32 for annotation
purposes. Obviously both of them are defined as unsigned int, so
that is no functional change.
> + return pmu_unlocked_ioctl(filp, cmd, arg);
This should ideally use "(unsigned long)compat_ptr(arg)" instead of
just arg. Also doesn't matter on powerpc, but it's better to do
it the strict way.
Arnd
next prev parent reply other threads:[~2010-08-22 11:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-21 21:32 [PATCH] pmu: add compat_pmu_ioctl Andreas Schwab
2010-08-22 11:33 ` Arnd Bergmann [this message]
2010-08-22 16:23 ` [PATCH/v2] via-pmu: " Andreas Schwab
2010-08-23 8:53 ` Arnd Bergmann
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=201008221333.50575.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=schwab@linux-m68k.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 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.