Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp789038rdb; Fri, 2 Feb 2024 04:17:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHnt8pdYNwFy7a7FdIBAOv8PGis0WiHrcfT82rqLBNutsBnvnoTmfj6yYDuRAniSOU6yrDm X-Received: by 2002:a17:902:da88:b0:1d9:61f1:571 with SMTP id j8-20020a170902da8800b001d961f10571mr4452085plx.31.1706876266695; Fri, 02 Feb 2024 04:17:46 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVssKPqnT6Dsfppk8iEtpadBJZUU2UW9GinUViChfulaT0h8T1OKlLoX686dX+OqMuMsV8XX7ntPK/xt9EdkfkWZA4SNVAZzGkFsxNCuA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u20-20020a170902e21400b001d8a94d10dasi1580243plb.538.2024.02.02.04.17.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 04:17:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49803-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=Ih4UzVvz; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-49803-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49803-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5A32E29A9E4 for ; Fri, 2 Feb 2024 11:56:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2045813EFF9; Fri, 2 Feb 2024 11:55:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ih4UzVvz" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FE4C13E233; Fri, 2 Feb 2024 11:55:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706874904; cv=none; b=uH2eZMbjXEYOaZMjN/bWWJhDDG8g18fCO19fZ5dvawGzWvefUfC8XnvHECUd9xN6r2UCQjkET8jk3rw5d9HyS3rt/rW5+j4LhCEvHBvUQGO8FPxbUu07Oh2WsOR3/Dg0mJ0mPTdCv2E8vS7+/gLx8kRc42ol4GIQ5JmsCTKfd4U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706874904; c=relaxed/simple; bh=0rsf8rEwPN7l+sZRb7Vel03fado/1fE6W/Zbap4tgdg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RpQMTL+7RDi4qzKcujzBC8GZBAD5oht9eHhotDZciFHv75MwHdAhtSFowXqoquCht9feRYRpVQIXzpJW84+h23ZjZDAwCuNRP7mP8cIOMN7xLwS1i/4plvrIYB20vJ6JJYBSDR43UszXWil6Jy2uTFSAzFLd++g1cNvkm3GgGeU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ih4UzVvz; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3EE7CC433C7; Fri, 2 Feb 2024 11:55:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706874903; bh=0rsf8rEwPN7l+sZRb7Vel03fado/1fE6W/Zbap4tgdg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ih4UzVvzD71Vh4DujrIrHPHocAEX28dkzpBbE55Jn/vEmPTHm+GmCNcn6/sC0NNO6 fZ+kgq1R7Lf1X5JuZ0fnGdjtG9tzlZ19d40HJOweaaOI1MKFr3pwMFD586uu5RWJJR DI06gNkL8FfJcVU+Jluj5v2p1sJJiRpaSy/VRJtozmClMJfO5ohd7zGcJv6+FsCSxO b0uwsR5GxPIPLmEaJRpWQlCeTpXfr7DEU2LGNnISwTxmuFK2Ils7do3zgGvq7OtFnZ wXiVzvmUF+LWwiw/AqiAi57xAYE5lpmMaUbvwd4UZlmZ5fVW3od6AmDi60LpyenYU1 bLJU7O0BitVNA== Date: Fri, 2 Feb 2024 12:54:50 +0100 From: Simon Horman To: Matthew Wood Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , leitao@debian.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2 2/8] net: netconsole: move netconsole_target config_item to config_group Message-ID: <20240202115450.GN530335@kernel.org> References: <20240126231348.281600-1-thepacketgeek@gmail.com> <20240126231348.281600-3-thepacketgeek@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240126231348.281600-3-thepacketgeek@gmail.com> On Fri, Jan 26, 2024 at 03:13:37PM -0800, Matthew Wood wrote: > In order to support a nested userdata config_group in later patches, > use a config_group for netconsole_target instead of a > config_item. It's a no-op functionality-wise, since > config_group maintains all features of a config_item via the cg_item > member. > > Signed-off-by: Matthew Wood > --- > drivers/net/netconsole.c | 61 ++++++++++++++++++++++------------------ > 1 file changed, 33 insertions(+), 28 deletions(-) > > diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c .. > @@ -665,8 +669,9 @@ static struct config_item *make_netconsole_target(struct config_group *group, > if (!strncmp(name, NETCONSOLE_PARAM_TARGET_PREFIX, > strlen(NETCONSOLE_PARAM_TARGET_PREFIX))) { > nt = find_cmdline_target(name); > - if (nt) > - return &nt->item; > + if (nt) { > + return &nt->group; > + } nit: no need for {} here. > } > > nt = alloc_and_init(); ..