From patchwork Mon Oct 7 04:09:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 175306 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3772126ill; Sun, 6 Oct 2019 21:11:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwoRJofekcbHBYczA6pKW2PSyzlzMbPHiJUyfiY6l8CGXQL0mBwV/6V/9Sjzp1VaK/euH0I X-Received: by 2002:aa7:d9d5:: with SMTP id v21mr26726955eds.106.1570421463433; Sun, 06 Oct 2019 21:11:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570421463; cv=none; d=google.com; s=arc-20160816; b=qW+c9+Go/vGJ1kr1DFXKvYlrpo+4bV/RRlJbJg7NEqZiTW2ZWSIW+CqxljoPRD9KPU PXVL/B0kCkx8F6mWy6dWC/reglVQ5kVmxe/eVNDOoNH2QMTizKI8W1VIsyr7wfPRbZCW lM7ABu5UIfglr47VU4QYfF0Pu+MQiYHApYh510Rewg7+aOLOxwI3FWzGIvRMVBu+grYN ZQ5VwmdQZgy/UcWTAcxp78wl3oXyfX9ko3VPC7YdiVLcpOYWuv7X3F6TteGXTvgdXEl6 fDIACnCMxvX8j9Gdm0Vf7+aO3RIC5zF6jG6U+cr31a49H9eHKxEiBA2VPOAFQDzlU9DN HM0Q== 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 c36si7483169ede.323.2019.10.06.21.11.03; Sun, 06 Oct 2019 21:11:03 -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 S1727225AbfJGELA (ORCPT + 26 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 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(-) -- 2.17.1 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