Received: by 10.223.164.221 with SMTP id h29csp1984615wrb; Thu, 2 Nov 2017 04:10:41 -0700 (PDT) X-Google-Smtp-Source: ABhQp+T5Q007VidHaeHClZWW1aCCTWBYZCH4hxmWpFMeYKvL+U/IM3P7Usl768qJ/ad+GUyPuoHO X-Received: by 10.84.254.13 with SMTP id b13mr2811810plm.363.1509621041064; Thu, 02 Nov 2017 04:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509621041; cv=none; d=google.com; s=arc-20160816; b=MPN6pGuUwYfE6WGSon0B+PI/Ajbhbxdp7fh07ztWaZrIiprBtHw3ZKXoR6/BOJUNnB DQDhDYwmX2cgfEg8iXRn84I/Qqc5ZLRqs4QezBamfktwZ2LpeY0CbRxgP8pcz34d19dQ 2XcGR+DEO6vqGI+OzMxMGtKxIvP78B9wrCTAYhQ7eMoZDUu5RsuUSINdUP7Jx7Q4bvaB dxNYm4jZbQv7dnBHQU+OBg3PsOrUZ7asgeBnpKaaeYJ9KiFi+d+t4iC9aIldQlignXeQ FUAtqFzTfdxPc7EoIDBCslFu6uZcX/kKgsmoUf7NVhhfvy/xiKe8xLLYx8P6iHq3gduM /KXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=FR0uOs++al897k4uS7/SVwvx+ZSfjLWSJC8EJ8Pw5JA=; b=EaIA057iDWwtBxqYJlI4XDQyiBr/ieAdcSes5aK4j9rv470AiqDqPtJzVNnRRu9JI9 yIFLIdxDjHr5td+cRbtS0u3V0coFVnZ5EHnAnR3SlXDd/nD05nnsZoB/FVIa61SyCQNa kXvWw3rdqxzJ6gtl3qbt+iAHil9MyrkFlIp8rnR9c01nMmgllJu5+sccj5LvVwYNS3hU sheMMqmmLUzsOFfmH+8vdNGYG/7lg+ET3dBRJuMFUWiIaJbsuSFd8KQXXViC2jsblQ67 NYYz8pYBycr5uHPImYQUqczyLIFfDeHkmYAqJ7ZLbTqzcJH1EvkSqXPjklgXUf2cjKHG APGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RAP46s5J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si2056578pli.476.2017.11.02.04.10.26; Thu, 02 Nov 2017 04:10:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RAP46s5J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755560AbdKBLIb (ORCPT + 99 others); Thu, 2 Nov 2017 07:08:31 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:43965 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755719AbdKBLI2 (ORCPT ); Thu, 2 Nov 2017 07:08:28 -0400 Received: by mail-pg0-f68.google.com with SMTP id s75so4788819pgs.0 for ; Thu, 02 Nov 2017 04:08:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=FR0uOs++al897k4uS7/SVwvx+ZSfjLWSJC8EJ8Pw5JA=; b=RAP46s5JKO2KemLOBwLwpPsj/BwFA5UmC/1WaOpYDz7Z5pDq6d7Pebp02wO96Bo1vh Xntv+oeJ5YwATBPSu963XHBnerWtcdlqAMSiEApS/ld7kKINDz5Y/caoLjxQ4BtMBEDn SX5zFznSiPdoMgdz1gCE6Oxv1wZ7+qpDcP8Xg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=FR0uOs++al897k4uS7/SVwvx+ZSfjLWSJC8EJ8Pw5JA=; b=NhsTf4Sl6wKUOeDSRIuYfenhRkaUgYIILgRDzBu7NGBY5LaiAk57Ixr5Kelm87VSLz NxzLWdLVWPkfflGjI5RsN9964zBt2j+BWkVpMfxysCMQkQcxLtX9MHBcDNspL4sTCl8R LPn3jib/Th7u197KzjUSkBIQNZ95VMaJBa7OpX+SzxHGm5NrpSWwNHTJGLwNcfyTZ6Vl g0fR0KGTZNF8BJs6ohQLCiiTq0xey3LzaEg0dyY3RdERw4qVcTN/ClJFSCLjVe+IAx2W U0x0vL1x8eUqs7l2YA30bIC4Uu/uEtWdZAG9L7wMrrWtFdNulNb538d5gBAZb1gh5YBQ 8nCQ== X-Gm-Message-State: AMCzsaXLoqKn4m53jsbT6mR+UTc2jZ3Jg904MeGT++sG1KR39uWUPs0n Koh36Ruz0dJuRWyQLXpd7ysSGg== X-Received: by 10.99.109.73 with SMTP id i70mr3080059pgc.177.1509620908326; Thu, 02 Nov 2017 04:08:28 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id g13sm5473772pfm.130.2017.11.02.04.08.22 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Nov 2017 04:08:27 -0700 (PDT) From: Baolin Wang To: perex@perex.cz, tiwai@suse.com, arnd@arndb.de Cc: lgirdwood@gmail.com, broonie@kernel.org, o-takashi@sakamocchi.jp, mingo@kernel.org, elfring@users.sourceforge.net, dan.carpenter@oracle.com, jeeja.kp@intel.com, vinod.koul@intel.com, guneshwor.o.singh@intel.com, subhransu.s.prusty@intel.com, bhumirks@gmail.com, gudishax.kranthikumar@intel.com, naveen.m@intel.com, hardik.t.shah@intel.com, arvind.yadav.cs@gmail.com, fabf@skynet.be, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, baolin.wang@linaro.org Subject: [RFC PATCH v2 5/7] uapi: sound: Avoid using timespec for struct snd_ctl_elem_value Date: Thu, 2 Nov 2017 19:06:55 +0800 Message-Id: <24089861471214ca49cf56e8a34a6304861cc170.1509612176.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The struct snd_ctl_elem_value will use 'timespec' type variables to record timestamp, which is not year 2038 safe on 32bits system. Since there are no drivers will implemented the tstamp member of the struct snd_ctl_elem_value, and also the stucture size will not be changed if we change timespec to s64 for tstamp member of struct snd_ctl_elem_value. Thus we can simply change timespec to s64 for tstamp member to avoid using the type which is not year 2038 safe on 32bits system. Signed-off-by: Baolin Wang --- include/uapi/sound/asound.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h index 1949923..fabb283 100644 --- a/include/uapi/sound/asound.h +++ b/include/uapi/sound/asound.h @@ -943,8 +943,12 @@ struct snd_ctl_elem_value { } bytes; struct snd_aes_iec958 iec958; } value; /* RO */ - struct timespec tstamp; - unsigned char reserved[128-sizeof(struct timespec)]; +#ifndef __KERNEL__ + struct { s64 tv_sec; s64 tv_nsec; } tstamp; + unsigned char reserved[128-sizeof(struct { s64 tv_sec; s64 tv_nsec; })]; +#else + unsigned char reserved[128]; +#endif }; struct snd_ctl_tlv { -- 1.7.9.5 From 1588474799012484851@xxx Tue Jan 02 10:06:58 +0000 2018 X-GM-THRID: 1586577963246198076 X-Gmail-Labels: Inbox,Category Forums,Downloaded_2018-01