From patchwork Tue Jul 18 19:39:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 122211 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1978197vqt; Tue, 18 Jul 2023 13:02:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlFLGS1onOVuW2549folu1QWez7SYG/HXg4aUWSfgx+ht865PUWrNIQEkPmOuxfapfvPbOut X-Received: by 2002:a5e:df01:0:b0:787:167e:f796 with SMTP id f1-20020a5edf01000000b00787167ef796mr480725ioq.15.1689710529802; Tue, 18 Jul 2023 13:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689710529; cv=none; d=google.com; s=arc-20160816; b=dqAX0tytltXhAOoqovAmwhemT3ysm9MlTE9LNF+58F2SKfpEhrnW7Hql5ieM65bsVS A3BG9Ae3rCfAYsZlMeww30aneKOQ6GU8fNM36+r8ELq8oqshuC+Wb7hkg4yjLK8jKX/f MziT6l41GDGjeBe4iPt581MULtu7WYucO3pFruP4iHLWerNqmybkRhPhhMKxUR4JMM3s BBPq92yDeUykt2vD6nKmYicDFGvBiloYib2IJis8E+Mu39+MyOwF7c2E2Cw3El28Asac vCfQuber3/Y3XcdCJa1jyRJHbJFHJLBw02jofPrXkc/ZA7cj39UnPN8G3EOKwtQHir6T EPJg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w32-20020a634920000000b0055c89e686a9si2034222pga.10.2023.07.18.13.01.54; Tue, 18 Jul 2023 13:02:09 -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 S230286AbjGRTjp (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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771789908489840388 X-GMAIL-MSGID: 1771789908489840388 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;