Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7318118rwp; Tue, 18 Jul 2023 13:26:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlEQELTj3P7j1W1haBOVFBMTT1fAmf5guLWClHXZXvKb3wt1ND8QA30D0AaS8E4yBrHKNl4J X-Received: by 2002:a05:6a21:999e:b0:12e:f6e6:882b with SMTP id ve30-20020a056a21999e00b0012ef6e6882bmr558415pzb.1.1689712018214; Tue, 18 Jul 2023 13:26:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689712018; cv=none; d=google.com; s=arc-20160816; b=qN5mfdfyMzJgF5WoL9Rb9yhdNJdTz0t4X8zNd7MfcHKI+tXZ5pAS0MCvFBrxMdheu6 tA3zoSuNxPYpyraLkdPt49G8OJ8MBcRw1Wq9psDDTzkXIE0rwP2qZKQXke90XPWrJ7IP DvMb5uOb+oUX2uJzMbDibEO/qI/Asrnqg4n8QCFQobRXfyxGMM73OOj0844goKIBaqqx 0XuqH5zxtZutCveRpJsHljcka8oORRJblKNWWoCTkKHYv1Jr2xeKfhhMwV5+yC5hk3PZ zecvbO/DM21JasckZxA7LBHim1yjqJZblgxiYjBo4H+GvuvZfxpHZ9eIxOKhnnN3mLQW Ib4w== 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=jechDanLDR/SZxQrP7tjcuGjh2n7heOpy1tZhBWgUxo=; fh=C36HREVv8O7X9svbJ15QK84+UsIliRK2Zpv7YDIs6CU=; b=fp59dYYd8hALlUqtY1u6aQ9NtxYzYKtwFAvefXnY+idhaFsYJYdBwJ+XRx8GA2dHjP NZld5jr695c5l9/hxWx46JRXul+/tfw9f4GwNEjqy4DdTfVuZFxrjBcoHy9mVH9Rbf/m rsxl1G51osb74QvZSFXgZeR84WRHlSj0YqhDdA3xG/ZJrh0V3ysoFi7Ah/qfws5qId1z Dd990uxfwnrHoc6Qrj0wja2WrJiaGHEHLL7R8hF7BRC+SXHfuRjgegZZGAB31wR0IghG sle+KVAr2efy1PfimHWJyaChDrObT34cId6gTfDp5Tq9bTKo8W7cVk/0sEJnySkdIXaJ h31w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KhMX2Ptp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r29-20020a638f5d000000b00560132689ccsi2058317pgn.349.2023.07.18.13.26.46; Tue, 18 Jul 2023 13:26:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KhMX2Ptp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230282AbjGRTjp (ORCPT + 99 others); Tue, 18 Jul 2023 15:39:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230201AbjGRTjo (ORCPT ); Tue, 18 Jul 2023 15:39:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FCBE1993 for ; Tue, 18 Jul 2023 12:39:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9A36960B5C for ; Tue, 18 Jul 2023 19:39:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B585AC433C8; Tue, 18 Jul 2023 19:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689709183; bh=OI+6NAgh7fvRkW4GOVEolrLWGzju1tGac3iQGqIIz7Q=; h=From:To:Cc:Subject:Date:From; b=KhMX2Ptpq5Ss99M/8yx6BhTUwqIjkES2nocQw3xhJNpXm5Zcc3mvCiIY00aPcaxMY ETLnuW8er3b9pKI0dw29LSdwldXUhz8Zw6JiF/VdgEg9+UE5ruLGrN6uF/KloieXZm yRwKP55z+YJCsbvZfP3pCox7TAXv0Qx3pLq9T2uKKgOO2ZA1sqebqFiSr5Qt/td1QY TqEMaRazrkDtgKFaDO19UAmIMDhgISKrYFT9LbG2CdsTIS3CkdbFQu7T3r+w4sslA5 YTXza9gNduntAZwa5AaIoxDDygwsUsLfUAWWoqxk+ImYl/S5ANdqX1trY7QHPRcR/5 3yKpentG//Dkw== From: Arnd Bergmann To: Liam Girdwood , Mark Brown , Okan Sahin Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH] regulator: max77857: mark more functions static Date: Tue, 18 Jul 2023 21:39:31 +0200 Message-Id: <20230718193938.3593118-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Arnd Bergmann A few functions in the new driver are global but only used in this file: drivers/regulator/max77857-regulator.c:209:5: error: no previous prototype for 'max77859_get_voltage_sel' [-Werror=missing-prototypes] drivers/regulator/max77857-regulator.c:221:5: error: no previous prototype for 'max77859_set_current_limit' [-Werror=missing-prototypes] drivers/regulator/max77857-regulator.c:235:5: error: no previous prototype for 'max77859_get_current_limit' [-Werror=missing-prototypes] Mark them static, which produces potentially better code and avoids the warning. Fixes: af71cccadeced ("regulator: max77857: Add ADI MAX77857/59/MAX77831 Regulator Support") Signed-off-by: Arnd Bergmann --- drivers/regulator/max77857-regulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/max77857-regulator.c b/drivers/regulator/max77857-regulator.c index c5482ffd606ec..e1150a9a11f26 100644 --- a/drivers/regulator/max77857-regulator.c +++ b/drivers/regulator/max77857-regulator.c @@ -206,7 +206,7 @@ static int max77859_set_voltage_sel(struct regulator_dev *rdev, MAX77859_CONT3_DVS_START); } -int max77859_get_voltage_sel(struct regulator_dev *rdev) +static int max77859_get_voltage_sel(struct regulator_dev *rdev) { __be16 reg; int ret; @@ -218,7 +218,7 @@ int max77859_get_voltage_sel(struct regulator_dev *rdev) return FIELD_GET(MAX77859_VOLTAGE_SEL_MASK, __be16_to_cpu(reg)); } -int max77859_set_current_limit(struct regulator_dev *rdev, int min_uA, int max_uA) +static int max77859_set_current_limit(struct regulator_dev *rdev, int min_uA, int max_uA) { u32 selector; @@ -232,7 +232,7 @@ int max77859_set_current_limit(struct regulator_dev *rdev, int min_uA, int max_u return regmap_write(rdev->regmap, MAX77859_REG_CONT5, selector); } -int max77859_get_current_limit(struct regulator_dev *rdev) +static int max77859_get_current_limit(struct regulator_dev *rdev) { u32 selector; int ret; -- 2.39.2