From patchwork Mon Sep 23 22:40:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 174224 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3381869ill; Mon, 23 Sep 2019 15:41:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7s/AuSYx5aW7EjavK0DDCJ9T5AjVjTukExTsNmXBYldPPzgkA/s/Jxs2iuoN1g6w8JRLy X-Received: by 2002:a50:b582:: with SMTP id a2mr2628246ede.98.1569278485255; Mon, 23 Sep 2019 15:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569278485; cv=none; d=google.com; s=arc-20160816; b=UOeyM3Wloryg8tL7CDGIY1wp93lddfGHJjW2RIwgB50dmniDyEezNX/4/0opDEMsdz 1bJo7DZRea0tueqTb2kCsbovTP5lZnWS2NpQdROlZT2bK1I+X86aBVCs8uDUCwCcZ+LB rIlHdfuAPImoYkIRc0Q0v/zWJ2tDfbq7w6gBBc/xoKZEcbVUw/DlyfSl5RBLWmspg5oQ SNTxzyiAliWMTIRdUOWAgOWrOXEVqUSYidufV/O0Ubeq3AdwLJZ9jw9WU3rwlJuuuCfb lACOSjXwbKn5PRzYjyOJx91beW9Rq/U8bOmb1KtPeWGObM5KHt4+iJKLytwinYrDFeO6 LyYg== 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=QLpqgwiwdHsVJ7lYAMtFWzbVRcNyLxBKNZxEbuiniCM=; b=AZrUHwzJOwVWRA302YEMyadBGk2AOobnp67nF1TVfsHQS4L4ftwd0pzTaNctWLKJ8t ITjECXHXLos5IreKqtCXloiJCFspqHhyxI3bDn2UotBm3H2kHi12b01eVQ3ZRq/eWGpn fcMgYrIRp7Izp9mqagRcHHPGQU9Ge9mFCPZuhEfNvRk/hwWf/HNdAOPeZngPy3SMEz2O 075aqa5hzwvXe/Hx0+GEyaD48cB3kT3jET4xC0q8Kn5koy9F/HP/6Z7Qu/3RGTWA0NbH gCl3cEH882bk03Dm2sUIwOCLRA8I68Ratek9aBAm1aJBieVIL7TB+jK0XF4NkJIn6B58 mRRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=qm6ynigy; 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 y26si7475463edv.134.2019.09.23.15.41.25; Mon, 23 Sep 2019 15:41:25 -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=qm6ynigy; 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 S2503466AbfIWWlY (ORCPT + 26 others); Mon, 23 Sep 2019 18:41:24 -0400 Received: from conuserg-08.nifty.com ([210.131.2.75]:22620 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392282AbfIWWlX (ORCPT ); Mon, 23 Sep 2019 18:41:23 -0400 Received: from grover.flets-west.jp (softbank126021098169.bbtec.net [126.21.98.169]) (authenticated) by conuserg-08.nifty.com with ESMTP id x8NMeEuJ017051; Tue, 24 Sep 2019 07:40:15 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x8NMeEuJ017051 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1569278415; bh=QLpqgwiwdHsVJ7lYAMtFWzbVRcNyLxBKNZxEbuiniCM=; h=From:To:Cc:Subject:Date:From; b=qm6ynigy6gEkhspkwQmqf/q+uQz6jl90Xidb6J6R5+ckOxnq8t5m0Z+spHOVmEska C5TKt7JXhzLBDghbbsoQy1pjxhl8SBlG5hMc4ncLPIw26GHX6SjRcUDFxYjCk5uzxp vC3a1IX3N6HCeM7JUPHnjYVZP5JLYoHRThPwfKdgoMK/OrAf9104vYPITF7ZNwnJs+ tQXTgbeDY3PdU1vAHjxuHGZCeSfayrbJ7WRrPltV/EVRARta7FZ//IoolLr/8U9IgA V6TDxBxQ7zikO8pNXDbR1rJvyAPD4lS+z4s2QBSNeCJmuYQNozeyA4vxKHB/y4y/dy j9tKsc05mkmhg== X-Nifty-SrcIP: [126.21.98.169] From: Masahiro Yamada To: Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , netfilter-devel@vger.kernel.org Cc: Masahiro Yamada , Heiko Carstens , Sam Ravnborg , linux-kernel@vger.kernel.org Subject: [PATCH v2] netfilter: use __u8 instead of uint8_t in uapi header Date: Tue, 24 Sep 2019 07:40:06 +0900 Message-Id: <20190923224007.20179-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 When CONFIG_UAPI_HEADER_TEST=y, exported headers are compile-tested to make sure they can be included from user-space. Currently, linux/netfilter_bridge/ebtables.h is excluded from the test coverage. To make it join the compile-test, we need to fix the build errors attached below. For a case like this, we decided to use __u{8,16,32,64} variable types in this discussion: https://lkml.org/lkml/2019/6/5/18 Build log: CC usr/include/linux/netfilter_bridge/ebtables.h.s In file included from :32:0: ./usr/include/linux/netfilter_bridge/ebtables.h:126:4: error: unknown type name ‘uint8_t’ uint8_t revision; ^~~~~~~ ./usr/include/linux/netfilter_bridge/ebtables.h:139:4: error: unknown type name ‘uint8_t’ uint8_t revision; ^~~~~~~ ./usr/include/linux/netfilter_bridge/ebtables.h:152:4: error: unknown type name ‘uint8_t’ uint8_t revision; ^~~~~~~ Signed-off-by: Masahiro Yamada --- Changes in v2: - Rebase on the latest Linus tree (commit 9f7582d15f82) include/uapi/linux/netfilter_bridge/ebtables.h | 6 +++--- usr/include/Makefile | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/include/uapi/linux/netfilter_bridge/ebtables.h b/include/uapi/linux/netfilter_bridge/ebtables.h index 3b86c14ea49d..8076c940ffeb 100644 --- a/include/uapi/linux/netfilter_bridge/ebtables.h +++ b/include/uapi/linux/netfilter_bridge/ebtables.h @@ -123,7 +123,7 @@ struct ebt_entry_match { union { struct { char name[EBT_EXTENSION_MAXNAMELEN]; - uint8_t revision; + __u8 revision; }; struct xt_match *match; } u; @@ -136,7 +136,7 @@ struct ebt_entry_watcher { union { struct { char name[EBT_EXTENSION_MAXNAMELEN]; - uint8_t revision; + __u8 revision; }; struct xt_target *watcher; } u; @@ -149,7 +149,7 @@ struct ebt_entry_target { union { struct { char name[EBT_EXTENSION_MAXNAMELEN]; - uint8_t revision; + __u8 revision; }; struct xt_target *target; } u; diff --git a/usr/include/Makefile b/usr/include/Makefile index 05c71ef42f51..c9449aaf438d 100644 --- a/usr/include/Makefile +++ b/usr/include/Makefile @@ -38,7 +38,6 @@ header-test- += linux/ivtv.h header-test- += linux/jffs2.h header-test- += linux/kexec.h header-test- += linux/matroxfb.h -header-test- += linux/netfilter_bridge/ebtables.h header-test- += linux/netfilter_ipv4/ipt_LOG.h header-test- += linux/netfilter_ipv6/ip6t_LOG.h header-test- += linux/nfc.h