From patchwork Wed Dec 11 21:20:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 181346 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp1300693och; Wed, 11 Dec 2019 13:21:07 -0800 (PST) X-Google-Smtp-Source: APXvYqzZUyvpcYi574VBGONWVceAioOoF4ebPjWHFfpgSkUu3X4vjwBw97cVvnxn5RZ390iaS95M X-Received: by 2002:a05:6830:4a7:: with SMTP id l7mr3841124otd.372.1576099267754; Wed, 11 Dec 2019 13:21:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576099267; cv=none; d=google.com; s=arc-20160816; b=A1tYP27Qf3X8ZbFgfcRCqKEGeGsOoT/ROJ5JxUCmcFXxyMVv/m/BPE/dxlOIdobjPv CDoce8DiwPlU0rl9UmS5fr/t6JHTRQrN0dSlRseRpHWTDhbdsH+SLmSMasF0exdSlQFq 72iSedBIbNvs+WD9uzI7iV8rR4M7QeFudNLeMtUlGOIowSPqnVR1IhowhXfDYyKWCI8+ F0xc3Xf8ab/U5dLmLjgVIOJlWlbYzab8p5IlRW+qc+/gpGDn95Oo1Qbp/gN/Nzht2Csc t0kl4jzCLQahfiIG8IL3Xu+XnEDySiSi2DPBN73JqBPh1YNxLW+JmrgEA5/TqNStmNO1 DuMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=xcVaA4hF5NRkiKDkA9rZZ7a/5XluI/AFb3vzoCgEbCU=; b=flwGqGS5Va121A2EeuyJyLhU3wQXDlbvklN7zXCDBsWv/ntALrsXo//6MuP1cxWJLq aLk9oo2bdwpM9crbbqHpyWpK42MPXW6CD9KrBSq43Gr6Z7NnGrPWnvyn49kuBkUBWOdk h3V2wFFbU6+PNqazhr0t1TlteGXXK8UxVz9gKJkdQF1r+m5MbreyAx85fm+i7rhwyDeT UxkdWC89yed45ylOBXsUKvPa54NVdBqt2IBbtJA89qKIseDScO37H45il4kz2cF92u9X dDRcuGnq/ay6HgENAbz3mD5/TYzGpYmQMoQICnbg95JPMDCopSeIaqsK0X7xNiiJ+yYQ JfVg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n14si2111604otr.162.2019.12.11.13.21.05; Wed, 11 Dec 2019 13:21:07 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726913AbfLKVUy (ORCPT + 27 others); Wed, 11 Dec 2019 16:20:54 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:60715 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726313AbfLKVUu (ORCPT ); Wed, 11 Dec 2019 16:20:50 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1MgNtR-1i5Ehb062B-00hwBH; Wed, 11 Dec 2019 22:20:32 +0100 From: Arnd Bergmann To: alsa-devel@alsa-project.org, Takashi Iwai Cc: Baolin Wang , y2038@lists.linaro.org, linux-kernel@vger.kernel.org, Jaroslav Kysela , Mark Brown , Baolin Wang , Arnd Bergmann Subject: [PATCH v7 3/9] ALSA: Avoid using timespec for struct snd_ctl_elem_value Date: Wed, 11 Dec 2019 22:20:19 +0100 Message-Id: <20191211212025.1981822-4-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191211212025.1981822-1-arnd@arndb.de> References: <20191211212025.1981822-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:iykmUU2XsgojNUhRxWJ9NKMPyV+S5EjEfc7usTwDkBJbIBAqrkL 3tFrJsChkCKQQP8cc6PcvoPSVrNMveKGCfO//KYYhF5BZEkAz9nv5oL08XPfmj9fljInh8q rRf67DV8uhtHRsp9SY1WD/jT2xx1Vqy6lmulsPlTyWWvw6URc0bIQ6o8EfwfYVi0Vv8OvSB jF1jI6Q1fulMXykAIa3lg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:zyamFrw9k0o=:87xM/lq8CmcweWUktkqZrD T1dkqosterDjtfnqKNe+tq0c18geQ4i/1gRHbssNpQfn6DiOsLrEtSz8cyuF1t/R6zL78O7EU qFu7RO4yf/7qU9NtMORtsVIZHUnk8LPUYgoTqGOOqNvnqi7s5MCjcrDGOqiokj5d5Wgt5CpEs thlc0yK0XV6A28RYJohNo5rtUUxXvJarW70Uj33T6m1SkBgMDI+EEBQ3ASlOwrLxGqfAVje99 8QlEdo/VqAwsby9HfgNy3J0lqBy6K0fPeBkCyKIPfIlgPSNb2vK3yEhmmf/4wIeLRlCDLL2f7 k9DFJKnloMSUxZsOVw8J2MXeFACrrMxFnvping3zVkl3us7jfoXxfLmz6tDu3C5UzIuYhTrxz 2hMrbXcQLj13u8YgPNWefQnxzad0Szy+peaaCaEwMtqTnK43zCxt+NVJ+nqnIma0jeXEFdsjl PGJ52Fp8EbZbv2ttcCzB75JJhJ1OxyAEaVXuRBi83G8sO6Upd06+NpIukp7z3wibwPLl7jZQD OLF2GgMBst6YVp/JPmJXGEH+b3hx0xHGgJBhK4NnLI+uEc9SeIBPE3gEZB+xWVHo2QcUD2/rg XWhk8YRoth4ZzslVgecvX8D/ILyvW06+LZBaFm8IQPofAf1/gFYNnZthNDwxvqKjXmmulhlTR ZVlE/AEph24o3styRMjlWspEnDniKtPuQNBOgkx6GqFJjbmO/3LnMznCSIkhprsvjLbBi0adA ejPH+nbkYDNVXtdDBCEWCDubvbRr1l921DJ3IknP3NL3F9BdxD0fB39VWTnpXWkt26JvA+TGk x0aBuuQ4SkS4y/5CREQlUT2HC0gsU/YrVThX1GumgA9IaBkC6rR6H/YtG3NguumgwkB5e7v81 GP0tEdDFyR6fVAFHU4jA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Baolin Wang 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 Signed-off-by: Arnd Bergmann --- include/uapi/sound/asound.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.20.0 diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h index 930854f67fd3..40a23d8418fe 100644 --- a/include/uapi/sound/asound.h +++ b/include/uapi/sound/asound.h @@ -957,8 +957,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 {