From patchwork Thu Nov 2 11:06:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 117779 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp1918071edm; Thu, 2 Nov 2017 04:08:32 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QPl2hFV8VfUZMZVaH3oImJz2Y2+ysZfOOsXXInqXNMT1ZyKZtTOJW04izcwx7JAww+80Le X-Received: by 10.159.244.143 with SMTP id y15mr1924899plr.215.1509620912776; Thu, 02 Nov 2017 04:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509620912; cv=none; d=google.com; s=arc-20160816; b=tWh90ZrLSodL5Dt+bDH2S36K5Ii43H6SGfUGSutLaKFHJjI7ugVn5jnhJwfjmhYqvo V2iQOKpiecTl+Ub4JOrjHTzQ/Fmmg3SN5WvJTFJq+z/rtntzNEt+aVmSFB8ZPNKWtNII Iooj6ULzDK9w48R0TpwI5tP3XQrdkmT76nD1q/pGTQtdztDvgnAXPznLlP63Nfg748bR EDlEFfaRcrCbwdmX4eV04Oh5rU8lnScf+Pu6apD2+jtvghQN5lhlVNVBiR7i8SyQZkDT jkXidx7omeYMZMhhh/pShBgbN3snDi2fgi6KMIn39VDZh4j9DLe0J54ZqrT9wi7k6Y0K 522A== 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 73si2153499ple.592.2017.11.02.04.08.32; Thu, 02 Nov 2017 04:08:32 -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 S1755744AbdKBLIb (ORCPT + 26 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(-) -- 1.7.9.5 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 {