From patchwork Tue Sep 15 15:49:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7187861 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 670DBBEEC1 for ; Tue, 15 Sep 2015 15:55:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8ED63206B5 for ; Tue, 15 Sep 2015 15:55:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FE5C206A7 for ; Tue, 15 Sep 2015 15:55:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754109AbbIOPwx (ORCPT ); Tue, 15 Sep 2015 11:52:53 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:51875 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751923AbbIOPte (ORCPT ); Tue, 15 Sep 2015 11:49:34 -0400 Received: from wuerfel.lan. ([149.172.15.242]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0LxLzO-1YWNRN1ep8-016yya; Tue, 15 Sep 2015 17:49:27 +0200 From: Arnd Bergmann To: linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org, y2038@lists.linaro.org, Mauro Carvalho Chehab , linux-api@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Arnd Bergmann Subject: [PATCH 3/7] [media] dvb: don't use 'time_t' in event ioctl Date: Tue, 15 Sep 2015 17:49:04 +0200 Message-Id: <1442332148-488079-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.1.0.rc2 In-Reply-To: <1442332148-488079-1-git-send-email-arnd@arndb.de> References: <1442332148-488079-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:mfiMFyDrutirl9JaGecPyt18vgAjKHdLpf2XA7ronyrnVFIDSCQ vj71XJjCvYVBKdbyrnvb3jM0M6APguXHuugBy/okGOzJKSwriA6RPr3afzgrJ9XEX/V1Gi7 HDK5AhpAidJ41FJfsRjefxKKVc4BRLK2YBobPXBHL0AbS7E2AeKkWHhyjNNiS3Im+QiwlUO nzWo6IYLBAyvuxaorqDxw== X-UI-Out-Filterresults: notjunk:1; V01:K0:Po748WAR9uo=:T5Gk288mX+1eMU6FISIFUs 2Q+LzWKVueOOJoFjy04kA5HKxL/NEyifdu2gZPeDmxS99GcdUlXmDEgpLxlVBmWimMejUafmB kCend2p7tJOoEAEgs/DXThFQUdP5E4bedscKayljBt0ZJnxbS33o/70wdRHJ/9tt7TMppmD7D NIcIyGXU8Qulu/igJfKYvZLb+GyQ1b3AxaWbV+MrnPt3cBqk9cZBFwgOSChy1gHjYOWyMn0SA sTi8u8nRGAluyOk8EZK9zJFFta0uVyRm5lKZS/+8eCozQEDkITn65LwmDbC4XOvp5PENafxiN rTXz20wQh5qkB6fDq8MY3o9XFcmv2SsFNq+9kpqah0q5ppT7i6YqAnmQbxekW4sp1kNYvW6Q5 +tMRd331a4ptJjC3coJjqYc6gkQ7yvMYgPvyGiquUdyla5MMU5+1fq2ju0AvZW1LvR0Ry6khM i8EYBGPRSSqp3NGSbj8bykk6yI1Js3U3hpguWi9eHgPQktGBLzPkQxOdgeRu4Hf2aKyIKdDZs obw0fed3Vvv/C5o6UFihrxiVsirFOOiEhEJlc+c/z2nTH4g5n1XTeWZgzguNmXHbk2ojpE1eU hK2Z+ttC+8ghBPrpMGPz0cqB3WnZ0ybXCT8rULHxjCqZUKn/QdAgwvu7Fy8P5UThmCPUlvMu0 5WQ6ZT6Ar2H9lvlicANszqSCP+pyQv/QkVWuYReJetNQhwUfwoNxHtD41pZfWaPDwqJQ= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 'struct video_event' is used for the VIDEO_GET_EVENT ioctl, implemented by drivers/media/pci/ivtv/ivtv-ioctl.c and drivers/media/pci/ttpci/av7110_av.c. The structure contains a 'time_t', which will be redefined in the future to be 64-bit wide, causing an incompatible ABI change for this ioctl. As it turns out, neither of the drivers currently sets the timestamp field, and it is presumably useless anyway because of the limited resolutions (no sub-second times). This means we can simply change the structure definition to use a 'long' instead of 'time_t' and remain compatible with all existing user space binaries when time_t gets changed. If anybody ever starts using this field, they have to make sure not to use 1970 based seconds in there, as those overflow in 2038. Signed-off-by: Arnd Bergmann --- include/uapi/linux/dvb/video.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/dvb/video.h b/include/uapi/linux/dvb/video.h index d3d14a59d2d5..6c7f9298d7c2 100644 --- a/include/uapi/linux/dvb/video.h +++ b/include/uapi/linux/dvb/video.h @@ -135,7 +135,8 @@ struct video_event { #define VIDEO_EVENT_FRAME_RATE_CHANGED 2 #define VIDEO_EVENT_DECODER_STOPPED 3 #define VIDEO_EVENT_VSYNC 4 - __kernel_time_t timestamp; + /* unused, make sure to use atomic time for y2038 if it ever gets used */ + long timestamp; union { video_size_t size; unsigned int frame_rate; /* in frames per 1000sec */