From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5111C433FE for ; Fri, 18 Nov 2022 16:19:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241212AbiKRQTL (ORCPT ); Fri, 18 Nov 2022 11:19:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235414AbiKRQTJ (ORCPT ); Fri, 18 Nov 2022 11:19:09 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1183261772; Fri, 18 Nov 2022 08:19:09 -0800 (PST) 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 A01AE625F2; Fri, 18 Nov 2022 16:19:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81E04C433C1; Fri, 18 Nov 2022 16:19:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668788348; bh=kB9TuL6/LlQULZYXATksegAy1GgdZD16NhQ1mIwxfrY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LQyhq+EyzCEp2r3JW5wEyYbn0KX06RmU7BQtp3QlSUd8c39dmuutcak3xErZx5Ilh V1Yw/c+tdCRf/R7s6aWhQPWlq8lRMFQdsn2f3UyXs2MLsWkcpxu+ODWlyiRwklMlVJ oYZ01yNpDJJmPtoMv+UsRv8/5U8PRd8KHPKvdFAcspIj/eIDHE369TyMT0ghSbLvQS lmVCHnXqkXZFQymEYZdMtKkS9Ka56axWkl2XbJms9sfCe20i8Ybv9ZznGaqLBuCWZ8 ra+0OUM/Y0NGKGSfFZcCGplt7q43oVZSWYrcyWrphWP6uNGWoa1EGV+Mk+qSeWzuqU vegCgvhmTCdcQ== Date: Fri, 18 Nov 2022 08:19:06 -0800 From: Jakub Kicinski To: Geert Uytterhoeven Cc: Jamie Bainbridge , Geert Uytterhoeven , Eric Dumazet , "David S . Miller" , Hideaki YOSHIFUJI , David Ahern , Paolo Abeni , Chris Down , Stephen Hemminger , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] tcp: Fix tcp_syn_flood_action() if CONFIG_IPV6=n Message-ID: <20221118081906.053d5231@kernel.org> In-Reply-To: References: <20221116123115.6b49e1b8@kernel.org> <20221116141519.0ef42fa2@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, 18 Nov 2022 09:29:13 +0100 Geert Uytterhoeven wrote: > IMHO this is worse, as the #ifdef/#endif is spread across the two branches > of an if-conditional. > > Hence this is usually written as: > > if (cond1) { > expensive_call1(); > } > #ifdef cond2_enabled > else { > expensive_call1(); > } > #endif Alright, good enough for me.