Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp362183rdg; Tue, 10 Oct 2023 12:28:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFv6bdnCnXEATv14k/mGPj5PS7tx7fboptuhru30rI3tAetZtY3Vuuhejr6xv9YHvtyz76U X-Received: by 2002:a17:902:db10:b0:1bd:f7d7:3bcd with SMTP id m16-20020a170902db1000b001bdf7d73bcdmr17814812plx.50.1696966101507; Tue, 10 Oct 2023 12:28:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696966101; cv=none; d=google.com; s=arc-20160816; b=oeXulam3xiDdyhyhqRHDgjLwUTuCakkXBzkQbz8HiE4JZCrqk55qi5dEs+UGdYuwXU vNudRzXashh3rHaGKvssv9ulWvVY/F/QkFw+v9mqcUdI2C9YHE101OPWX1CTguJkgR2c MRwIAOJjU/m9LLRzYfv9qkk5cisPAZ0/U/U9oePQXd6ZuH4vDhRDgzkanEjoSLHodxWI 5scR1aEhTVUSZK3nEoYgJmW8Ymgnmeba5nrQO9CQDTVZ/bcd6W+U5/wMJFkGte2Z1RQy 1CMVLsUeEUNOyzAEWR6LNdIJrHgZ4mhFuTBZOt6+91slHRyyBfTNmU4vTSxbA8wK4r2t cZew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=69FjPbITmy2sRCCem/htKdGvhrh703nzmiPWrI5DS00=; fh=tdgJDcMEMk0ZJAcPsr5CWaTtgA3Ce8/hJz5lncKLUck=; b=E37kQfw5jDJ2GqjPBO24xgASqOKT4NwklGHcHLiDcqoEdfqSVp4vKJYdDWDzaMLUc3 qRv2dPAmlvWd3LvKf7dlsPtHjA9YMIy5IXdlXnuq0DSSFoWtkWQwmaqsRujgJn/M26Yj eks//bFqLYZ/nnrOnk9fyb9V43vDRQELWOhDWG0gCdNw1YL8etmWA2MgZfDXqMJJpuo+ 6Y3T9C3W2R6dn4oKiPRMlwuK6cuZD1zfAUsZByZ1ZvOb4vivAqhG8yxiPylBAUZT67vu 8GvDGhyEsqBDyckbZjwQujYxDsbpO86U50r/doY81TI2gOziNFHN+anCGkqNesS5Y7l9 JsJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@infradead.org header.s=zeniv-20220401 header.b=TthprqgE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id z6-20020a1709027e8600b001c9bc844534si726655pla.430.2023.10.10.12.28.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 12:28:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@infradead.org header.s=zeniv-20220401 header.b=TthprqgE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 61CB281CEB39; Tue, 10 Oct 2023 12:28:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343770AbjJJT2L (ORCPT + 99 others); Tue, 10 Oct 2023 15:28:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234244AbjJJT2J (ORCPT ); Tue, 10 Oct 2023 15:28:09 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47F57AC; Tue, 10 Oct 2023 12:28:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=69FjPbITmy2sRCCem/htKdGvhrh703nzmiPWrI5DS00=; b=TthprqgEUh/KPhKfPOzit+L+qE XrOT5mRHbr1pQq6+p0rNxwcOVDSDReIVxaLaZOQeyHiiK+PlI+wb7gV2k+k2+KklTes/+n6/z8Lhh DuPxKu6KHRGCxiCDq60NFsgugpOke8YZzlIpiYWCl0o0XUq/SZ2SPlK37GEYR7cSqtqa6jCac6t5I NH7FhUyo6Jmibbp/ZM63TYTkupPpdHyGtDmezV6WQIvCZlF7kcahfqfYxZrCJYj/u5gC1utLDMQmp oY9j6Sruo9EFUV1XXtInc1Fj6h0xW4Jbx2wBDW1lgNUgJizRj9DnrMiAuHh6DYTNnoj6/PQUwFeD+ Z94YCt5Q==; Received: from jlbec by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1qqIOM-0002CZ-2J; Tue, 10 Oct 2023 19:27:42 +0000 Date: Tue, 10 Oct 2023 12:27:34 -0700 From: Joel Becker To: Breno Leitao Cc: kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com, Eric Dumazet , hch@lst.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, horms@kernel.org Subject: Re: [PATCH net-next v3 2/4] netconsole: Initialize configfs_item for default targets Message-ID: Mail-Followup-To: Breno Leitao , kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com, Eric Dumazet , hch@lst.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, horms@kernel.org References: <20231010093751.3878229-1-leitao@debian.org> <20231010093751.3878229-3-leitao@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231010093751.3878229-3-leitao@debian.org> X-Burt-Line: Trees are cool. X-Red-Smith: Ninety feet between bases is perhaps as close as man has ever come to perfection. Sender: Joel Becker X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 10 Oct 2023 12:28:18 -0700 (PDT) X-Spam-Level: *** On Tue, Oct 10, 2023 at 02:37:49AM -0700, Breno Leitao wrote: > For netconsole targets allocated during the boot time (passing > netconsole=... argument), netconsole_target->item is not initialized. > That is not a problem because it is not used inside configfs. > > An upcoming patch will be using it, thus, initialize the targets with > the name 'cmdline' plus a counter starting from 0. This name will match > entries in the configfs later. > > Suggested-by: Joel Becker > Signed-off-by: Breno Leitao > --- > drivers/net/netconsole.c | 25 +++++++++++++++++++++++-- > 1 file changed, 23 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c > index d609fb59cf99..3d7002af505d 100644 > --- a/drivers/net/netconsole.c > +++ b/drivers/net/netconsole.c > @@ -53,6 +53,8 @@ static bool oops_only = false; > module_param(oops_only, bool, 0600); > MODULE_PARM_DESC(oops_only, "Only log oops messages"); > > +#define NETCONSOLE_PARAM_TARGET_NAME "cmdline" Perhaps `NETCONSOLE_PARAM_TARGET_PREFIX` is better. Makes it clear this is not the whole name. Thanks, Joel -- "When I am working on a problem I never think about beauty. I only think about how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." - Buckminster Fuller http://www.jlbec.org/ jlbec@evilplan.org