From patchwork Tue Nov 12 15:16:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 179223 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp8258809ilf; Tue, 12 Nov 2019 07:19:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyBLMwn9Lqcqz0bJqy9413kunlIjm6a4UxG6sZ+fipokSqoIe4EcQDJOPO2FEekgJnepCOW X-Received: by 2002:a17:906:a457:: with SMTP id cb23mr28629963ejb.191.1573571963207; Tue, 12 Nov 2019 07:19:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573571963; cv=none; d=google.com; s=arc-20160816; b=b+5TqYfyHqaemwdZJyDdCF/p9hJpw+F1i44+KsgxGD4+mFn4RFRfvqZARufq3pHL19 4wCQ9tZwgRUjUxezDpXPPrqTFhPDdqt+DQSWMqCrMQJdVBvbTVWgQ2bDdKzjOT5zcm9u rFzE+R2rWwrkEwxUjXE13NTO1vdtoh6oxMYGuTv5MVZ7Ggh4j6ZaST5xk91Uu61krv0J Mb9R/MKFjTyixzzMV0Wxn7ZzzOB7Pl2aTpIqZ4YCX+7XQyswTOtTQggJyi3sVMVKYBTd qVJRbMOhiyv7/hZXg+p6EUmZDcEcQVW9lWDzxVas2u6+0T4itThbacW4nOBteY64n6Qt u3PA== 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=L6NQ1B2cQHvrSyZewpq4v7FeqDcuVkTLke4ws5FIu5oeCfzdswIqZ3cdzDPcjvDcld kXqmds2XqZQRbSOU7H4fJmOgyStvQlIzlnYjiUuWfWxofO1RniL2466SuA+ca0iz+T/Y yUcaFmgweuYkpvWPHekwgy0aTIKoyC6YscEnI15stLx6B9TENV002W6iGwVEEYY55NAk oelqQcE4xmdqtwwRpqn8q6Qle3TQt9ZS/ouY34uFX/XzeZsKd0wXyje6njRiJU5RupPV HsFVk8aRiaVbv1+UEHe0NunIuVL8qaKAj+UtjRtZGNGX0jcEhBPIZ4ZXnAJfDUxxu8b6 0N+A== 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 i16si173912ejh.75.2019.11.12.07.19.17; Tue, 12 Nov 2019 07:19:23 -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 S1727492AbfKLPTN (ORCPT + 26 others); Tue, 12 Nov 2019 10:19:13 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:42673 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727392AbfKLPTA (ORCPT ); Tue, 12 Nov 2019 10:19:00 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MtfRp-1hc9qA0Y5H-00v4Hm; Tue, 12 Nov 2019 16:16:57 +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 v6 3/8] ALSA: Avoid using timespec for struct snd_ctl_elem_value Date: Tue, 12 Nov 2019 16:16:37 +0100 Message-Id: <20191112151642.680072-4-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191112151642.680072-1-arnd@arndb.de> References: <20191112151642.680072-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:lAmj6kwQ3S1uoAqMviQM0k/X4NCJC4z7wsHW/iJ6hmK73azYUPt LeTeoMm+SHmEwAZSSGex8hmlIuQz1YByD4R8gEFDR4S+8G55DbnRcj0W0ApNMll1LTV74a0 eMmTSt5CgtWlHtvPZzJeGmfuKGcw5DNGmAbCUAJLXaT7Q1+DC17XLuD9xk4rBfumKtKNjGg 81fE5bja9OklrzP2MBUJw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:NBo0lQzLa3c=:TO19rw24nS3btXFzrd006z LH86aIw7gIdJ1DH9EzgtWisBKUxfHshRNwfm6je6GgCiQh1JWB17Ilq3e7N13lsbNAt5f3d41 YjJUYkVoQdvx9Z1iat/l5h/N9b2TjHp8v6NAm2LWn5cOqWHy1OeWIC2fGXA6PwwIdvdQd0392 oAZk2ix/wgG+bdCQKbQsrAmEw0VnpjUWOm+/Ia5YTRmIYvPgRUmS1fSIy50OvVWtuOS/xnIfe PVvEXxGKggyvU7VHTDWY3RfXIZ3lnAawDoi6eptSKIC+dF88FATHjsXCVF3+ZLVuDLmf4Oc7m wgl1j/bNO/22zESP/fxR0i8Xu6z7n80I6WL9+9x3UK3KpkTxAttrVOzPUe1WFD53MF9SqC2Pz Rf8dw6lAi0LzG/BkdXaHO9sumnOCpb5hDVUqj6sk3q/VS9WmS46RYghR3TJ8G05de7aiUa9wk AVlTOYNOAeUBVkwzrC9WM5cahcmMVXlNKV1vnakMfDZkGvCBwez09eOnVLKMA578el4yvpeFj CfIY3lrRaJ+z0bpEAoPEiHcCxBjV2ukhd9+Sqq7dbj/X+JVErMseRlb50e7cSNVPjjsUmGKvN i8rqbtgmSsPJP7HX/uvY8b6IzAuCxafnWmhT8xHDT2Wh5uTZN8xbyxjPRQXtNi/ZLzNY2o8Xc RxbvsLDLwyLlP/Ke/+3XeAep6/hUUMyCNPi4nDjauabkZGig4aOMT0We4ZkAwlO4KLfr9bncX d7W5sXZ1dnuh8dZi4yt3oHeDnZr5C52ECiVRTMOG+i8bA0Fv3s1t1/jDnsR6rUJY/mqQkEFUj jvpyaraqnBYUW/zQgOgJsxvhyv71jJ9P4IJJDAmkxZ4OKsoqYKPtYXEGJ2JUL7Sg7GoybdGh7 Ql4RYV1KciH+TmKXFnjg== 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 {