Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp850979rwb; Thu, 10 Nov 2022 08:08:35 -0800 (PST) X-Google-Smtp-Source: AMsMyM5cMA9VL1xQlppWb6gj7cypH/L0YNm+nimitC0ATjtYSDSqZGQzHEIgwj+Q646s3nxbNNqC X-Received: by 2002:aa7:d5c1:0:b0:459:2515:b27b with SMTP id d1-20020aa7d5c1000000b004592515b27bmr2615686eds.338.1668096515025; Thu, 10 Nov 2022 08:08:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668096515; cv=none; d=google.com; s=arc-20160816; b=OJ61WbbubTC2UZDtRTWXK/u4O8ay3g8Y33AEBNJGBdLhRdTwpbJUoV+qW1tJlXth0z GvX9MjmEyiksCVUVO3jm+KFGO7JKEGhvA4SXymHUeFe+VzVfD6hXeb3vEn0zdDqP9TCG 4IbLpp4GDautopOJMF3OjqEPpGxeT1B0KbjgrDzZkitYr65Vhp96cvLohIj6UVwvAWZ7 UM4GEbFjBrF5upcsKTVvQ83ZhHnK7xOkYuljAVcs4xiAHBHYjEMn0ka0NkKx/THAjIsB TJClrcbP6N8rSfgRkbVXns+dXXxNdtSmXH619neHzJBFGhNblifSIX5awAIXoA1X67DV 8tjg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/pAYNcF0zoVzPs0aZgiJJdzecZ78CCS2qwtQqBBQaio=; b=JHeM3dmcf/P+ArnY3/01XETZIwPSDLwX3URDEX84AdESnjbST2cZ/RhZ73s9RloIjS om8TAJ6iyBoHsYr/pABOXokYwyjz6azsQmcHxw7p1aRjsUtj9gt0ATfcOIIvsqQ8hFmJ q7KEzl7frf7ZoL9BkaR5dFyCjPGQQVAGU5Ndmrx1Sy99LNGCLOoRLRtatj7G+T9TqHXi XbffqgI4D8M228BB9bVsKjoDQACMJkIAqbVrOoijoKI1QYWHq/NpU4EHXYljr9VzuKes Cl0fI1vPpHDDMqyxeFJs3EIqjDbSTZkp9pPBAOtPLYwR8fqlvFTbuHSpimtPQMsxOFBJ ++ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=rLbuPSBv; 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=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s9-20020a170906a18900b007ad69eba328si16200064ejy.539.2022.11.10.08.08.11; Thu, 10 Nov 2022 08:08:35 -0800 (PST) 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=@lunn.ch header.s=20171124 header.b=rLbuPSBv; 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=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231296AbiKJPiH (ORCPT + 92 others); Thu, 10 Nov 2022 10:38:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229675AbiKJPiG (ORCPT ); Thu, 10 Nov 2022 10:38:06 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49A27DDC; Thu, 10 Nov 2022 07:38:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=/pAYNcF0zoVzPs0aZgiJJdzecZ78CCS2qwtQqBBQaio=; b=rLbuPSBvPQ5xAVhuXettb1PPqm EbLQ5HDwu7w/LGN0ZvUueuWUDeuTsO+OZR3PDEvCG+1BMdBk1FZ2B6JQmFvbz9RB66HbWuE91BKns PWxqvArWmge75FmWSbAF/7EanGHQfvAxMsxQjOBNxg3rf2izf3Oy9dYgbYBedupx6p3M=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ot9cb-0022sV-BT; Thu, 10 Nov 2022 16:37:41 +0100 Date: Thu, 10 Nov 2022 16:37:41 +0100 From: Andrew Lunn To: David Howells Cc: netdev@vger.kernel.org, kernel test robot , Marc Dionne , linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] rxrpc: Fix missing IPV6 #ifdef Message-ID: References: <166807341463.2904467.10141806642379634063.stgit@warthog.procyon.org.uk> <3080953.1668089385@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3080953.1668089385@warthog.procyon.org.uk> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS 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, Nov 10, 2022 at 02:09:45PM +0000, David Howells wrote: > Andrew Lunn wrote: > > > > +#ifdef CONFIG_AF_RXRPC_IPV6 > > > return ipv6_icmp_error(sk, skb, err, port, info, payload); > > > +#endif > > > > Can this be if (IS_ENABLED(CONFIG_AF_RXRPC_IPV6) {} rather than > > #ifdef? It gives better build testing. > > Sure. Does it actually make that much of a difference? I guess the > declaration is there even if IPV6 is disabled. And that is the point. Even if this feature is disabled, the type checking will be performed, the number of parameters etc. Somebody who modifies ipv6_icmp_error() is going to find problems with a single compilation, rather than having to use a big collection of random configs. So this is a review comment i often make. Avoid #ifdef if you can, use IS_ENABLED() inside an if statement. Andrew