From patchwork Tue Apr 24 12:06:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 10359429 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 452D4602D6 for ; Tue, 24 Apr 2018 12:17:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35BD028DA1 for ; Tue, 24 Apr 2018 12:17:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28BE028DA3; Tue, 24 Apr 2018 12:17:24 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C79A28DA7 for ; Tue, 24 Apr 2018 12:17:23 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A96AF2676C4; Tue, 24 Apr 2018 14:07:35 +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 DEA84267230; Tue, 24 Apr 2018 14:07:31 +0200 (CEST) Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by alsa0.perex.cz (Postfix) with ESMTP id 24EC5267230 for ; Tue, 24 Apr 2018 14:07:29 +0200 (CEST) Received: by mail-pg0-f67.google.com with SMTP id 82so877193pge.11 for ; Tue, 24 Apr 2018 05:07:29 -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=vUyTPQbeeV5LPYBWuuFi98dtmXZHDhJSABAC2yF64hU=; b=JmhJu2SyxWmLE9XiGbtmaDXnVLGDjaC2ZSUBRfYNhG3JntPGeuo0Rpca4h16HGW50L 8fhxl9DttyYKBPd/tdc4h6n/7KQg3jnEnVFJmOrbp4Q1i97ynYsMZNUqKx0CIZZOr8oD W+z+CkhQhdtWOdrarioirhNAOBWkcm2kh+iMc= 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=vUyTPQbeeV5LPYBWuuFi98dtmXZHDhJSABAC2yF64hU=; b=sFW40EP4Wj/9R2KRLT59v98Zgc18UWNck7B9MBdzh+URD3GARvvVV9YyDC5DMQazy8 eanlXm1ZmmzBkZm4fPeiYVjCaRDUGTGQ+ZyVwOA+e40ssUWWuFnz/vjAH44k4nW2WuiT dX1gCD5RHzoYWrsHIVUY/8+AeZlG6T6LdODV6QX03/TLPrfBmycp8WEKCn4kL6olMcm8 jIJrZczJrygg12q9FCtvmcdVfTfsmqaiudye11wu1tBV+nJR6E1kgLJFZEK3evdcDtq5 0T/AkGpfHPJdLay3fTT47keLjxXh//BEUqGt9IyclAKrpapW8eXi6MdCsgeVZtnQVBns J/yw== X-Gm-Message-State: ALQs6tA5k5sh1ejB1PMy/v+A3fV7QirvNe+YTluF5lZkP/OewIW4Q43i 9Bx9WAEykxMgLrNIDScnd5i6MA== X-Google-Smtp-Source: AIpwx49AR9G/jt4H22MtEiFBxXliALkxV3ZFwrZIP3b4kVdxyYvhj/LAIWKjVNHtSzsd7NzLm6Z7Ww== X-Received: by 2002:a17:902:14cb:: with SMTP id y11-v6mr24705422plg.23.1524571648819; Tue, 24 Apr 2018 05:07:28 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id c7sm46350567pfg.81.2018.04.24.05.07.23 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Apr 2018 05:07:28 -0700 (PDT) From: Baolin Wang To: perex@perex.cz, tiwai@suse.com, arnd@arndb.de Date: Tue, 24 Apr 2018 20:06:10 +0800 Message-Id: <33f88d93c2330a17c50c51f1d0e7742f4d27c12a.1524570852.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Cc: fabf@skynet.be, arvind.yadav.cs@gmail.com, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, baolin.wang@linaro.org, vinod.koul@intel.com, hardik.t.shah@intel.com, guneshwor.o.singh@intel.com, lgirdwood@gmail.com, elfring@users.sourceforge.net, gudishax.kranthikumar@intel.com, broonie@kernel.org, bhumirks@gmail.com, naveen.m@intel.com, jeeja.kp@intel.com, o-takashi@sakamocchi.jp, subhransu.s.prusty@intel.com, mingo@kernel.org, dan.carpenter@oracle.com Subject: [alsa-devel] [PATCH 3/8] ALSA: 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. From Takashi's comments, "In the library, applications are not expected to access to this structure directly. The applications get opaque pointer to the structure and must use any control APIs to operate it. Actually the library produce no API to handle 'struct snd_ctl_elem_value.tstamp'. This means that we can drop this member from alsa-lib without decline of functionality." Thus we can simply remove the 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h index ed0a120..1231f0a 100644 --- a/include/uapi/sound/asound.h +++ b/include/uapi/sound/asound.h @@ -954,8 +954,7 @@ struct snd_ctl_elem_value { } bytes; struct snd_aes_iec958 iec958; } value; /* RO */ - struct timespec tstamp; - unsigned char reserved[128-sizeof(struct timespec)]; + unsigned char reserved[128]; }; struct snd_ctl_tlv {