From patchwork Thu Aug 20 07:34:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 11725823 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CB50514F6 for ; Thu, 20 Aug 2020 07:55:25 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A1A0F2076E for ; Thu, 20 Aug 2020 07:55:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FUfTL2nT"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=Synaptics.onmicrosoft.com header.i=@Synaptics.onmicrosoft.com header.b="IhKg3YZ1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1A0F2076E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=synaptics.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AooTho4f6Dwzxcy/ToIAeUFYqVPwWs5pbkNsnpfvNZA=; b=FUfTL2nTtbXr3iMYPLedjWZsQ vRBqaptdsKWNd94NZX6jhMrNckdXl9ieLmA7O6kQTRIDjPDe9m4ID0kCCeW97RmioB6TVcW3moZrV EBgA58zDocPrbbICsg1qGM2fBMJcu0dFYilQ0uuwNwh4OKFXWIa8Z6A7IgcZnp/65L9J9dGMqU6FM nfnqT07nVri861/OOUS9Q1G+UYe3aeAtSCAMCZBL8vqk2dIbDeJ9RVYeQIz9orPusgg2qrMTDZskW twlr0Hv486K7ZBLSU7WBHTE4sDNVaM+B3ez0hS0fkOkm+lsko6oYGnR/ySlhRpckD2jJ7iuCbD57+ NNilu4WiA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8fPm-0000XB-9x; Thu, 20 Aug 2020 07:55:14 +0000 Received: from mail-bn8nam11on2070.outbound.protection.outlook.com ([40.107.236.70] helo=NAM11-BN8-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8fPe-0000TX-T5 for linux-arm-kernel@lists.infradead.org; Thu, 20 Aug 2020 07:55:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mxuks3pFP6ERlEzCvhlPvlpkgarNBM7pmVG0hHIFBW9u50j7PVrTWsJRLufwreLrleASm/lwoGQUKEkofAWSnECymuzlJ3cI7cQI/mGQDQN2CJ/jjNUyQ+/QZvORwn3CAl9IScB0vVJUonZX+wlbtMgQjBNBxBuitpFgSMvhY42SHXGLau4+MKUdpIU1h9/57AuPsemwBLIdvPnNZ6+3vcuwYRcCgAYEvFVUYsS2JQIg2t/NAvmmDiJccyzEdZO+oJtcUW3ckINIy2t1v4ehM2RM4gRFmQo7KlVvW1aLkB7ugDvbvyGJ2SzP1GlgHLa19OQjNI/hJ3hXSU4i+HcZEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z0F+bCmqcAnRxC8KfRXIvz6WdWsumQc7DWHZHtfxOus=; b=kfS1hhXBVidDvOtnj7CrW1tap/3H1ce/AreoxxWwkadpWbIg5To3+fALA2NuZWIsZj73zWLHd/D3sou4QudAxTmwTNr6QfhCeu5VsySzbbGMb7zE9lncwLMdVpJ9h2tFsaqh41XM04hp14ZfpfPenQZ2IrAGPevrSgELUcEoZMGuQAt3/2A2xOn7tFKKcpn0d+a0O0uXOojJ7UlNUguFEAH4jq1s9QKXDbmk4+q/ktinTbrIuUoIAY1rq7uG48Wgq1RWq27GPVMUf7bvzuy1yTLtoAL2mLE9kYphk8iIjByF5vy0ZZngP7aExYJe21tDMtaE8Y7aGW8m5ahEkd+jPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synaptics.com; dmarc=pass action=none header.from=synaptics.com; dkim=pass header.d=synaptics.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector2-Synaptics-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z0F+bCmqcAnRxC8KfRXIvz6WdWsumQc7DWHZHtfxOus=; b=IhKg3YZ1G4PGsJ96Tum3KqPYGjUZsFI9Joxx4Q25H5Dnr5XRgJW1NBNHdMSK73s0TKOqFatjd/G1ToCG4NMLYd1cNPDT53nN3WIBhymaNMNxoOJZ1aebMtVsIUzyjphFJnPGFejQv8jfqRI1IhKdm+pBTvfb45g6gZsnc9UTDnY= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=synaptics.com; Received: from BN7PR03MB4547.namprd03.prod.outlook.com (2603:10b6:408:9::22) by BN7PR03MB4563.namprd03.prod.outlook.com (2603:10b6:408:36::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.16; Thu, 20 Aug 2020 07:55:04 +0000 Received: from BN7PR03MB4547.namprd03.prod.outlook.com ([fe80::3cda:7634:5802:df5f]) by BN7PR03MB4547.namprd03.prod.outlook.com ([fe80::3cda:7634:5802:df5f%7]) with mapi id 15.20.3305.024; Thu, 20 Aug 2020 07:55:04 +0000 Date: Thu, 20 Aug 2020 15:34:36 +0800 From: Jisheng Zhang To: Liam Girdwood , Mark Brown , Support Opensource , Maxime Coquelin , Alexandre Torgue , Icenowy Zheng Subject: [PATCH 04/12] regulator: fixed: Fix W=1 build warnings when CONFIG_OF=n Message-ID: <20200820153436.39088071@xhacker.debian> In-Reply-To: <20200820152926.42c48840@xhacker.debian> References: <20200820152926.42c48840@xhacker.debian> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-ClientProxiedBy: TY1PR01CA0194.jpnprd01.prod.outlook.com (2603:1096:403::24) To BN7PR03MB4547.namprd03.prod.outlook.com (2603:10b6:408:9::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from 255.255.255.255 (255.255.255.255) by TY1PR01CA0194.jpnprd01.prod.outlook.com (2603:1096:403::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.24 via Frontend Transport; Thu, 20 Aug 2020 07:55:01 +0000 X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-Originating-IP: [124.74.246.114] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 31f1421c-bf0f-4c46-e3ee-08d844de58e6 X-MS-TrafficTypeDiagnostic: BN7PR03MB4563: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:530; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S55hj0RnyNfk/t4q6QGeGpTNuP2YUyq7EPiTIyNOJZg7Ze5LUd3au2DsC2kcE+2CPYki+r0bnKCQTB5GEto8vVSmIMjTJLnDKlUM2QKXzKv/JFH2aXeOJK5jPtr6QXyEn20NZPyGtPb0Oe0A2o8/L3uJOd6YipBmWr1VWn4cMJxz/H9emfh1RWEZBeKVUiU4qcYa5JuuPFz5XQsDetBXsJafCpRBCiX4mVeHkaPpn6e+MuZnNHFQ7eTntH4eS9nh/mFa1GrIrnM9cRoaavggqc07M3xIE11SGZomSRgcNVpn3inXdEK8x/bOQAT6hvU1tp2GxUNpVmRYeVLaJRfQYq2P2YO6bJTtzoGJ+XR1t9uThu7NfoP2lTV8Da+/1l60 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN7PR03MB4547.namprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(39860400002)(396003)(346002)(136003)(376002)(1076003)(4326008)(2906002)(5660300002)(6666004)(478600001)(956004)(9686003)(83380400001)(26005)(316002)(86362001)(52116002)(8676002)(66946007)(16576012)(66556008)(6486002)(110011004)(8936002)(66476007)(110136005)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Pvicf3XeI+mnIRJBXholur0MDPEe9yuHdr58X5UpSn5rLhET3hMysg+3eK1BKQiiXNr61IEpY9EwFTEm7i4NibdxCI9aLhFpZM3Q9m/XGi6/oImteOJhAnkbprZ2Iu84WQ5RrpKqldOtk8yDwb4Sh9VFARNT+bWTmMLaIm4C17QNndTy5h28lbE/pdI0iska+mUzq+JOIg3VTAU+Cegy3g+voXUe8pLXN2zcL3xImkH4m+IlTy4xCsHmo4J/yNT2QgTYGWE5cAQ1ifndn/MLtTFMFD/EXar61K8MwvvMscX59oHeHjXtvEc3rVrXRvp1h0oBSQwu0cw+gf/thvxWzLjslbwDY+V25kY5mc4iF/sOHhSGKl8XomGwpz1u9gPEDb+bXAdR5K7yKJE8tQ4bkPwPaphkX0I7tX/6s4pXV5+WqCULiMtvT8GFlUoUktY0dlXeci4EDO+YMJdHfFUDjCjkEHsWCDq7dptoHxjT5ybhs0tQcLQr1xSmUFmLtg15O5PICwGTxAjbNO/XXFSQ3/35/MONLKl8HMu24k8bMzI+yKiiF+2q21ibn1H7+QyRKy5AqqkQCJxg4jZbvs6ZKH7YHKBSWKH72OfqlnEONyDLnH6ZjpOv3Jl/UU63ih5/JTNqvvN9CCGxZFySt1+AsQ== X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31f1421c-bf0f-4c46-e3ee-08d844de58e6 X-MS-Exchange-CrossTenant-AuthSource: BN7PR03MB4547.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Aug 2020 07:55:04.0678 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RpRNSr8GOGI1vx1omaF4z3aS0x5eZRQXmm1/1851d8oJVDPVUr2x+SEj/9r2O1jBVQV0SFi/shZGhPm3DVENHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR03MB4563 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200820_035506_981356_11166C36 X-CRM114-Status: GOOD ( 11.68 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.236.70 listed in list.dnswl.org] 1.3 RCVD_ILLEGAL_IP Received: contains illegal IP address -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.236.70 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Fix below warnings when CONFIG_OF=n: drivers/regulator/fixed.c:48:36: warning: ‘fixed_clkenable_data’ defined but not used [-Wunused-const-variable=] 48 | static const struct fixed_dev_type fixed_clkenable_data = { | ^~~~~~~~~~~~~~~~~~~~ drivers/regulator/fixed.c:44:36: warning: ‘fixed_voltage_data’ defined but not used [-Wunused-const-variable=] 44 | static const struct fixed_dev_type fixed_voltage_data = { | ^~~~~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang --- drivers/regulator/fixed.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index d54830e48b8d..2d92a471ebc1 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -41,14 +41,6 @@ struct fixed_dev_type { bool has_enable_clock; }; -static const struct fixed_dev_type fixed_voltage_data = { - .has_enable_clock = false, -}; - -static const struct fixed_dev_type fixed_clkenable_data = { - .has_enable_clock = true, -}; - static int reg_clock_enable(struct regulator_dev *rdev) { struct fixed_voltage_data *priv = rdev_get_drvdata(rdev); @@ -260,6 +252,14 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev) } #if defined(CONFIG_OF) +static const struct fixed_dev_type fixed_voltage_data = { + .has_enable_clock = false, +}; + +static const struct fixed_dev_type fixed_clkenable_data = { + .has_enable_clock = true, +}; + static const struct of_device_id fixed_of_match[] = { { .compatible = "regulator-fixed",