Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35667308rwd; Mon, 10 Jul 2023 10:37:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlFT8PBKR0HbGMJvvxqe4SdT8uwlUrvDVtFW+YfUQ0EJq1n4Fl8ML1zFYjxYTYvcZZLa4WO1 X-Received: by 2002:a05:6a21:900c:b0:12b:2170:7b13 with SMTP id tq12-20020a056a21900c00b0012b21707b13mr9637542pzb.16.1689010674780; Mon, 10 Jul 2023 10:37:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689010674; cv=none; d=google.com; s=arc-20160816; b=WfPhINZgMM/JT7z43RCTHMHPxx46gBSmShY+6xl2zwy/c9FZCt0zyoAf77TllNT33T 545WTF55j5yBHkjqYdK0jw47y9ptOutPbYxV+A84xv6Y0CHdWJRFar1PGiHtFSmM1ml7 QM+BUen5p7X+pQCs33LRsTNkRIU0e72QHQMI3iqTxxoRzk/4q78YgviTuEAMa1eM9OYr uztHolNyfivXlJF/EISn6lfbRC9EXLmRs4pkCRWL0CbUJQBpHhBgDpmvXCdBzf+cBTwR FlLQ4Zebhp5vtkAA3bMiuSIwMRxVNfboBpnazjRN89KJNrvYjBI+gyr+mtqhriCVlk8Z tgUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=QsMS0DlhrpMEuR7nFBsrcQoVkbT4l+w8hmmcBp3sw0E=; fh=5wwuVKS9MihvlWB9A/2NXI0CA8IK+erbPaWHTgOrBBE=; b=EBgX78EaiREZhQ6dp8cxLzoJflPT/BzuHvTRT7uCU1Rh+QM6vW0R8jLkV1uD7DOq3J MIaHftpZKGsJvdDuwrS02tpvdJfT9tHL70q7Yf2vJvwRvcdlh/lK96H1s96qE/yWBi6H ZlDJcx4Fq6CTPtxyN7OInHeb5H0KDOq7zyIt/jkJUpycjFhbyf5DKgI90qQOFEgIVEHH Qnm908EeShIddL29jNdJsfgC8ea+v90qD8wF8twwtxKn9tkfemEgWUl6CnmfpXO1250T J+O/ZciVFM6AVwNnAdHoqowC8D3p539HyAM1ZLZn9x4g1zy7r+DgI+YBn2PrkZCsGBZF b8/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=c+HByhag; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=LGkmUkLG; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y32-20020a056a00182000b0067e18c6d2d2si98479pfa.14.2023.07.10.10.37.42; Mon, 10 Jul 2023 10:37:54 -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=@suse.cz header.s=susede2_rsa header.b=c+HByhag; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=LGkmUkLG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231917AbjGJRNT (ORCPT + 99 others); Mon, 10 Jul 2023 13:13:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230263AbjGJRNR (ORCPT ); Mon, 10 Jul 2023 13:13:17 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C21813D for ; Mon, 10 Jul 2023 10:13:15 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 2A75A20098; Mon, 10 Jul 2023 17:13:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1689009193; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QsMS0DlhrpMEuR7nFBsrcQoVkbT4l+w8hmmcBp3sw0E=; b=c+HByhagpM+GFey1o84QKdsmP3tOhZ40glAnELHvVVi6TQ0lJUjmZWZQ7YfxY9WlrCypH0 I1RGk1QqAq9lMPiDY1t1YpS+Jyw4YRYP8xg1TLuGS+3lf7iqGFVs6o6TmamOjV+ZdNVQY6 fHJsYBOfPWRSbw/yPUikvsckn34kMUg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1689009193; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QsMS0DlhrpMEuR7nFBsrcQoVkbT4l+w8hmmcBp3sw0E=; b=LGkmUkLG0a2AwS1rXcJSzrZFwQ0MHHH7rrpAWwcQ/1kWYAzVBHA/S7IbMd2XDjngA97wyA F1sJeXtm+MO4+ABg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4FD2F13A05; Mon, 10 Jul 2023 17:13:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Qm1KESg8rGSYEAAAMHmgww (envelope-from ); Mon, 10 Jul 2023 17:13:12 +0000 Date: Mon, 10 Jul 2023 19:13:10 +0200 From: Petr Vorel To: Masahiro Yamada Cc: linux-kernel@vger.kernel.org, Andrew Morton , sam@ravnborg.org, Ruben Ayrapetyan , Kevin Brodsky Subject: Re: [PATCH v2] uapi/netfilter: Prefer ISO-friendly __typeof__ Message-ID: <20230710171310.GA671729@pevik> Reply-To: Petr Vorel References: <20230504083613.3789010-1-pvorel@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no 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 AM 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 Hi Andrew, gently ping, could you please merge this to next tree? Or do we need to wait to next merge window? Kind regards, Petr > > --- > > Changes v1->v2: > > * Add Kevin's Reviewed-by: > > https://lore.kernel.org/lkml/f8bd4212-9cca-03ca-884a-c9dec63bb256@arm.com/ > > * 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) = (typeof(pos))(ehead); \ > > - (pos) < (typeof(pos))((char *)(ehead) + (esize)); \ > > - (pos) = (typeof(pos))((char *)(pos) + (pos)->next_offset)) > > + for ((pos) = (__typeof__(pos))(ehead); \ > > + (pos) < (__typeof__(pos))((char *)(ehead) + (esize)); \ > > + (pos) = (__typeof__(pos))((char *)(pos) + (pos)->next_offset)) > > -/* 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) = (struct xt_entry_match *)entry->elems; \ > > (pos) < (struct xt_entry_match *)((char *)(entry) + \ > > -- > > 2.40.0