From: Takashi Iwai Subject: Re: [PATCH 2/3] Use pid_t, off_t instead of __kernel_*_t for better portability. Date: Mon, 29 Feb 2016 17:10:34 +0100 Message-ID: References: <56D010C4.3000804@ladisch.de> <1456758321-2256-1-git-send-email-tk@giga.or.at> <1456758321-2256-2-git-send-email-tk@giga.or.at> 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 (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 39A04260698 for ; Mon, 29 Feb 2016 17:10:40 +0100 (CET) In-Reply-To: <1456758321-2256-2-git-send-email-tk@giga.or.at> 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: Thomas Klausner Cc: alsa-devel@alsa-project.org, Thomas Klausner List-Id: alsa-devel@alsa-project.org On Mon, 29 Feb 2016 16:05:20 +0100, Thomas Klausner wrote: > > From: Thomas Klausner > > --- > include/sound/asound.h | 4 ++-- Sorry, this is no-go. The files in include/sound/* are basically copies of Linux ABI. So, all these files must not be modified in alsa-lib side. And, using __kernel_off_t there is in purpose -- to distinguish from the user-space off_t. That said, the best workaround for these files are to provide the compatible typedefs. OTOH, the code changes in include/pcm.h and src/pcm/* are acceptable, in general, but I still hesitate to apply it, so far. If it's only about portability, we may wrap it with a few typedefs instead of touching so many lines. And it would bring any other real benefit? It's the question... thanks, Takashi > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/sound/asound.h b/include/sound/asound.h > index a82108e..4f2202f 100644 > --- a/include/sound/asound.h > +++ b/include/sound/asound.h > @@ -415,7 +415,7 @@ struct snd_pcm_sw_params { > > struct snd_pcm_channel_info { > unsigned int channel; > - __kernel_off_t offset; /* mmap offset */ > + off_t offset; /* mmap offset */ > unsigned int first; /* offset to first sample in bits */ > unsigned int step; /* samples distance in bits */ > }; > @@ -884,7 +884,7 @@ struct snd_ctl_elem_info { > snd_ctl_elem_type_t type; /* R: value type - SNDRV_CTL_ELEM_TYPE_* */ > unsigned int access; /* R: value access (bitmask) - SNDRV_CTL_ELEM_ACCESS_* */ > unsigned int count; /* count of values */ > - __kernel_pid_t owner; /* owner's PID of this control */ > + pid_t owner; /* owner's PID of this control */ > union { > struct { > long min; /* R: minimum value */ > -- > 2.7.1 > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel >