Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3819257ybp; Sun, 6 Oct 2019 21:13:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTbbAQWIEysXMJkn08m/lAzVRC2FwfkD4fUT6PLmB4v3PDaFWuQ9PeTSX5X38jlXNeg2jb X-Received: by 2002:a50:b6c8:: with SMTP id f8mr27427736ede.33.1570421599832; Sun, 06 Oct 2019 21:13:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570421599; cv=none; d=google.com; s=arc-20160816; b=yvnpoakyctfYOBaRaSz1xnAAfff/pkaAZGxisYhb/sxGv51oQVOVFmoAvZFzPYkvKL k6Pm2nyeCRTsEN7le3YktI2zzH/x66tivhGu+/2ompPV3HNFzCwlPk8z7y2U14IH9Leo 87fQI0u74ywl4Fnfpv2/40X1jKDaiPJPODIALVtXPvA6k2AqYMeUYgqMnB99wmVt6RCE JMg1aBo+0GwJe3dQVjNyBulDLCROuZLyf0wOm20TgWLRrXe4604NPWpBaFqSihopUMiZ N71T0M0fiZeXLa03XAVsOeO2FMjaZzA9F3TZd4TgKOr4cZrqXxy15rbrIAmxu1V+6gwW 7ehQ== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=Qc7kdQEQSeKLCS/0wAc93VS/IctKNqs8VpX26LsuFE8=; b=shf4JHAaiLkpLv3HamnlPPxbEnExWyqs7B3MsB3w2mFlMzOfLJ4iEiaqltna5TwF9R R4ewDZmax6oO9qT65YjBReV6HTlD0f1KyUaUrxllG9sJUlpq6PwglwyS0e0ZOGQ36McG veOs41hFydz1PsLsMQNYgUVSvNvI5PkncNaLkFc/70lp6EMUpi5winoWiYfCN5L9JvC3 eTDvk5MSIEqbaGpIIS1D8tXkVwXJDLsw5K/qirSftcVbg/8EhA51wG+UR/B808jZ3LCC LCP1nI3lRvxgt+87voU2TsOYaUqKmwejhcc1OYOftX/8Z4j65j4iw9xDjEUO0K5lM9Je JjxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="A/5d4dVI"; 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 z12si6291132ejb.312.2019.10.06.21.12.56; Sun, 06 Oct 2019 21:13:19 -0700 (PDT) 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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="A/5d4dVI"; 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 S1727219AbfJGELA (ORCPT + 99 others); Mon, 7 Oct 2019 00:11:00 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:19204 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725954AbfJGELA (ORCPT ); Mon, 7 Oct 2019 00:11:00 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x9749g3X018731; Mon, 7 Oct 2019 13:09:42 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x9749g3X018731 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1570421383; bh=Qc7kdQEQSeKLCS/0wAc93VS/IctKNqs8VpX26LsuFE8=; h=From:To:Cc:Subject:Date:From; b=A/5d4dVIrqN2WaWhbcE02/wOFnI0M06+MISGepHGVg4j0vPmj2QAzi6Ii95u/qmqi kCEltsICPi5l3akHJ8G7v/NybUuquWnBddU3XXM/glsFo/ocAbRKjjSBCdYdLr7dg2 ivepUNDchYZSJAtDPs1xe8jMf4+RrIXn610OdYvCFcVsKrPaEQeEzGoHkZ54DLu51m 24F0QEn3ZBq6Yu6Ik7V18BCezhTEQS0BwRBSr7KXPRsx8eoTuOGx8EQ1pJIptwTNE3 knUGeHE9y7FTGFJnXI/IUkhy1RT0Hn433mPRqZNxJ2wM1yMOHqR7549Svb7XGHKdBE 1vtpSootLRSaA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Mauro Carvalho Chehab , linux-media@vger.kernel.org Cc: Arnd Bergmann , Masahiro Yamada , Heiko Carstens , Pablo Neira Ayuso , Sam Ravnborg , linux-kernel@vger.kernel.org Subject: [RFC PATCH] media: videodev2.h: include instead of Date: Mon, 7 Oct 2019 13:09:35 +0900 Message-Id: <20191007040935.23436-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, linux/videodev.h is excluded from the UAPI header test since it is not self-contained. Building it for user-space would fail. ------------------------(build log1 begin)------------------------ CC usr/include/linux/videodev2.h.s In file included from :32:0: ./usr/include/linux/videodev2.h:2320:20: error: field ‘timestamp’ has incomplete type struct timespec timestamp; ^~~~~~~~~ -------------------------(build log1 end)------------------------- The in-kernel timespec definition exists in include/uapi/linux/time.h, but just including causes a lot of redefinition errors. ------------------------(build log2 begin)------------------------ CC usr/include/linux/videodev2.h.s In file included from ./usr/include/linux/videodev2.h:63:0, from :32: ./usr/include/linux/time.h:16:8: error: redefinition of ‘struct timeval’ struct timeval { ^~~~~~~ In file included from /usr/include/x86_64-linux-gnu/sys/time.h:25:0, from ./usr/include/linux/videodev2.h:60, from :32: /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h:8:8: note: originally defined here struct timeval ^~~~~~~ In file included from ./usr/include/linux/videodev2.h:63:0, from :32: ./usr/include/linux/time.h:30:0: warning: "ITIMER_REAL" redefined #define ITIMER_REAL 0 In file included from ./usr/include/linux/videodev2.h:60:0, from :32: /usr/include/x86_64-linux-gnu/sys/time.h:92:0: note: this is the location of the previous definition #define ITIMER_REAL ITIMER_REAL In file included from ./usr/include/linux/videodev2.h:63:0, from :32: ./usr/include/linux/time.h:31:0: warning: "ITIMER_VIRTUAL" redefined #define ITIMER_VIRTUAL 1 In file included from ./usr/include/linux/videodev2.h:60:0, from :32: /usr/include/x86_64-linux-gnu/sys/time.h:95:0: note: this is the location of the previous definition #define ITIMER_VIRTUAL ITIMER_VIRTUAL In file included from ./usr/include/linux/videodev2.h:63:0, from :32: ./usr/include/linux/time.h:32:0: warning: "ITIMER_PROF" redefined #define ITIMER_PROF 2 In file included from ./usr/include/linux/videodev2.h:60:0, from :32: /usr/include/x86_64-linux-gnu/sys/time.h:99:0: note: this is the location of the previous definition #define ITIMER_PROF ITIMER_PROF In file included from ./usr/include/linux/videodev2.h:63:0, from :32: ./usr/include/linux/time.h:39:8: error: redefinition of ‘struct itimerval’ struct itimerval { ^~~~~~~~~ In file included from ./usr/include/linux/videodev2.h:60:0, from :32: /usr/include/x86_64-linux-gnu/sys/time.h:104:8: note: originally defined here struct itimerval ^~~~~~~~~ -------------------------(build log2 end)------------------------- Replacing with solves it, and allow more headers to join the UAPI header test. Signed-off-by: Masahiro Yamada --- I am not 100% sure about the compatibility between and , hence RFC. But, if they were not compatible, I guess it would have broken already. I CCed Arnd Bergmann, who might have a better insight. A related comment is here: https://lkml.org/lkml/2019/6/4/1046 include/uapi/linux/videodev2.h | 4 +--- usr/include/Makefile | 7 ------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 530638dffd93..2571130aa1ca 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -57,11 +57,9 @@ #ifndef _UAPI__LINUX_VIDEODEV2_H #define _UAPI__LINUX_VIDEODEV2_H -#ifndef __KERNEL__ -#include -#endif #include #include +#include #include #include #include diff --git a/usr/include/Makefile b/usr/include/Makefile index 57b20f7b6729..dafa6cb9b07e 100644 --- a/usr/include/Makefile +++ b/usr/include/Makefile @@ -23,7 +23,6 @@ header-test- += asm/shmbuf.h header-test- += asm/signal.h header-test- += asm/ucontext.h header-test- += drm/vmwgfx_drm.h -header-test- += linux/am437x-vpfe.h header-test- += linux/android/binder.h header-test- += linux/android/binderfs.h header-test-$(CONFIG_CPU_BIG_ENDIAN) += linux/byteorder/big_endian.h @@ -33,13 +32,10 @@ header-test- += linux/elfcore.h header-test- += linux/errqueue.h header-test- += linux/fsmap.h header-test- += linux/hdlc/ioctl.h -header-test- += linux/ivtv.h header-test- += linux/kexec.h -header-test- += linux/matroxfb.h header-test- += linux/netfilter_ipv4/ipt_LOG.h header-test- += linux/netfilter_ipv6/ip6t_LOG.h header-test- += linux/nfc.h -header-test- += linux/omap3isp.h header-test- += linux/omapfb.h header-test- += linux/patchkey.h header-test- += linux/phonet.h @@ -49,9 +45,6 @@ header-test- += linux/sctp.h header-test- += linux/signal.h header-test- += linux/sysctl.h header-test- += linux/usb/audio.h -header-test- += linux/v4l2-mediabus.h -header-test- += linux/v4l2-subdev.h -header-test- += linux/videodev2.h header-test- += linux/vm_sockets.h header-test- += sound/asequencer.h header-test- += sound/asoc.h -- 2.17.1