From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8EBEB318EE6 for ; Thu, 28 May 2026 06:14:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779948899; cv=none; b=J+PIT1luwyIPawMS+HeDTzfIRnEUc0X1IxXfidNn5qSl6mAZiYRTibCPJrVZgm1oAcTx3K2dh7nDhw7fgGlsPL9A833LxzbW0ChxmlAY/801soUY3vVF4GInXi+gFpkt0CiGDfa0xUjHuvH2RomLN7FHoPCTUgJPnVZ6Z3Xq5vM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779948899; c=relaxed/simple; bh=aqZLqCHsLYwTCdL9BMKgICEkaQPhG4fcbZsDBuAcKmE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uysY3CjLM7vDaoLixhWSH1nTbElF8EPUdR9Dri84vxj+yiF7Cc1UVHFqRj4uB8jmg7K1njqygHkJpcwAmMxLCoiQytsHNqsU0xBXMSy9jbyWQ6mzzwJDPA8zukagPQ1hVUhF9dVyMxPL0n8YufU+G0m8l/QD5/sDQb2C2r4qA6o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Y6laagQx; arc=none smtp.client-ip=209.85.216.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y6laagQx" Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-36af4b7840aso2855864a91.3 for ; Wed, 27 May 2026 23:14:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779948898; x=1780553698; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=edXSzP3sAbJa7ml3xVVXLPZm4lXjp+ICMbRBclRB1yU=; b=Y6laagQxk/JW9s8e8aLoO6W3qrECkWirlVXYIWB8lir3rIR2iSZcA3LssbG1Z9+0L7 R4MbdGiyAt81HqfcMUblDmEmabsdiHg2EYdoiGrUfbnHk5i0WR/O1vSDRUv7tb5gxmil ilNoMoLRQbll1wLdfvihNj1G034pJfCbbgYsJDdyFPmdUhuIZmx1me7qSCb5F4AG+clP Fk4BqzyTimRN5ZvERym47ZABL46litDwjhFUL/npbqhHEUVcWMIQxS3eHahuD1jYTCwU fczhLYq0/QoB/iIt5iAPPxydU1b/MmpPCiK54O7aHg8KsFv9icHMxm/8zBOmacWm42Ez iKhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779948898; x=1780553698; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=edXSzP3sAbJa7ml3xVVXLPZm4lXjp+ICMbRBclRB1yU=; b=F8eDP65wVQ8WvxnvJkfrcUnODAIMc3sxVT1QLUm69R9XLCUZpc5in+j7RjGxtRE82z LntWOE/zbEhIgdJ0+DdbCttZF8aNFj67/tCqBiKVwvhV+Jfh16BO7WqCY73J2OT4Xwwm pZ15QdT73PlkBie2kfDDyhRRcWpIO7ZB9wHPrAjvmAiT5yes2m6NDGwHVRVWxWxzhnCr UbLIuye2MPMUZZAvdOYQqksh8p/GpUSNVe+Yvq0LY9dd7X+QWIf8nkvATp+VcOnR2MKp aAd0NeB6o5IgQf9psMzfWDcKPwQCCi+pTfgC7vs9LvudqAmPzTw172EELyDErcw9HTga zUVQ== X-Forwarded-Encrypted: i=1; AFNElJ9Q5jTxwFU15nDklg4gtsjp8H5qjen407LYzCdcQ0zK2wcPjrQ8FqXD8HEDx73i7gj2sJX8kfOU/au0R+g=@vger.kernel.org X-Gm-Message-State: AOJu0Yzv6OP4GfDWmuD7XkIFJ7MOvT7DdRj2DpEgD4NscFFoqegWVgnN oL3cOeo/6hIt4//oa63jAyHkPV6GKW4RrkX6m60FjaL1B0T4DqqKf0T7 X-Gm-Gg: Acq92OE243Pcac4pBIlxmVFGHhuoHHG3yZNUt0AaKtsDWAB4HPZ4PQ+AJldJUApGz5g dsZmNixSZOj+3XwAJ3/0tETQjsAqxVx1EHXYp+rLWXvKjlTIXyKmf7IkU4KrGQSNcE80VUAbDhE CkGGYN44PhHh67VL3ffbE+E7coSKSlVBlkJDN6y3LbPcRIzuY9wgxoaK3bB9AjCR5BfB/UdVxGK PFvmgwx6WyVZB/v2irBAe+r8c/zWhR6Fl6l05dSH4MbXj9GOrGP37XTYuujPzlc03t5UJm/CmZC DUsTMnFKpFNysa/BcE5gT/Cyu8EhzEV8BqeKECT9bahazME3GNA8q7EcEgdIxj/SwE3rhvADCin Oi4QUy4kAOqywYc0O6ksbvyoQ4B6+A6XvfgCTkPkPpuPGspgvzbj+I501Ta4Qw34wexCyg0w6xO BtwUHWm6Nd2JGR1AJyIWHufPXvOXNQAeDwr9w5bcOALSeScY16jEL9zP7ASdF53nWCWTy4cTrAt V3WB1udTPuk1jPPgpTyBUVoiHr8RJkJjccvm2PuilNZimZh/wWgRwYDEfw= X-Received: by 2002:a17:90b:5845:b0:36b:7c4e:1b07 with SMTP id 98e67ed59e1d1-36b7c4e1f20mr2249717a91.5.1779948897810; Wed, 27 May 2026 23:14:57 -0700 (PDT) Received: from archlinux ([2409:4081:ae90:b20d:ca15:4eff:fea6:3385]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36b90919855sm706409a91.8.2026.05.27.23.14.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2026 23:14:56 -0700 (PDT) Date: Thu, 28 May 2026 11:44:52 +0530 From: Yash Rai To: Jonathan Corbet Cc: mchehab+huawei@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] tools/lib/python: kdoc: remove unused parameters from _fill_text() and _format_usage() Message-ID: References: <20260515114216.72860-1-yash2154rai@gmail.com> <87a4tnz0h0.fsf@trenco.lwn.net> 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: <87a4tnz0h0.fsf@trenco.lwn.net> On Mon, May 25, 2026 at 02:40:59PM -0600, Jonathan Corbet wrote: > Yash Rai writes: > > > The parameters 'width' in _fill_text() and 'usage', 'groups' in > > _format_usage() are not used within these methods. Use *args and > > **kwargs to properly handle them while maintaining the override > > contract with argparse.HelpFormatter. > > > > This is a cleanup with no functional change. > > > > Signed-off-by: Yash Rai > > --- > > tools/lib/python/kdoc/enrich_formatter.py | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/tools/lib/python/kdoc/enrich_formatter.py b/tools/lib/python/kdoc/enrich_formatter.py > > index 7e0f09f5ccea..bd2321fa11ea 100644 > > --- a/tools/lib/python/kdoc/enrich_formatter.py > > +++ b/tools/lib/python/kdoc/enrich_formatter.py > > @@ -42,14 +42,14 @@ class EnrichFormatter(argparse.HelpFormatter): > > lambda m: f'\033[1m{m.group(1)}\033[0m', text) > > return text > > > > - def _fill_text(self, text, indent): > > + def _fill_text(self, text, indent, *args, **kwargs): > > """ > > Enrich descriptions with markups on it. > > """ > > enriched = self.enrich_text(text) > > return "\n".join(indent + line for line in enriched.splitlines()) > > > > - def _format_usage(self, actions, prefix): > > + def _format_usage(self, actions, prefix, *args, **kwargs): > > """ > > This patch removes no parameters, and won't apply. You are, I'm > guessing, applying this on top of your previous patch? Don't do that; > send a completely new patch in response to review comments. > > I have to say, though, that I don't really see the value in this change; > you're exchanging one set of unused parameters for a different, even > more mysterious set. Why do we want to do that? > > Thanks, > > jon sorry about that and thanks for the feedback Reason for replacing unused parameters with *args and **kwargs is to avoid python warnings Thanks, yash