From: Takashi Iwai Subject: Re: [PATCH 18/19] ALSA: ymu831: add hwdep ioctl Date: Wed, 16 Jan 2013 12:53:59 +0100 Message-ID: References: <20130116172530.857b627ef3303fb6fe43f603@linux-mips.org> <20130116174429.c9f25228f247679ae7906f71@linux-mips.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 841E62625FE for ; Wed, 16 Jan 2013 12:53:59 +0100 (CET) In-Reply-To: <20130116174429.c9f25228f247679ae7906f71@linux-mips.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Yoichi Yuasa Cc: alsa-devel@alsa-project.org, Mark Brown List-Id: alsa-devel@alsa-project.org At Wed, 16 Jan 2013 17:44:29 +0900, Yoichi Yuasa wrote: > > > +#define MC_ASOC_MAGIC 'N' > +#define MC_ASOC_IOCTL_SET_CTRL 1 > +#define MC_ASOC_IOCTL_NOTIFY_HOLD 4 > + > +struct ymc_ctrl_args { > + void *param; > + unsigned long size; > + unsigned long option; > +}; Using a pointer in an ioctl data struct is a very bad idea in general. Don't do it unless you really really need it. Otherwise you'd have to provide a 32/64 bit conversion for compat_ioctl. Ditto for using long type there. They need conversions as well. For ioctl structs, use only types with strict size definitions. Takashi