Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp290044rwr; Thu, 4 May 2023 03:10:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ407v58+oj9UNYhSLwU9G9V3n3yvzvPNWs/slfpQwNxAZzomTLn0y0z7B3LslDMSUk5sI4O X-Received: by 2002:a05:6a20:3953:b0:f0:302a:ccdf with SMTP id r19-20020a056a20395300b000f0302accdfmr1963021pzg.52.1683195003229; Thu, 04 May 2023 03:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683195003; cv=none; d=google.com; s=arc-20160816; b=Y2TU+6HpTWeUnliO2QPHB9RTOyikukDS+n6Mp3D6Y+Iy4CgXqBBhdaerI9WQLVl+Db DzGhtQYjwfPv+VhVlc0JEkJWHB6nKr1A0nqlKW02ZAkgYAIyx36piIZqexgtw9bIoLdk jzGOaa9p5R7tDMO6JSu6VwWjPfltMOBB6kwycSrr50uxddKRJJt2xnaBVyxnC/uRz0uo n0+yenc4LBgXMLJiPx8QZSwqXeitYe6j0NWfYwBtvllrqUM6OJkeEbHH5A0VId8+Xvft cEnj0PMT1ao/YFEDUZjaHp0Y03QuyyR4KzgnTxSUK3ZocjnouU/YYae48uguh/XVkQrL HWyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=XXQtSHYf4XKgX1r0tWHKB0Fz2H+xaMst49Cyk3LDJf4=; b=grJYoufsEQjhHaaAZVHZI5mHJWLBEq+xO1myds8Klqcm2dRbWDNnUfguLS+3mJSReb iIhzaprWMm+SnfGBOOgeNQcxoFWpaRD46kS5hyM/NVPhNts/Fg9POnQHeQKXAjVkQrOI SmsvK/TmAKNgVZTxZWDvg4cLYCUnHcs4HR+oR1nqVH4R723MZ5hvOjcUvu7WwOboKIFH H7DMG5axwV/emB15ph0wBT8Xu4xZ3cU1tGIZHiWQBSMe5IvjaKQ6plUs0vWBgCabDV0z BVJ7SmXuc6wk1TrK78SV4in2Pg1ascXAk7tuThlLPFqYw+gvRpQ0A689spBciPwSL3T/ iM9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VzC9NLEa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c6-20020a655a86000000b0051384f6edeasi34224727pgt.537.2023.05.04.03.09.51; Thu, 04 May 2023 03:10:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VzC9NLEa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229703AbjEDKC6 (ORCPT + 99 others); Thu, 4 May 2023 06:02:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbjEDKC5 (ORCPT ); Thu, 4 May 2023 06:02:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F19392128 for ; Thu, 4 May 2023 03:02:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 81EA662B99 for ; Thu, 4 May 2023 10:02:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4669C433EF for ; Thu, 4 May 2023 10:02:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683194574; bh=21YZ79Gr/0iOXrxXklLKqfvRPun7UvP/FB53D+iAjus=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=VzC9NLEaUL/qjsc7TPLIlWeNTSX3L3ZXNEuIg/hVwEgDGCb5HeZy9KKkNIyWgojxF 0OKpdCNB/vlWuo5cLHklP/3TL4In5d9qt32E3H4OAAkxUtMs775KRcV3PPSJg7lNFw E3Qy/87JKPUjXS0axUy44ByW+lt4y9y9oEbTuBBN8y7xnwj0WqzDleA6Brjia3Tehq TtHpk2q4rZ8lP/ZDyhzzldsh3HusgamhdiT3LFLnE7xgWJkutpCP09bFZ8FzK7RhTv uz/v5HiwmcIA20r1DWPy77ZyIWC6diZzZWTrLKqic67aThk/oNH5cYe8iYKVzliw5T 5BTyglehK7kIw== Received: by mail-oo1-f52.google.com with SMTP id 006d021491bc7-546de76c23eso144526eaf.0 for ; Thu, 04 May 2023 03:02:54 -0700 (PDT) X-Gm-Message-State: AC+VfDx2ONtZQV+w/6ybxOhjjBjWqn0d/oIlgvEZFEL5lCapYEaX3iLi oWs1IZb9CMyn1qDq4O8mBIUsDhze+sS3caJ8MsQ= X-Received: by 2002:a05:6808:1148:b0:38e:8fe6:bc3e with SMTP id u8-20020a056808114800b0038e8fe6bc3emr1623091oiu.14.1683194574047; Thu, 04 May 2023 03:02:54 -0700 (PDT) MIME-Version: 1.0 References: <20230504083613.3789010-1-pvorel@suse.cz> In-Reply-To: <20230504083613.3789010-1-pvorel@suse.cz> From: Masahiro Yamada Date: Thu, 4 May 2023 12:02:17 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] uapi/netfilter: Prefer ISO-friendly __typeof__ To: Petr Vorel Cc: linux-kernel@vger.kernel.org, Andrew Morton , sam@ravnborg.org, Ruben Ayrapetyan , Kevin Brodsky Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 4, 2023 at 10:36=E2=80=AFAM Petr Vorel wrote: > > typeof() is a GNU extension, UAPI requires ISO C, therefore __typeof__() > should be used. Similarly to 31088f6f7906 ("uapi/linux/const.h: Prefer > ISO-friendly __typeof__") use __typeof__() also in x_tables.h. > > Fixes: 72b2b1dd77e8 ("netfilter: xtables: replace XT_ENTRY_ITERATE macro"= ) > Reviewed-by: Kevin Brodsky > Signed-off-by: Petr Vorel Reviewed-by: Masahiro Yamada > --- > Changes v1->v2: > * Add Kevin's Reviewed-by: > https://lore.kernel.org/lkml/f8bd4212-9cca-03ca-884a-c9dec63bb256@arm.c= om/ > * Update hash to 31088f6f7906 (Kevin) > * Add Fixes: 72b2b1dd77e8 (Kevin) > > include/uapi/linux/netfilter/x_tables.h | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/uapi/linux/netfilter/x_tables.h b/include/uapi/linux= /netfilter/x_tables.h > index 796af83a963a..d4eced07f2a2 100644 > --- a/include/uapi/linux/netfilter/x_tables.h > +++ b/include/uapi/linux/netfilter/x_tables.h > @@ -172,11 +172,11 @@ struct xt_counters_info { > > /* pos is normally a struct ipt_entry/ip6t_entry/etc. */ > #define xt_entry_foreach(pos, ehead, esize) \ > - for ((pos) =3D (typeof(pos))(ehead); \ > - (pos) < (typeof(pos))((char *)(ehead) + (esize)); \ > - (pos) =3D (typeof(pos))((char *)(pos) + (pos)->next_offset)) > + for ((pos) =3D (__typeof__(pos))(ehead); \ > + (pos) < (__typeof__(pos))((char *)(ehead) + (esize)); \ > + (pos) =3D (__typeof__(pos))((char *)(pos) + (pos)->next_offs= et)) > > -/* can only be xt_entry_match, so no use of typeof here */ > +/* can only be xt_entry_match, so no use of __typeof__ here */ > #define xt_ematch_foreach(pos, entry) \ > for ((pos) =3D (struct xt_entry_match *)entry->elems; \ > (pos) < (struct xt_entry_match *)((char *)(entry) + \ > -- > 2.40.0 > --=20 Best Regards Masahiro Yamada