From patchwork Thu Sep 17 21:19:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7210611 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DFDAA9F336 for ; Thu, 17 Sep 2015 21:20:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 11A712074B for ; Thu, 17 Sep 2015 21:20:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2C66C20768 for ; Thu, 17 Sep 2015 21:20:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752260AbbIQVU2 (ORCPT ); Thu, 17 Sep 2015 17:20:28 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:52291 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751992AbbIQVUZ (ORCPT ); Thu, 17 Sep 2015 17:20:25 -0400 Received: from wuerfel.lan. ([149.172.15.242]) by mrelayeu.kundenserver.de (mreue102) with ESMTPSA (Nemesis) id 0Lj2j8-1Z1xbM2teI-00dCEV; Thu, 17 Sep 2015 23:20:14 +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, Hans Verkuil , Arnd Bergmann Subject: [PATCH v2 3/9] [media] dvb: don't use 'time_t' in event ioctl Date: Thu, 17 Sep 2015 23:19:34 +0200 Message-Id: <1442524780-781677-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.1.0.rc2 In-Reply-To: <1442524780-781677-1-git-send-email-arnd@arndb.de> References: <1442524780-781677-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:E4G2myEgcqt43LLNaG6vxFQC83/LziMlB+S4CJxfttDSTdYfS71 lHvWP8W6ADYn9Ny0Eas3Z+YcZBpatI6tpJaB54SLi0PyJNHmAVXmYZJ+JSnn1FsG+N9jL1z pFGxzIdJyahJHLzbgzcAk429GdkGkpxjK7zgdgBhPFC24f7tuK9BMq9+RnmdgUYB41wLSZd PTPKCfQTCtZopwSchO5ZA== X-UI-Out-Filterresults: notjunk:1; V01:K0:dpWPBZdkLTA=:TK+4wdxFOkbgOCcQRO54az gNM/sFCRD8fF0w7y+0BcrPBqclp+HX465or5RWzm/mbsfGLniUHETRJRcAh9nMdb5S5uVU0gP 4EDLg0645GTNzI8ab9M0+MnGpfAOqKYlXy/GmsMrC9KXCG/+4x63Db8pjREiknOwTh+et+Xbb Z32MlmrECWqY1thq5ZxfHNv7e2uqxPpvkbErJrNLsQZL3Klvsdbpt8FK+Cl8e7k4nOLyIVcwz SjE9b68P52K3nRAGEyMHzn17gyE51UU3jdtX1zS/Z5VIiNo5DhBQzjZ9TOsB/V271jVdQMo25 A3DwHNzCNWN9j8Pjnj0rdtkkCxwBEhbRZh0gVGDDMonbyVbEDp3cSM9M5vi4N0vMo8qfzdN99 W7xzsk31U2lahGa6yHyjIjkQCASQM8Xik6nuSlU0ZwDnKsjDF+jiRWt4bsQCREDjrIIvviile DdoNTpf0th+nrh4CukZZlUvz6lm4j2y4v0AtrYjbwHj+IJcQCzoUWkWs5jG8VM2Q4vLtAxx4G lyOaKD8Bp17DKXJGHOe1YQoMNfduzO+qHRXCYKd1l/FYaXuYwa+n8L63sFCKs1yNSxJeAldBi jlpqqYx467bQqFkF51ZMTKdp9Lp17NiWhGfLIN+DEfsAWANq2iY7IYwaZVieT9bQvAsqSskNb 9cg9ogEZ7Vw1Cn3NwkXn1W3sAMPSXxa73f2diG3HGVsDfOJRd2VBuXlME/gescWRibaA= 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 */