Message ID | 20231206060144.8260-1-rdunlap@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3905208vqy; Tue, 5 Dec 2023 22:01:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IHVxIjpsZyxoO59Xb9gQvcsIgriZgYtNYFvUeFkEZNn4SIpeOWmNJHLF5aWFx8wlUenlsnP X-Received: by 2002:a17:903:280e:b0:1d0:98db:6fd4 with SMTP id kp14-20020a170903280e00b001d098db6fd4mr346689plb.56.1701842516153; Tue, 05 Dec 2023 22:01:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701842516; cv=none; d=google.com; s=arc-20160816; b=XrxNePTplBKXKsr3lqrdhV1sdY62ftLjQDTAsxM7TjztvG8s3kllheUd45BmU95NUr 9Vju7/zNc3DQ1+0sJz7ozmwVFMLqOwU4GaFga8jbnyXuC2p37Ym5/Eosl9fFYizGlhY8 2DyaH738SksTwsjGu+wi3q/TcaeQ0X4rJ4Z9YOV8i4E2F2y5KrSQNLm28ptxQBeAluBb GhKJdRFKYn0SngjgoTrVrNZtA1xRTDgnrU4WDpakplnCTH6Mx8dhl56bAdDE4n/2an0u 2wm5EI+QqYmVI4UQotuxyOIwq5UaEr6SzSsBvj3KZ4vSQS4hstPzWVFNCb/CyiasLitZ 7uJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=P8Ri5BuO2beZsqvWzjOyFCIGgTJgQtvxQqM7x0tBVTQ=; fh=HMM19/uElWrrWx775TSmzJtCesVWpxkFNRBy0/G/fiA=; b=RmQexZ8hH7k+L6PXz++gcF/PIIr5Xh59OwDEj3+zfQVD5g8/z/KNZdi5hpnvnHEq30 PJRtJeCQhE7O7oeRuASDUtbCSOCZA7pHr2oVAgqAkqjIVYOq4DNvFg6rbTJvS+Xamw/9 zkBdqeBogMt4z5RwpuvxJO53fEyfD9XoEBjgbWiF5Iy2hHFnqD/PVwIYAMjtipVCI3ZZ wv3ycncSozEdo0+pJDbgo0SqdGHCrZYmCNf1fNb9wq89ELC2EHtt38qgBItwSXRTaw3+ 3F5FT9tZpA5DAydmkhXqPRIy6uZuYPAYToq7wNV2OZ9b5GclwFxhE+/0dbnmBhNKdEfj XqGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="sgPl/KKT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id p19-20020a170902b09300b001d062135ef8si7649042plr.601.2023.12.05.22.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 22:01:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="sgPl/KKT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id B8362819D9E8; Tue, 5 Dec 2023 22:01:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376871AbjLFGBl (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Wed, 6 Dec 2023 01:01:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376867AbjLFGBj (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 6 Dec 2023 01:01:39 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0555918F; Tue, 5 Dec 2023 22:01:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=P8Ri5BuO2beZsqvWzjOyFCIGgTJgQtvxQqM7x0tBVTQ=; b=sgPl/KKTIgdUP1+4pbSQbWO1+W gkl8XSm1+BQNzWPCudS7OmqaD2Q2AVTKAH+9B29dqgXkJfwKsrqE9SEpWsxxgkBBeG9tbNIMy+Lnp ONn8FUk88oBiwE69CUWtTgva7ki2zfyLIUw0AynHmGPe7yQfvHlz9//D6JKzTMfTC6BTOai5HwvgG /+HXYsDDox8/EY4Ey1512snlC327mNLvhiP+XeD5tJwHLya6sP5gfuqrBVD3CPaaRxX7rpeZijQ2B ++f0uq3f+Z/ePPfAnJHuvnmDjnlF0uiVtkm4trKQ0EvBR9nNDBoX7xXTyhmeJeammcTNZ6M2a6bhk 0Mbfr2lg==; Received: from [50.53.46.231] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rAkyf-0099Gc-1Y; Wed, 06 Dec 2023 06:01:45 +0000 From: Randy Dunlap <rdunlap@infradead.org> To: linux-kernel@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, Henrique de Moraes Holschuh <hmh@hmh.eng.br>, Hans de Goede <hdegoede@redhat.com>, =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>, ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org Subject: [PATCH] platform/x86: thinkpad_acpi: fix kernel-doc warnings Date: Tue, 5 Dec 2023 22:01:43 -0800 Message-ID: <20231206060144.8260-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 05 Dec 2023 22:01:50 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784511218338325455 X-GMAIL-MSGID: 1784511218338325455 |
Series |
platform/x86: thinkpad_acpi: fix kernel-doc warnings
|
|
Commit Message
Randy Dunlap
Dec. 6, 2023, 6:01 a.m. UTC
Add a function's return description and don't misuse "/**" for
non-kernel-doc comments to prevent warnings from scripts/kernel-doc.
thinkpad_acpi.c:523: warning: No description found for return value of 'tpacpi_check_quirks'
thinkpad_acpi.c:9307: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
thinkpad_acpi.c:9307: warning: missing initial short description on line:
* This evaluates a ACPI method call specific to the battery
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
CC: ibm-acpi-devel@lists.sourceforge.net
CC: platform-driver-x86@vger.kernel.org
---
drivers/platform/x86/thinkpad_acpi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Comments
Hi Randy On Wed, Dec 6, 2023, at 1:01 AM, Randy Dunlap wrote: > Add a function's return description and don't misuse "/**" for > non-kernel-doc comments to prevent warnings from scripts/kernel-doc. > > thinkpad_acpi.c:523: warning: No description found for return value of > 'tpacpi_check_quirks' > thinkpad_acpi.c:9307: warning: This comment starts with '/**', but > isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst > thinkpad_acpi.c:9307: warning: missing initial short description on > line: > * This evaluates a ACPI method call specific to the battery > > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br> > Cc: Hans de Goede <hdegoede@redhat.com> > Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com> > CC: ibm-acpi-devel@lists.sourceforge.net > CC: platform-driver-x86@vger.kernel.org > --- > drivers/platform/x86/thinkpad_acpi.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff -- a/drivers/platform/x86/thinkpad_acpi.c > b/drivers/platform/x86/thinkpad_acpi.c > --- a/drivers/platform/x86/thinkpad_acpi.c > +++ b/drivers/platform/x86/thinkpad_acpi.c > @@ -512,10 +512,10 @@ struct tpacpi_quirk { > * Iterates over a quirks list until one is found that matches the > * ThinkPad's vendor, BIOS and EC model. > * > - * Returns 0 if nothing matches, otherwise returns the quirks field of > + * Returns: %0 if nothing matches, otherwise returns the quirks field Just being nosy - what does %0 do? I assume it helps with the return value but was intrigued how it is used and where > of > * the matching &struct tpacpi_quirk entry. > * > - * The match criteria is: vendor, ec and bios much match. > + * The match criteria is: vendor, ec and bios must match. I can't for the life of me see what is different here. What am I missing? > */ > static unsigned long __init tpacpi_check_quirks( > const struct tpacpi_quirk *qlist, > @@ -9303,7 +9303,7 @@ static struct tpacpi_battery_driver_data > > /* ACPI helpers/functions/probes */ > > -/** > +/* > * This evaluates a ACPI method call specific to the battery > * ACPI extension. The specifics are that an error is marked > * in the 32rd bit of the response, so we just check that here. > > > _______________________________________________ > ibm-acpi-devel mailing list > ibm-acpi-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel Thanks Mark
Hi Mark, On 12/6/23 07:30, Mark Pearson wrote: > Hi Randy > > On Wed, Dec 6, 2023, at 1:01 AM, Randy Dunlap wrote: >> Add a function's return description and don't misuse "/**" for >> non-kernel-doc comments to prevent warnings from scripts/kernel-doc. >> >> thinkpad_acpi.c:523: warning: No description found for return value of >> 'tpacpi_check_quirks' >> thinkpad_acpi.c:9307: warning: This comment starts with '/**', but >> isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst >> thinkpad_acpi.c:9307: warning: missing initial short description on >> line: >> * This evaluates a ACPI method call specific to the battery >> >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> >> Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br> >> Cc: Hans de Goede <hdegoede@redhat.com> >> Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com> >> CC: ibm-acpi-devel@lists.sourceforge.net >> CC: platform-driver-x86@vger.kernel.org >> --- >> drivers/platform/x86/thinkpad_acpi.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff -- a/drivers/platform/x86/thinkpad_acpi.c >> b/drivers/platform/x86/thinkpad_acpi.c >> --- a/drivers/platform/x86/thinkpad_acpi.c >> +++ b/drivers/platform/x86/thinkpad_acpi.c >> @@ -512,10 +512,10 @@ struct tpacpi_quirk { >> * Iterates over a quirks list until one is found that matches the >> * ThinkPad's vendor, BIOS and EC model. >> * >> - * Returns 0 if nothing matches, otherwise returns the quirks field of >> + * Returns: %0 if nothing matches, otherwise returns the quirks field > > Just being nosy - what does %0 do? > I assume it helps with the return value but was intrigued how it is used and where It causes the output to be formatted as a CONSTANT (probably monospaced font, but no guarantees on that). > >> of >> * the matching &struct tpacpi_quirk entry. >> * >> - * The match criteria is: vendor, ec and bios much match. >> + * The match criteria is: vendor, ec and bios must match. > I can't for the life of me see what is different here. What am I missing? s/much/must/ > >> */ >> static unsigned long __init tpacpi_check_quirks( >> const struct tpacpi_quirk *qlist, >> @@ -9303,7 +9303,7 @@ static struct tpacpi_battery_driver_data >> >> /* ACPI helpers/functions/probes */ >> >> -/** >> +/* >> * This evaluates a ACPI method call specific to the battery >> * ACPI extension. The specifics are that an error is marked >> * in the 32rd bit of the response, so we just check that here. >> >> >> _______________________________________________ >> ibm-acpi-devel mailing list >> ibm-acpi-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel > > Thanks > Mark
On Wed, Dec 6, 2023, at 11:45 AM, Randy Dunlap wrote: > Hi Mark, > > On 12/6/23 07:30, Mark Pearson wrote: >> Hi Randy >> >> On Wed, Dec 6, 2023, at 1:01 AM, Randy Dunlap wrote: >>> Add a function's return description and don't misuse "/**" for >>> non-kernel-doc comments to prevent warnings from scripts/kernel-doc. >>> >>> thinkpad_acpi.c:523: warning: No description found for return value of >>> 'tpacpi_check_quirks' >>> thinkpad_acpi.c:9307: warning: This comment starts with '/**', but >>> isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst >>> thinkpad_acpi.c:9307: warning: missing initial short description on >>> line: >>> * This evaluates a ACPI method call specific to the battery >>> >>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> >>> Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br> >>> Cc: Hans de Goede <hdegoede@redhat.com> >>> Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com> >>> CC: ibm-acpi-devel@lists.sourceforge.net >>> CC: platform-driver-x86@vger.kernel.org >>> --- >>> drivers/platform/x86/thinkpad_acpi.c | 6 +++--- >>> 1 file changed, 3 insertions(+), 3 deletions(-) >>> >>> diff -- a/drivers/platform/x86/thinkpad_acpi.c >>> b/drivers/platform/x86/thinkpad_acpi.c >>> --- a/drivers/platform/x86/thinkpad_acpi.c >>> +++ b/drivers/platform/x86/thinkpad_acpi.c >>> @@ -512,10 +512,10 @@ struct tpacpi_quirk { >>> * Iterates over a quirks list until one is found that matches the >>> * ThinkPad's vendor, BIOS and EC model. >>> * >>> - * Returns 0 if nothing matches, otherwise returns the quirks field of >>> + * Returns: %0 if nothing matches, otherwise returns the quirks field >> >> Just being nosy - what does %0 do? >> I assume it helps with the return value but was intrigued how it is used and where > > It causes the output to be formatted as a CONSTANT (probably monospaced font, > but no guarantees on that). Ah - cool. Thanks! > >> >>> of >>> * the matching &struct tpacpi_quirk entry. >>> * >>> - * The match criteria is: vendor, ec and bios much match. >>> + * The match criteria is: vendor, ec and bios must match. >> I can't for the life of me see what is different here. What am I missing? > > s/much/must/ Man....I need to go to the opticians :) > >> >>> */ >>> static unsigned long __init tpacpi_check_quirks( >>> const struct tpacpi_quirk *qlist, >>> @@ -9303,7 +9303,7 @@ static struct tpacpi_battery_driver_data >>> >>> /* ACPI helpers/functions/probes */ >>> >>> -/** >>> +/* >>> * This evaluates a ACPI method call specific to the battery >>> * ACPI extension. The specifics are that an error is marked >>> * in the 32rd bit of the response, so we just check that here. >>> >>> >>> _______________________________________________ >>> ibm-acpi-devel mailing list >>> ibm-acpi-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel >> >> Thanks >> Mark > > -- > ~Randy Looks good to me! Reviewed-by: mpearson-lenovo@squebb.ca Mark
On Tue, 05 Dec 2023 22:01:43 -0800, Randy Dunlap wrote: > Add a function's return description and don't misuse "/**" for > non-kernel-doc comments to prevent warnings from scripts/kernel-doc. > > thinkpad_acpi.c:523: warning: No description found for return value of 'tpacpi_check_quirks' > thinkpad_acpi.c:9307: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst > thinkpad_acpi.c:9307: warning: missing initial short description on line: > * This evaluates a ACPI method call specific to the battery > > [...] Thank you for your contribution, it has been applied to my local review-ilpo branch. Note it will show up in the public platform-drivers-x86/review-ilpo branch only once I've pushed my local branch there, which might take a while. The list of commits applied: [1/1] platform/x86: thinkpad_acpi: fix kernel-doc warnings commit: 17fe3ec0c110b4afc04052e2a33b146766aac8a1 -- i.
diff -- a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -512,10 +512,10 @@ struct tpacpi_quirk { * Iterates over a quirks list until one is found that matches the * ThinkPad's vendor, BIOS and EC model. * - * Returns 0 if nothing matches, otherwise returns the quirks field of + * Returns: %0 if nothing matches, otherwise returns the quirks field of * the matching &struct tpacpi_quirk entry. * - * The match criteria is: vendor, ec and bios much match. + * The match criteria is: vendor, ec and bios must match. */ static unsigned long __init tpacpi_check_quirks( const struct tpacpi_quirk *qlist, @@ -9303,7 +9303,7 @@ static struct tpacpi_battery_driver_data /* ACPI helpers/functions/probes */ -/** +/* * This evaluates a ACPI method call specific to the battery * ACPI extension. The specifics are that an error is marked * in the 32rd bit of the response, so we just check that here.