From patchwork Wed Sep 27 11:03:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 145546 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp2843713vqu; Wed, 27 Sep 2023 12:10:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHiMdxgBzrRKid2qEXps8Cw5D8iCU67/lvRcbhTqyPpnBJh+Sw0guVWhuwLhgbjvnGgVfq X-Received: by 2002:a17:902:b20a:b0:1c5:db4e:bb2c with SMTP id t10-20020a170902b20a00b001c5db4ebb2cmr2529055plr.64.1695841844989; Wed, 27 Sep 2023 12:10:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695841844; cv=none; d=google.com; s=arc-20160816; b=YGLXKaGW9aGlLe7lfeunB74Ug4ajl3Z24ny1KTKongBnMBItOe6odEkVALYrDyAt8B AF3/E6zH9MI+00o0xCzp8aeV8uzMOR+xMAQif/9ZWpeTlR/l89Xb3GWStYe/OWNKdefK e06z5LTZw7ErgAJ87hOECQdFISArIL8euv8bqM68Hewj5hPcd6V4rkRBK0HeMbxVlj+v 6VXCiq4GOnATyJoWlHFh4lCo1MkrBv96CpuMgA0iCLYmrgBqE5A+jHviT4Hc4jmae6WE 4w4p4oLcHEvbw0hsuygx8k/e3J28ZN+Ie1A6MaTYo7lbwFcFfcxKgISAu9xoHhBDT37R Gctw== 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=TRZ/r6+7TOpg5cdhVwD17zimKeX22UUsUqcVE65wOuQ=; fh=4dM9obvv3+FTtbt8VJnvdJCJT34fHtlomd1MH6QVqsU=; b=ZULEm9cI2B30SPrT1Ubghh9yEKv3U2QzK+XFcr+WIP+54WaCYKy3cf70xKmTjebqrF GaWhEZAxVnPq8d1Ehf2bxemxOhMBKIbDrlNHQV5xnmV0zAG2qPHELFHSznlWTak+O/4K BAfDZCuWI0Ij+qq0EHnKGMa2LHcJjdPH5st+07doj2KRxgATvodxlUEg55J5B/IMy4zU lXZXI7GGCe2Qr0yLLF3Jd3qNswLEQz5gxhbcuKxNjj46J4xnit6G1qwOVDCYc6MHbpEh V9GPIod2GOWxOc2MeHAfqvOYYHtc+0xPHZe5RlVBjaAmvu6i8dJLbD1jdXuSkw2rrpVC fhfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NRTXv3fS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id km3-20020a17090327c300b001c35864fdbbsi14846962plb.406.2023.09.27.12.10.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 12:10:44 -0700 (PDT) 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=@linaro.org header.s=google header.b=NRTXv3fS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 0627881143EC; Wed, 27 Sep 2023 04:04:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231290AbjI0LEK (ORCPT + 22 others); Wed, 27 Sep 2023 07:04:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229648AbjI0LEF (ORCPT ); Wed, 27 Sep 2023 07:04:05 -0400 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94D01180 for ; Wed, 27 Sep 2023 04:04:03 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-517ab9a4a13so7740297a12.1 for ; Wed, 27 Sep 2023 04:04:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695812643; x=1696417443; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TRZ/r6+7TOpg5cdhVwD17zimKeX22UUsUqcVE65wOuQ=; b=NRTXv3fSIJxhOLjzpc3t8c12lcpFQJwIQdwJ5T2cOMdlwg0UeG70/KnaxxBruhZK7G cd0wo6Vl0OtMhhGpujtcHkq5d+iwBGOT9RCmIUf5ZckrmZ7CXXUlZBZOJRy5Kk8aDhHm KPOwMuXlgwz3ym4GKOxevmz/zNW3dgcLRDx99fBvdKiiIbDGO6XbqqRXkfbfA8slYDPR dYaiHq9fJ7TZF+LsZCfeVPFLuihl8SZM+wviLk0lLBfYn1S5NbbpB9JXMpcRiVYxNVP3 TzgoNYvK5k37HYO4HAwDDcrBRckt/fIAupevM1iDmN4WSEtsEEurOeQ3z4havRCh0WgQ BaPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695812643; x=1696417443; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TRZ/r6+7TOpg5cdhVwD17zimKeX22UUsUqcVE65wOuQ=; b=N84ERdSi2AqbR3yv3nJpWaXP9/NrYAHxfxS6eHgjuqU5rUZzyAdny4tLDL8WyC6SvB X39H691iRjNO1oSlpLo/She+wSd+K0HdXXgYLRRI5fb3Y5VwClLKZGitoX7oGpQGTrQ4 V9M7xEE8lfD9nQT6i4LENB9I6AZeRNHn0Ty93IkW7Z/ZzN6CS/HL6/Qr+ARgGYkt7TNQ 1h5o9KtB1cW5WlubTLf3LarjmP3wFYp/Lnb047icvf+4CqlUfHLJughsJBYX99GKk02S RPKTjhR4dTYBXyTsCDD9sxind6aGLZKaqoH+1IDHTI6q+exa1b+8I71IdxVHDbVdtGli siGw== X-Gm-Message-State: AOJu0YwO6MvEbOT7SsC60mU9O4sDWoYtXWdZoXyi1lNquCZpsA4zmyRc gvtdOojwPw62M1VJ9g4i/KHyZQ== X-Received: by 2002:a05:6a20:12c6:b0:161:3120:e840 with SMTP id v6-20020a056a2012c600b001613120e840mr1706101pzg.2.1695812642959; Wed, 27 Sep 2023 04:04:02 -0700 (PDT) Received: from localhost ([122.172.81.92]) by smtp.gmail.com with ESMTPSA id g1-20020a62e301000000b0068fb4f5f38fsm11454912pfh.30.2023.09.27.04.04.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 04:04:02 -0700 (PDT) From: Viresh Kumar To: Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , "Rafael J. Wysocki" , kernel test robot , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] OPP: Remove doc style comments for internal routines Date: Wed, 27 Sep 2023 16:33:55 +0530 Message-Id: <0484680a9c7bb66cf1fb583a5178e753dd763afd.1695812634.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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]); Wed, 27 Sep 2023 04:04:29 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778219058406580188 X-GMAIL-MSGID: 1778219058406580188 These were previously exposed outside of the OPP core and needed doc style commenting. They aren't public now and don't need the same. This fixes warnings generated for builds with `W=1`: core.c:2105: warning: Function parameter or member 'opp_table' not described in '_opp_set_supported_hw' core.c:2105: warning: Excess function parameter 'dev' description in '_opp_set_supported_hw' core.c:2148: warning: Function parameter or member 'opp_table' not described in '_opp_set_prop_name' core.c:2148: warning: Excess function parameter 'dev' description in '_opp_set_prop_name' core.c:2189: warning: Function parameter or member 'opp_table' not described in '_opp_set_regulators' core.c:2189: warning: Excess function parameter 'count' description in '_opp_set_regulators' core.c:2293: warning: Function parameter or member 'opp_table' not described in '_opp_set_clknames' core.c:2293: warning: Function parameter or member 'config_clks' not described in '_opp_set_clknames' core.c:2391: warning: Function parameter or member 'opp_table' not described in '_opp_set_config_regulators_helper' core.c:2455: warning: Function parameter or member 'opp_table' not described in '_opp_attach_genpd' core.c:2682: warning: Function parameter or member 'token' not described in 'dev_pm_opp_clear_config' core.c:2682: warning: Excess function parameter 'opp_table' description in 'dev_pm_opp_clear_config' Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202309091558.x3JJrxFI-lkp@intel.com/ Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 79 ++++------------------------------------------ 1 file changed, 7 insertions(+), 72 deletions(-) diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 6cae2785b264..ab82aafecedf 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -2089,12 +2089,7 @@ int _opp_add_v1(struct opp_table *opp_table, struct device *dev, return ret; } -/** - * _opp_set_supported_hw() - Set supported platforms - * @dev: Device for which supported-hw has to be set. - * @versions: Array of hierarchy of versions to match. - * @count: Number of elements in the array. - * +/* * This is required only for the V2 bindings, and it enables a platform to * specify the hierarchy of versions it supports. OPP layer will then enable * OPPs, which are available for those versions, based on its 'opp-supported-hw' @@ -2117,14 +2112,6 @@ static int _opp_set_supported_hw(struct opp_table *opp_table, return 0; } -/** - * _opp_put_supported_hw() - Releases resources blocked for supported hw - * @opp_table: OPP table returned by _opp_set_supported_hw(). - * - * This is required only for the V2 bindings, and is called for a matching - * _opp_set_supported_hw(). Until this is called, the opp_table structure - * will not be freed. - */ static void _opp_put_supported_hw(struct opp_table *opp_table) { if (opp_table->supported_hw) { @@ -2134,11 +2121,7 @@ static void _opp_put_supported_hw(struct opp_table *opp_table) } } -/** - * _opp_set_prop_name() - Set prop-extn name - * @dev: Device for which the prop-name has to be set. - * @name: name to postfix to properties. - * +/* * This is required only for the V2 bindings, and it enables a platform to * specify the extn to be used for certain property names. The properties to * which the extension will apply are opp-microvolt and opp-microamp. OPP core @@ -2156,14 +2139,6 @@ static int _opp_set_prop_name(struct opp_table *opp_table, const char *name) return 0; } -/** - * _opp_put_prop_name() - Releases resources blocked for prop-name - * @opp_table: OPP table returned by _opp_set_prop_name(). - * - * This is required only for the V2 bindings, and is called for a matching - * _opp_set_prop_name(). Until this is called, the opp_table structure - * will not be freed. - */ static void _opp_put_prop_name(struct opp_table *opp_table) { if (opp_table->prop_name) { @@ -2172,12 +2147,7 @@ static void _opp_put_prop_name(struct opp_table *opp_table) } } -/** - * _opp_set_regulators() - Set regulator names for the device - * @dev: Device for which regulator name is being set. - * @names: Array of pointers to the names of the regulator. - * @count: Number of regulators. - * +/* * In order to support OPP switching, OPP layer needs to know the name of the * device's regulators, as the core would be required to switch voltages as * well. @@ -2239,10 +2209,6 @@ static int _opp_set_regulators(struct opp_table *opp_table, struct device *dev, return ret; } -/** - * _opp_put_regulators() - Releases resources blocked for regulator - * @opp_table: OPP table returned from _opp_set_regulators(). - */ static void _opp_put_regulators(struct opp_table *opp_table) { int i; @@ -2274,11 +2240,7 @@ static void _put_clks(struct opp_table *opp_table, int count) opp_table->clks = NULL; } -/** - * _opp_set_clknames() - Set clk names for the device - * @dev: Device for which clk names is being set. - * @names: Clk names. - * +/* * In order to support OPP switching, OPP layer needs to get pointers to the * clocks for the device. Simple cases work fine without using this routine * (i.e. by passing connection-id as NULL), but for a device with multiple @@ -2362,10 +2324,6 @@ static int _opp_set_clknames(struct opp_table *opp_table, struct device *dev, return ret; } -/** - * _opp_put_clknames() - Releases resources blocked for clks. - * @opp_table: OPP table returned from _opp_set_clknames(). - */ static void _opp_put_clknames(struct opp_table *opp_table) { if (!opp_table->clks) @@ -2377,11 +2335,7 @@ static void _opp_put_clknames(struct opp_table *opp_table) _put_clks(opp_table, opp_table->clk_count); } -/** - * _opp_set_config_regulators_helper() - Register custom set regulator helper. - * @dev: Device for which the helper is getting registered. - * @config_regulators: Custom set regulator helper. - * +/* * This is useful to support platforms with multiple regulators per device. * * This must be called before any OPPs are initialized for the device. @@ -2396,13 +2350,6 @@ static int _opp_set_config_regulators_helper(struct opp_table *opp_table, return 0; } -/** - * _opp_put_config_regulators_helper() - Releases resources blocked for - * config_regulators helper. - * @opp_table: OPP table returned from _opp_set_config_regulators_helper(). - * - * Release resources blocked for platform specific config_regulators helper. - */ static void _opp_put_config_regulators_helper(struct opp_table *opp_table) { if (opp_table->config_regulators) @@ -2428,12 +2375,7 @@ static void _detach_genpd(struct opp_table *opp_table) opp_table->genpd_virt_devs = NULL; } -/** - * _opp_attach_genpd - Attach genpd(s) for the device and save virtual device pointer - * @dev: Consumer device for which the genpd is getting attached. - * @names: Null terminated array of pointers containing names of genpd to attach. - * @virt_devs: Pointer to return the array of virtual devices. - * +/* * Multiple generic power domains for a device are supported with the help of * virtual genpd devices, which are created for each consumer device - genpd * pair. These are the device structures which are attached to the power domain @@ -2509,13 +2451,6 @@ static int _opp_attach_genpd(struct opp_table *opp_table, struct device *dev, } -/** - * _opp_detach_genpd() - Detach genpd(s) from the device. - * @opp_table: OPP table returned by _opp_attach_genpd(). - * - * This detaches the genpd(s), resets the virtual device pointers, and puts the - * OPP table. - */ static void _opp_detach_genpd(struct opp_table *opp_table) { /* @@ -2667,7 +2602,7 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_set_config); /** * dev_pm_opp_clear_config() - Releases resources blocked for OPP configuration. - * @opp_table: OPP table returned from dev_pm_opp_set_config(). + * @token: The token returned by dev_pm_opp_set_config() previously. * * This allows all device OPP configurations to be cleared at once. This must be * called once for each call made to dev_pm_opp_set_config(), in order to free From patchwork Wed Sep 27 11:03:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 145342 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp2581127vqu; Wed, 27 Sep 2023 05:10:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFH9Xpq37Ag7fDydYr0r3m+gYV94hgme8efnvJqUzpuzB0Zde5tyMLFl6WjTDAJvKWgD7ig X-Received: by 2002:a25:6803:0:b0:d80:8aa6:5abc with SMTP id d3-20020a256803000000b00d808aa65abcmr2019072ybc.61.1695816629926; Wed, 27 Sep 2023 05:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695816629; cv=none; d=google.com; s=arc-20160816; b=bmAN42qzgCF8kl4yxVZxB0z0vwSr4/s2N2QFlUbslGBQLzy33ZqxJ9ct20292sDxWI jIHbh4SeowaCnQ/eCYtW4zeE4Pnue0GIqtKGAAvK4cgx586DZzlEtePUZRUuQiTcXDLx 4EjRjCgDNPCYTRJv0KFDBSuNl33lyIhgsdwubSYQRR6ITbHu1h2AE+1eD6mRu07jMJUX Ssgn46RIzK8V/ZKyc+oBIniygR8+kbYfXoYk4M2d/294f7kXyVzFf+lasfB+g073ieGK bpAxcCH6ISRod77ymE7kf/A0fV+qFva/7NORW+ojpX0z4rgq1bBbSx7jW7h+Qid1Vh2A W89Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5Olui9SEAYGZ/qLdWlOCc/Jx3V7KvjrAKjWFcO+OQFo=; fh=DnMG0bxiWO/F+XVRDCjP0Bjw4u1lvyeS08VeM0fAhhM=; b=o6GxUtMPeexKhza2swKd66a+DaW/YEkrMdKHMl6I7C8JhU/SCp8bCvN2PhxfrMb1MH 5NrmdvGXsrexLuut/Msf55TgM8iM3/17J4QFEQcU7cSo0W8hO3/X9qia0T/wUcsBHYh3 3YeDgz90Rkcanx6L40qS6bN5onUhXXi4oKJrRjWo+8QgNmeJ2hnCnQ6W9XnifZSEsdox Gnj2fhFVJOwUt+O46EjMuHIqNwFPK8ZT24p8AciQ2QCfylju6O0p2eK2Z4kXsKYaPILF veJfuzzCTZ7JbmuuhEQfMcd6Tkc7Y0jf59ERqIKaitRxAYFKonwnONXjv4vvDbfnN2YX A71g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X1qikUUu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id r20-20020a6560d4000000b00565eee2d0fesi14822847pgv.324.2023.09.27.05.10.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 05:10:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X1qikUUu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4824E8218218; Wed, 27 Sep 2023 04:04:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231266AbjI0LEO (ORCPT + 22 others); Wed, 27 Sep 2023 07:04:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231288AbjI0LEI (ORCPT ); Wed, 27 Sep 2023 07:04:08 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1F5E193 for ; Wed, 27 Sep 2023 04:04:06 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1c44c0f9138so79238665ad.2 for ; Wed, 27 Sep 2023 04:04:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695812646; x=1696417446; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5Olui9SEAYGZ/qLdWlOCc/Jx3V7KvjrAKjWFcO+OQFo=; b=X1qikUUuvIVGQNWH1ne6FBTiJjHtCofgUHqv95pEoDIK6yD49dc9ZjH6CtSd8BW8kK f9OIPiRmIC+1SDu8xPTMQ8iFLYtuOILuv3BUL1ogQgY7lgqto6aFewz09sAOmVL0/0AA raEbhjE6cA5s50j3RaajiAor1r9x5M/2h3IyXQgytYbSQI1XfgzR87FznqsMLZCrVw9t 01NV4OcWSm/yNKLJecM1A/YeMKSAoSnJ4sGWv96h6X9Wug9xwAup2739zNExg2FnDkbh jsOebyVEHnngPQStwxeueaVUf2bRx3RrVOhvU5ZJ1xlq5Q2/JQRJiE7YjIYoQIyf5KBi CpDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695812646; x=1696417446; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5Olui9SEAYGZ/qLdWlOCc/Jx3V7KvjrAKjWFcO+OQFo=; b=aabkqQ3wu0TS0kenrmGrVqRaMFvWDnyE5iy40SoFg5jvZS5AG0y3AfZSXpJJkXwtgf DpmH2OEJRNfCkP/ytbsKUFoJoU3VRXBSTaCY6Cr6Y+p3QV3Xxeti9NAp09yC1GPQn7yf 6IkA3pbvMCz7IRknYAeNddyNSU4Mbjq92gHyxvt/KrVLhDqEl090twEYi2ttgBnDUMHC HaHqQnce0mRnQcNrlAyNC/kdOhP3rlui4bYs3yg/xA/n1cFfU4+8Czrf+jChmHvZjBI1 7htDib7A6jitUjqtIJfEt+93AGh55N71E1ZZvg9Q+Fs0XLidP/208qCfQFSfw8HyhAgm I+Lw== X-Gm-Message-State: AOJu0YyssjiUfqDTv6y3Fp3ZbG3bIHnmkCFZGg3NGShu7dyewBpRGPnV 0Bcw94gWJI/i2dBNUCB/Le7mJQ== X-Received: by 2002:a17:902:7d96:b0:1c5:bc83:556b with SMTP id a22-20020a1709027d9600b001c5bc83556bmr1203539plm.52.1695812646068; Wed, 27 Sep 2023 04:04:06 -0700 (PDT) Received: from localhost ([122.172.81.92]) by smtp.gmail.com with ESMTPSA id iy3-20020a170903130300b001b9d335223csm8845093plb.26.2023.09.27.04.04.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 04:04:05 -0700 (PDT) From: Viresh Kumar To: Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] OPP: debugfs: Fix warning with W=1 builds Date: Wed, 27 Sep 2023 16:33:56 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: <0484680a9c7bb66cf1fb583a5178e753dd763afd.1695812634.git.viresh.kumar@linaro.org> References: <0484680a9c7bb66cf1fb583a5178e753dd763afd.1695812634.git.viresh.kumar@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 27 Sep 2023 04:04:28 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778192618462313402 X-GMAIL-MSGID: 1778192618462313402 We currently get the following warning: debugfs.c: In function ‘opp_debug_create_one’: debugfs.c:63:42: warning: ‘%.1d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 2 [-Wformat-truncation=] snprintf(name, sizeof(name), "icc-path-%.1d", i); ^~~~ debugfs.c:63:32: note: directive argument in the range [0, 2147483647] snprintf(name, sizeof(name), "icc-path-%.1d", i); ^~~~~~~~~~~~~~~ debugfs.c:63:3: note: ‘snprintf’ output between 11 and 20 bytes into a destination of size 11 snprintf(name, sizeof(name), "icc-path-%.1d", i); Fix it by increasing size of the `name` array. Signed-off-by: Viresh Kumar --- drivers/opp/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/opp/debugfs.c b/drivers/opp/debugfs.c index 17543c0aa5b6..ec030b19164a 100644 --- a/drivers/opp/debugfs.c +++ b/drivers/opp/debugfs.c @@ -56,7 +56,7 @@ static void opp_debug_create_bw(struct dev_pm_opp *opp, struct dentry *pdentry) { struct dentry *d; - char name[11]; + char name[20]; int i; for (i = 0; i < opp_table->path_count; i++) {