From patchwork Wed Dec 6 06:01:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 174305 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3904965vqy; Tue, 5 Dec 2023 22:01:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IEoX01teH3h45DHlsvBNdtg17s7DcnZphh66t819mFb5fPgrUWgbVZRZszUXf+rt3Cyzgti X-Received: by 2002:a05:6358:4411:b0:16b:c8cd:1f05 with SMTP id z17-20020a056358441100b0016bc8cd1f05mr612951rwc.17.1701842491551; Tue, 05 Dec 2023 22:01:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701842491; cv=none; d=google.com; s=arc-20160816; b=Y/Kqj0lVGTohYPchBylscc0l19zAZCD+pCmIe6L8+Akjt0dNAIvkd0MxwQFqF2fsE5 pLcgwBJYpwcch20NWU2KsqfVH8+cyZOWv7PiJHjnq4I9HxBKBfhjM5bje1Z5WNqhIwaC GBKq8IiHMaHgOCvlMwRtAd1ffF6yAYRxKapTaQxxh3W+W9f3pip5Eu4d73zKFPN6MQEF cBZ2N5k0oS1ZCWHx/qzRD8xUwnOn8uI9029ED3owmwFXEhr2eEIZ3mcijGNdmcA4Z/gd SP7u1681yYBvCt8Ri4BL7Ic006pzrU6pKY5kwNuRDteR6xixylEEvO3vstenc7oCP8AS TJVA== 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=ZpqnEFEVYXGghRKsKTwe/hCYFwzIb9udDvXhXmIddxs=; fh=C+8VsNiip0xzeOXol8PB2o5kUzmEqqxaEytiEiUDVWE=; b=uhpSYR6tz3KNcvk2nl3kLx9yVPuQK7eFopA0vhaQXFigVig0HV2iFZddfZBeYZWTcl CAxArbCldHCpXKCxKWXiP2rGnIkZFBywHADD3HFkLM0dK+Rslc9klyT1ERFMZXKBme9Z GzRvIxHfKG1FuKIqWNN0BgeWuZ6wIj2rGCfx3L8/az5MvJJgfkUqkvCOP0afgrEAQ9un 2M10xReq1eDgEPs5gJnNjyhEGKkJWI3D7YybYA4ZMbMue8RKP51IPiIhdhA7A5zP+o6T P76wMHE1eoz92Mm02Kq3n+Vv37dJT+LG3XgAZGB5Lba8XQD5piwVO9iNRDad20OiA8jD Rpsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=k0EgXnX4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id j35-20020a632323000000b005b8ebaa2937si10549363pgj.47.2023.12.05.22.01.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 22:01:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=k0EgXnX4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 5EA7882CEFEE; Tue, 5 Dec 2023 22:01:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376772AbjLFGBR (ORCPT + 99 others); Wed, 6 Dec 2023 01:01:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376859AbjLFGBP (ORCPT ); Wed, 6 Dec 2023 01:01:15 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0AEF1B6; Tue, 5 Dec 2023 22:01:21 -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=ZpqnEFEVYXGghRKsKTwe/hCYFwzIb9udDvXhXmIddxs=; b=k0EgXnX45Wo8DtP3tGt50/Q1iw pMhJJ7xo+N2JfKo02ApW+xhAG2M3qYSA3ifz8OWu6HejXMmsVfLNoR3a7kybDMJ2nQJeHnKXr0ZKe rjT/qiHZQNvSF5Oj3vgpLhEHqqLC/33ovrBQYSZUuMOdcwCtJl6o6vqGQoP/jNFRYMVUgryJICs4U 4vX7K6Mgv2ax/4WtlIOCGRUHpTYc+TfQMCpXagwXCuO00tlKnjAtjBCr1zX94OaIs/n68sAtzpFmR XigsBNzNctgtPaFQMLKinhwm+hsw0B8OcSXI+v0et75lLRn67lhVUTfzGZ/n9grJpUWsQKZ57yTzC KzzyJ0+A==; Received: from [50.53.46.231] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rAkyH-0099Fe-0A; Wed, 06 Dec 2023 06:01:21 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , platform-driver-x86@vger.kernel.org Subject: [PATCH] platform/x86: intel_ips: fix kernel-doc formatting Date: Tue, 5 Dec 2023 22:01:18 -0800 Message-ID: <20231206060120.4816-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 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 howler.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 (howler.vger.email [0.0.0.0]); Tue, 05 Dec 2023 22:01:27 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784511192394085863 X-GMAIL-MSGID: 1784511192394085863 Fix kernel-doc function notation and comment formatting to prevent warnings from scripts/kernel-doc. for drivers/platform/x86/intel_ips.c: 595: warning: No description found for return value of 'mcp_exceeded' 624: warning: No description found for return value of 'cpu_exceeded' 650: warning: No description found for return value of 'mch_exceeded' 745: warning: bad line: cpu+ gpu+ cpu+gpu- cpu-gpu+ cpu-gpu- 746: warning: bad line: cpu < gpu < cpu+gpu+ cpu+ gpu+ nothing 753: warning: No description found for return value of 'ips_adjust' 747: warning: bad line: cpu < gpu >= cpu+gpu-(mcp<) cpu+gpu-(mcp<) gpu- gpu- 748: warning: bad line: cpu >= gpu < cpu-gpu+(mcp<) cpu- cpu-gpu+(mcp<) cpu- 749: warning: bad line: cpu >= gpu >= cpu-gpu- cpu-gpu- cpu-gpu- cpu-gpu- 945: warning: No description found for return value of 'ips_monitor' 1151: warning: No description found for return value of 'ips_irq_handler' 1301: warning: Function parameter or member 'ips' not described in 'ips_detect_cpu' 1302: warning: No description found for return value of 'ips_detect_cpu' 1358: warning: No description found for return value of 'ips_get_i915_syms' Signed-off-by: Randy Dunlap Cc: Hans de Goede Cc: Ilpo Järvinen Cc: platform-driver-x86@vger.kernel.org --- drivers/platform/x86/intel_ips.c | 30 ++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff -- a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c --- a/drivers/platform/x86/intel_ips.c +++ b/drivers/platform/x86/intel_ips.c @@ -590,6 +590,8 @@ static void ips_disable_gpu_turbo(struct * @ips: IPS driver struct * * Check whether the MCP is over its thermal or power budget. + * + * Returns: %true if the temp or power has exceeded its maximum, else %false */ static bool mcp_exceeded(struct ips_driver *ips) { @@ -619,6 +621,8 @@ static bool mcp_exceeded(struct ips_driv * @cpu: CPU number to check * * Check a given CPU's average temp or power is over its limit. + * + * Returns: %true if the temp or power has exceeded its maximum, else %false */ static bool cpu_exceeded(struct ips_driver *ips, int cpu) { @@ -645,6 +649,8 @@ static bool cpu_exceeded(struct ips_driv * @ips: IPS driver struct * * Check the MCH temp & power against their maximums. + * + * Returns: %true if the temp or power has exceeded its maximum, else %false */ static bool mch_exceeded(struct ips_driver *ips) { @@ -742,12 +748,13 @@ static void update_turbo_limits(struct i * - down (at TDP limit) * - adjust both CPU and GPU down if possible * - cpu+ gpu+ cpu+gpu- cpu-gpu+ cpu-gpu- -cpu < gpu < cpu+gpu+ cpu+ gpu+ nothing -cpu < gpu >= cpu+gpu-(mcp<) cpu+gpu-(mcp<) gpu- gpu- -cpu >= gpu < cpu-gpu+(mcp<) cpu- cpu-gpu+(mcp<) cpu- -cpu >= gpu >= cpu-gpu- cpu-gpu- cpu-gpu- cpu-gpu- + * |cpu+ gpu+ cpu+gpu- cpu-gpu+ cpu-gpu- + * cpu < gpu < |cpu+gpu+ cpu+ gpu+ nothing + * cpu < gpu >= |cpu+gpu-(mcp<) cpu+gpu-(mcp<) gpu- gpu- + * cpu >= gpu < |cpu-gpu+(mcp<) cpu- cpu-gpu+(mcp<) cpu- + * cpu >= gpu >=|cpu-gpu- cpu-gpu- cpu-gpu- cpu-gpu- * + * Returns: %0 */ static int ips_adjust(void *data) { @@ -935,11 +942,13 @@ static void monitor_timeout(struct timer * @data: ips driver structure * * This is the main function for the IPS driver. It monitors power and - * tempurature in the MCP and adjusts CPU and GPU power clams accordingly. + * temperature in the MCP and adjusts CPU and GPU power clamps accordingly. * - * We keep a 5s moving average of power consumption and tempurature. Using + * We keep a 5s moving average of power consumption and temperature. Using * that data, along with CPU vs GPU preference, we adjust the power clamps * up or down. + * + * Returns: %0 on success or -errno on error */ static int ips_monitor(void *data) { @@ -1146,6 +1155,8 @@ static void dump_thermal_info(struct ips * Handle temperature limit trigger events, generally by lowering the clamps. * If we're at a critical limit, we clamp back to the lowest possible value * to prevent emergency shutdown. + * + * Returns: IRQ_NONE or IRQ_HANDLED */ static irqreturn_t ips_irq_handler(int irq, void *arg) { @@ -1293,9 +1304,12 @@ static void ips_debugfs_init(struct ips_ /** * ips_detect_cpu - detect whether CPU supports IPS + * @ips: IPS driver struct * * Walk our list and see if we're on a supported CPU. If we find one, * return the limits for it. + * + * Returns: the &ips_mcp_limits struct that matches the boot CPU or %NULL */ static struct ips_mcp_limits *ips_detect_cpu(struct ips_driver *ips) { @@ -1352,6 +1366,8 @@ static struct ips_mcp_limits *ips_detect * monitor and control graphics turbo mode. If we can find them, we can * enable graphics turbo, otherwise we must disable it to avoid exceeding * thermal and power limits in the MCP. + * + * Returns: %true if the required symbols are found, else %false */ static bool ips_get_i915_syms(struct ips_driver *ips) {