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: 10038467 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 7928F60291 for ; Thu, 2 Nov 2017 11:10:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BBDF28F01 for ; Thu, 2 Nov 2017 11:10:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 606ED28F05; Thu, 2 Nov 2017 11:10:26 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=no 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 18B6628F01 for ; Thu, 2 Nov 2017 11:10:24 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 21464267448; Thu, 2 Nov 2017 12:08:48 +0100 (CET) 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 856CE267478; Thu, 2 Nov 2017 12:08:46 +0100 (CET) Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by alsa0.perex.cz (Postfix) with ESMTP id D3FA8267476 for ; Thu, 2 Nov 2017 12:08:29 +0100 (CET) Received: by mail-pg0-f66.google.com with SMTP id r25so4771763pgn.4 for ; Thu, 02 Nov 2017 04:08: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=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=ufzAAz/31EQWiJ6LgVQV5neJuIcsu+hm35UV90hjFTb9ylOBpz4oiI8IF9CPgIbsFL S3EOVYosePDmYK5uWMrUIWYSj2b6ytytN58Oy5t7W5gBhbsBAGklx/Xi9H5wJgvGvdzF DDOFwj2IPhtfkDv/z5Vt2/iWf/AoKBG2LDFQ76SQ9IU0KrrSwvrELZnNhA27zEHnEkdX F0nNxzfrl64UbzArDWYmdBB9EVOddlPUsKaCA25Z6q2Y+/Z9y1I+EakE84GSURGpk5VC hvETi6tmqwtZJE/KoKM6vpg8KMMbbRwKkZSb4stpmL2cjhadr+Dxm7A9Nv6kw4+CqASm KKeQ== X-Gm-Message-State: AMCzsaVGRmepkN/7Ye4Bvhw+KFjoIEpI7zkxGZn6UhquF03/f9D/4ijL m/vF2L/gEnQn/KaLtHmSullFOQ== X-Google-Smtp-Source: ABhQp+Sxnxk4htBGh5Di3yf/f5CNN/3bASnyzKWkDE2kCfagbYgklDoNLkNpxjt2HaUS0LKxos08vQ== 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 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: 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] [RFC PATCH v2 5/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 | 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 {