Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4632938ybg; Mon, 21 Oct 2019 11:57:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyBBkJSihQusRfkMGXL52K9tZKFG9iX2jNyOupJfBay7dDaGuZspt/LyaunQLhjy8ADgun X-Received: by 2002:a17:906:e243:: with SMTP id gq3mr5711863ejb.302.1571684223412; Mon, 21 Oct 2019 11:57:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571684223; cv=none; d=google.com; s=arc-20160816; b=ByP17NVENH11k+PLKKwj3hwfdyc4eOUHUd2qTXYGb+ZmTWUKfPkxpn3lDGwvnc8Bky DsYp2FZNCNBCojAtYi21DrJwdA84dm279N2QZPx4ZoXJjwliXnmyA/mNWzsuGAfEp0KK 7J2QP15CUItsTgEx1XP82kfwjeINa2ltQQhwduUj/NANtYOdF5vZCDjST07NXvdyEdge 5bFwOGKFR5v3GMYSeex0dbXWCi/F1fSrg7kGztXPxrgnhd9rh02tqgn5YVg1+HyxrIA6 qG6JykHSbbpZGSLiFOcy5odioAkv2dO77cORrbsX1VIJhXY9U4tkrY07JP2IPrY7KnZO SutA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dL6VLOf3YewOp4A2n+mPvAornsHOXwZDiX+c4WejJCs=; b=E94JKUSs0zZIXZF/bsKRheVo7jLu/KFU+58Y2ofFmtYeX67lVir/m7tlG/ROHC7GTL SBr/aH37tdDRPywl6KAV1Lu+/xiXJoARSNS+2vdcly/nvTYJNoxpfXUMWpf7GMGNFP03 zWgcmKqfQ6vmjKN62JchOntk6ZNebdxsMrTq3er+DiUhGQzN9GB3BYvVsOEmqnkE+Lwh /wtnnuCvqhQlnrrmtdG5+EThHi6PL5gNtN6/699hmo6FZAGnWhJcL8mkAULfiMeYEmp6 HycAw5fNhrmq5/v/zhCTWLKw7O3KMMGd9U2i7xttE4mkXhWzINopiMs3qxUlZzqOLOCc gPiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=T9zSq7JE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m90si5643689ede.52.2019.10.21.11.56.39; Mon, 21 Oct 2019 11:57:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=T9zSq7JE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730021AbfJUSyI (ORCPT + 99 others); Mon, 21 Oct 2019 14:54:08 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:39220 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729894AbfJUSyI (ORCPT ); Mon, 21 Oct 2019 14:54:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dL6VLOf3YewOp4A2n+mPvAornsHOXwZDiX+c4WejJCs=; b=T9zSq7JE/DYsWS/lzj8lbTRdt k/TK+nhbiOYmvx2Ux59y9zjgho8lwhkM+iyIjj0BNE+Z1GYK0ySuCLsJlWT/corV1yDuPZbw43iox X+IZiWtWTdOagR6ia6Kmtu1xBAkBERg05rl+mc5vYTbVeSPqHSBzcVsEX0SOOTLJrNEQv+3TkhVE3 zCKHALDiY8GrU5Mt5DJNG2U/FW+tfyjRoKFCavUYLM80ai2SjaUEUwZl2Yrrsxi8F6b1JObcDPauN x7dm+MNsGqU55XwwYZXReVE7NU8SQidgcpDBFBK3OjqTNGcY8VvzuC+Senx85xqEP/EKUukiKmT4c Os3WFlSTA==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iMcog-0008CC-Vf; Mon, 21 Oct 2019 18:54:06 +0000 Date: Mon, 21 Oct 2019 11:54:06 -0700 From: Matthew Wilcox To: Changbin Du Cc: Jonathan Corbet , Jiri Kosina , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kernel-doc: trivial improvement for warning message Message-ID: <20191021185406.GC9214@bombadil.infradead.org> References: <20191020132323.29658-1-changbin.du@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191020132323.29658-1-changbin.du@gmail.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 20, 2019 at 09:23:23PM +0800, Changbin Du wrote: > The message "Function parameter or member ..." looks weird. > > Signed-off-by: Changbin Du > --- > scripts/kernel-doc | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/scripts/kernel-doc b/scripts/kernel-doc > index 81dc91760b23..cd3d2ca52c34 100755 > --- a/scripts/kernel-doc > +++ b/scripts/kernel-doc > @@ -1475,8 +1475,13 @@ sub push_parameter($$$$) { > $parameterdescs{$param} = $undescribed; > > if (show_warnings($type, $declaration_name) && $param !~ /\./) { > - print STDERR > - "${file}:$.: warning: Function parameter or member '$param' not described in '$declaration_name'\n"; > + if ($decl_type eq "struct" or $decl_type eq 'union') { > + print STDERR > + "${file}:$.: warning: $decl_type member '$param' not described in '$declaration_name'\n"; > + } else { > + print STDERR > + "${file}:$.: warning: $decl_type parameter '$param' not described in '$declaration_name'\n"; > + } > ++$warnings; How about instead ... if (show_warnings($type, $declaration_name) && $param !~ /\./) { if ($decl_type eq "struct") $msg = "struct member"; elif ($decl_type eq "union") $msg = "union member"; else $msg = "function parameter"; print STDERR "${file}:$.: warning: $msg '$param' not described in '$declaration_name'\n"; (please excuse my perl, i am not a native speaker)