From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC39FC43331 for ; Tue, 12 Nov 2019 15:43:18 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D56DE2084F for ; Tue, 12 Nov 2019 15:43:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="s/hbHfuF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D56DE2084F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 841DE886; Tue, 12 Nov 2019 16:42:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 841DE886 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1573573395; bh=PKvOM44i1lfx8oPwVRpQj5B1acvAujHNQ7N1hKd2nik=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=s/hbHfuFWXiJHY4MBWEXfcX1WkYflKg0AsCXJAwF0UQ1JGlh0iBKBDD+FhiQc5nTQ cjEy4vFgda48RfJKHpuLbprmHGjcjZ43p8/7PaxpILOZB7LW9U+dqlq6Q5mvID1p+X mXV79gb45aV4tdmk37IgYOer8w5tPhM5RIKLFIF8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id EC8CAF8044C; Tue, 12 Nov 2019 16:42:24 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id BB51BF80483; Tue, 12 Nov 2019 16:42:22 +0100 (CET) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B535EF802E0 for ; Tue, 12 Nov 2019 16:42:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B535EF802E0 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 36CB8B39E; Tue, 12 Nov 2019 15:42:18 +0000 (UTC) Date: Tue, 12 Nov 2019 16:42:17 +0100 Message-ID: From: Takashi Iwai To: Arnd Bergmann In-Reply-To: <20191112151642.680072-3-arnd@arndb.de> References: <20191112151642.680072-1-arnd@arndb.de> <20191112151642.680072-3-arnd@arndb.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: alsa-devel@alsa-project.org, Baolin Wang , y2038@lists.linaro.org, linux-kernel@vger.kernel.org, Takashi Iwai , Mark Brown , Baolin Wang Subject: Re: [alsa-devel] [PATCH v6 2/8] ALSA: Avoid using timespec for struct snd_timer_status X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Tue, 12 Nov 2019 16:16:36 +0100, Arnd Bergmann wrote: > > From: Baolin Wang > > struct snd_timer_status uses 'timespec' type variables to record > timestamp, which will be changed to an incompatible layout with > updated user space using 64-bit time_t. > > To handle both the old and the new layout on 32-bit architectures, > this patch introduces 'struct snd_timer_status32' and 'struct snd_timer_status64' > to handle 32bit time_t and 64bit time_t in native mode and compat mode, > which replaces timespec with s64 type. > > When glibc changes time_t to 64-bit, any recompiled program will issue > ioctl commands that the kernel does not understand without this patch. > > Signed-off-by: Baolin Wang > Signed-off-by: Arnd Bergmann > --- > include/uapi/sound/asound.h | 2 ++ > sound/core/timer.c | 62 +++++++++++++++++++++++++++++++++---- > sound/core/timer_compat.c | 57 ++++------------------------------ > 3 files changed, 64 insertions(+), 57 deletions(-) > > diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h > index df1153cea0b7..930854f67fd3 100644 > --- a/include/uapi/sound/asound.h > +++ b/include/uapi/sound/asound.h > @@ -761,6 +761,7 @@ struct snd_timer_params { > unsigned char reserved[60]; /* reserved */ > }; > > +#ifndef __KERNEL__ > struct snd_timer_status { > struct timespec tstamp; /* Timestamp - last update */ > unsigned int resolution; /* current period resolution in ns */ Do we need this ifndef? Is it for stopping the reference of struct snd_timer_status from the kernel code but only 32 and 64 variants? thanks, Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel