From patchwork Thu Sep 21 06:18:08 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: 9963513 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B40736056E for ; Thu, 21 Sep 2017 08:30:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FD712938F for ; Thu, 21 Sep 2017 08:30:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9291F2937A; Thu, 21 Sep 2017 08:30:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE, RDNS_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (unknown [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3FC72938B for ; Thu, 21 Sep 2017 08:30:44 +0000 (UTC) Received: from alsa.alsa-project.org (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 09922267626; Thu, 21 Sep 2017 10:22:55 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id ED371267590; Thu, 21 Sep 2017 08:19:06 +0200 (CEST) Received: from mail-pg0-f54.google.com (mail-pg0-f54.google.com [74.125.83.54]) by alsa0.perex.cz (Postfix) with ESMTP id 481E2267580 for ; Thu, 21 Sep 2017 08:19:02 +0200 (CEST) Received: by mail-pg0-f54.google.com with SMTP id j70so3009259pgc.10 for ; Wed, 20 Sep 2017 23:19:02 -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=hqQlmYft16Py82zVPENySRlvYUvy2LphLnOwzFzB0aU=; b=BonFcXlGFRaSwY3BSZ2Zaca5fzx1JYi7h2GBmBDZr+zT2CefsQcCqa6LC9yR3h4LNj P/Dl4D5N6GuHNUz08aUqHrHVavPLlU5IL7BXfSoWJIqABLC5KbbFrsTPtXDjg0q8WgRx OT/qkg/UJdfgLBw3oNflzgz9/AXOjygbXvQok= 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=hqQlmYft16Py82zVPENySRlvYUvy2LphLnOwzFzB0aU=; b=YYGUYW49eTYogHjFwTYC/YI5XP2HQHd9be7qjiZvkDi6SSaWnFLkkHzlhAT3Uy7McT ctoLkI77+o0u/HmaYEJ+pOQOj1iMJHbBbq4bPv/vlo5TM7EY6M/vd393UrattlAoJpjt 4c8HCtm3aowb6x6VZ02WIoq/Rdi5bwN2cBkoifEOJJ81/a7viWEQF7rSEgKOQsIuex6l I3vu02RwySQGzPf/allaChgHaNOMBGt650h1Bryw6C5za6mIZenO8t8cbxkfTlQzC+mp GwrWgFywn0cv+UubvkXKScvALvTOssKdwSk5b5Yk4fYWvJzOylXW02zz/h/8mWpH5kbn mU4Q== X-Gm-Message-State: AHPjjUjy5vXwrgBX54qJ9ISHwoIEMfk0GRS92lkcTzGYPAs7bhVaSk2l QuFcg9fjP3YGSa7bYR2X7snlHg== X-Google-Smtp-Source: AOwi7QDC4t6/0RUwsEXYhJsXiZEX3siLhp70j5bcYOWBmp1MousQ3QT1SwWPRwgTZdvPnzz3GuNBnA== X-Received: by 10.101.81.135 with SMTP id h7mr4753564pgq.48.1505974741977; Wed, 20 Sep 2017 23:19:01 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id q23sm1037773pfk.182.2017.09.20.23.18.56 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Sep 2017 23:19:01 -0700 (PDT) From: Baolin Wang To: perex@perex.cz, tiwai@suse.com Date: Thu, 21 Sep 2017 14:18:08 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: X-Mailman-Approved-At: Thu, 21 Sep 2017 10:19:53 +0200 Cc: mingo@kernel.org, fabf@skynet.be, arvind.yadav.cs@gmail.com, dharageswari.r@intel.com, linux-kernel@vger.kernel.org, arnd@arndb.de, baolin.wang@linaro.org, vinod.koul@intel.com, hardik.t.shah@intel.com, guneshwor.o.singh@intel.com, lgirdwood@gmail.com, o-takashi@sakamocchi.jp, gudishax.kranthikumar@intel.com, broonie@kernel.org, bhumirks@gmail.com, naveen.m@intel.com, jeeja.kp@intel.com, alsa-devel@alsa-project.org, elfring@users.sourceforge.net, dan.carpenter@oracle.com, deepa.kernel@gmail.com Subject: [alsa-devel] [RFC PATCH 6/7] uapi: sound: Avoid using timespec for struct snd_ctl_elem_value X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h index 1949923..71bce52 100644 --- a/include/uapi/sound/asound.h +++ b/include/uapi/sound/asound.h @@ -943,8 +943,8 @@ struct snd_ctl_elem_value { } bytes; struct snd_aes_iec958 iec958; } value; /* RO */ - struct timespec tstamp; - unsigned char reserved[128-sizeof(struct timespec)]; + struct { s64 tv_sec; s64 tv_nsec; } tstamp; + unsigned char reserved[128-sizeof(struct { s64 tv_sec; s64 tv_nsec; })]; }; struct snd_ctl_tlv {