From patchwork Thu Mar 1 15:27:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 130284 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp2952468edc; Thu, 1 Mar 2018 07:38:35 -0800 (PST) X-Google-Smtp-Source: AG47ELv+6rBDmgphWm6F2UFIlh1JPA+IjrcMQ469Wpvd+4JlNMAVrpiNpKoJsX80ZPv147Ei1dCO X-Received: by 10.99.171.70 with SMTP id k6mr1904760pgp.355.1519918715546; Thu, 01 Mar 2018 07:38:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519918715; cv=none; d=google.com; s=arc-20160816; b=QXH8Qp+Hab0HxRv/F9AEfRULv6GiVYXQwTDTYwAOA5ZH4wU7TO1Yvv7c8WYCkCa95H 3T8WBS4ueUuV/Ru53BelJFfFXX4tPVNGbIxwaWS6lPpX5Vh2ntYVBMvep28LLMHfldz/ v9Xr163hu2zaU6BJgvfu6735plD+n2+xvu7RTAAf4gWy/oH90y2p7BKqI0RQdmYXUK/X 1iIEWdUb07vL9Dmw7ZViDwDEl8+9k1VNV0EKYZPPNp9SnTV726cw9AU2L6CM7lLF9Uov wsh+YoCzmJJFJPxlbhE2jGMgcWeBVcqZ/1TAIaobarDiG2wf47j6pr8qc6m8xv/85q8F zoTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=NIxnHwzziGNL+r2Y6Aa1fb9sLpzyEq2h7HXYpOPhH5M=; b=vnOVmLOBeMj2FQKSeH5s5Uml0Eh1mfsgYErFu/HhsGTUyHZ0FGfYp7X/9VcFBJ5uVP DiIJXs0eHunC6Cmj3nz2DbWDqSJW7o5rL2jF6ZUuy1JR+OS0Lt2O9ORnTe3yztcnN4Qz 2qXoP/lvo4wiLlRJ5E98nom5ikigNCWSrCutZPHCQgJgFScSiGZmqTL3L/7swJnpshI+ n/dY6KDiKAFqNLTvrEdeRaYaLV5nKmVlWiZUcyQ9mxXtR5yoK+BSCD9JvgUn2i6Xr45a k48lyYHJUTbWBywjPYeOyHp+arTLBA3XDUM8M/Nt43Y0brnivxApf4/3BOpr/hkDIE9b SIcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=M4TPqSuS; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b15si2586092pgs.318.2018.03.01.07.38.35; Thu, 01 Mar 2018 07:38:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=M4TPqSuS; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032563AbeCAPid (ORCPT + 10 others); Thu, 1 Mar 2018 10:38:33 -0500 Received: from mail-bn3nam01on0100.outbound.protection.outlook.com ([104.47.33.100]:63808 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1032552AbeCAPia (ORCPT ); Thu, 1 Mar 2018 10:38:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=NIxnHwzziGNL+r2Y6Aa1fb9sLpzyEq2h7HXYpOPhH5M=; b=M4TPqSuSSINeOx0zUj+1MzebwKIQ1g+hnqnBnorHmP623+F+wsDRZGjB0ibdk2TSsVzILENwmHNt3o70/ULADsZQ14O6Q4CezgyNXh3scdZ/CEwE9foShIHz63obDH/rL9BrAeRRV9t/T3Nrbeo1ui6xsnE5TBzva0UOR/UUsuw= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0902.namprd21.prod.outlook.com (52.132.132.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.2; Thu, 1 Mar 2018 15:38:28 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0567.006; Thu, 1 Mar 2018 15:38:28 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Arnd Bergmann , Tomi Valkeinen , Sasha Levin Subject: [added to the 4.1 stable tree] fbdev: auo_k190x: avoid unused function warnings Thread-Topic: [added to the 4.1 stable tree] fbdev: auo_k190x: avoid unused function warnings Thread-Index: AQHTsXHNK3WBTND/MkyCI5QLE0SlIA== Date: Thu, 1 Mar 2018 15:27:25 +0000 Message-ID: <20180301152116.1486-462-alexander.levin@microsoft.com> References: <20180301152116.1486-1-alexander.levin@microsoft.com> In-Reply-To: <20180301152116.1486-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB0902; 7:w9G/FjUhGEYHAr9GF7R4uZPSv2ceD1NQAN29czqQtpoTtZeKa6HTBzkDOFYpz445r8KtPvX7oZtzT3yyGGe58+yMaYQEkG7fxnDry1u4BwvNk4nRDbGlQEPXHsh7B6brf28FyzP9v7Zpi5NbDzoo/0JZIcO9pX9NrAU+qypXqX364LPcZHKhkKgWUefLfL5J1GAHqfgOpNGh4mzC5l/W1BzSiXXiyd1t3oZSv/TOqQM48ixP/7HeJ1s7mY4fqHYp x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 2a401ff4-6fd3-4c96-bf66-08d57f8a7aba x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020); SRVR:DM5PR2101MB0902; x-ms-traffictypediagnostic: DM5PR2101MB0902: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(31051911155226)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(3231220)(944501229)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:DM5PR2101MB0902; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB0902; x-forefront-prvs: 05986C03E0 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(366004)(376002)(39380400002)(39860400002)(346002)(199004)(189003)(52314003)(6116002)(72206003)(1076002)(3846002)(25786009)(2900100001)(36756003)(14454004)(316002)(3660700001)(6666003)(54906003)(110136005)(2950100002)(305945005)(7736002)(99286004)(5250100002)(86612001)(10090500001)(107886003)(66066001)(106356001)(2501003)(6512007)(6486002)(97736004)(6436002)(22452003)(68736007)(81166006)(8676002)(81156014)(53936002)(186003)(26005)(105586002)(3280700002)(8936002)(76176011)(478600001)(4326008)(10290500003)(575784001)(86362001)(5660300001)(2906002)(6506007)(102836004)(59450400001)(6346003)(22906009); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0902; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: rc6DH/24AgSjRYt/d3paZpOrtZcX69ltaR8KTT1pB4gnoZ2sVu2eZV7vTgTa5cf0cAmgrgNy8qttU2PrgloK0mBASOuss8y2NaPVKTgoptsklY4wCL7XOZK6ZE2JlX1BdvRjxjX7P3C8g+uCGG6lA68GgUm3FlbvsbcdM2J4rNE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2a401ff4-6fd3-4c96-bf66-08d57f8a7aba X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2018 15:27:25.6890 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0902 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann This patch has been added to the 4.1 stable tree. If you have any objections, please let us know. -- 2.14.1 =============== [ Upstream commit a8a31afad5ffa1c7de0cef1c4bc383b50f426bf8 ] The auo_k190x framebuffer driver encloses the power-management functions in #ifdef CONFIG_PM, but the auok190x_suspend/resume functions are only really used when CONFIG_PM_SLEEP is also set, as a frequent gcc warning shows: drivers/video/fbdev/auo_k190x.c:859:12: warning: 'auok190x_suspend' defined but not used drivers/video/fbdev/auo_k190x.c:899:12: warning: 'auok190x_resume' defined but not used This changes the driver to remove the #ifdef and instead mark the functions as __maybe_unused, which is a nicer anyway, as it provides build testing for all the code in all configurations and is harder to get wrong. Signed-off-by: Arnd Bergmann Signed-off-by: Tomi Valkeinen Signed-off-by: Sasha Levin --- drivers/video/fbdev/auo_k190x.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/video/fbdev/auo_k190x.c b/drivers/video/fbdev/auo_k190x.c index 8d2499d1cafb..9580374667ba 100644 --- a/drivers/video/fbdev/auo_k190x.c +++ b/drivers/video/fbdev/auo_k190x.c @@ -773,9 +773,7 @@ static void auok190x_recover(struct auok190xfb_par *par) /* * Power-management */ - -#ifdef CONFIG_PM -static int auok190x_runtime_suspend(struct device *dev) +static int __maybe_unused auok190x_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct fb_info *info = platform_get_drvdata(pdev); @@ -822,7 +820,7 @@ static int auok190x_runtime_suspend(struct device *dev) return 0; } -static int auok190x_runtime_resume(struct device *dev) +static int __maybe_unused auok190x_runtime_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct fb_info *info = platform_get_drvdata(pdev); @@ -856,7 +854,7 @@ static int auok190x_runtime_resume(struct device *dev) return 0; } -static int auok190x_suspend(struct device *dev) +static int __maybe_unused auok190x_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct fb_info *info = platform_get_drvdata(pdev); @@ -896,7 +894,7 @@ static int auok190x_suspend(struct device *dev) return 0; } -static int auok190x_resume(struct device *dev) +static int __maybe_unused auok190x_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct fb_info *info = platform_get_drvdata(pdev); @@ -933,7 +931,6 @@ static int auok190x_resume(struct device *dev) return 0; } -#endif const struct dev_pm_ops auok190x_pm = { SET_RUNTIME_PM_OPS(auok190x_runtime_suspend, auok190x_runtime_resume,