From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 845B7C4361B for ; Sat, 12 Dec 2020 17:06:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 44C4A22AAC for ; Sat, 12 Dec 2020 17:06:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389597AbgLLRGG (ORCPT ); Sat, 12 Dec 2020 12:06:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389080AbgLLRFz (ORCPT ); Sat, 12 Dec 2020 12:05:55 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E8D1C0613CF; Sat, 12 Dec 2020 09:05:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=z3TCRxZk++lJppjCuU9kk0bzCHxvETkF/5TPfmBMnBk=; b=cWoP0VaPCasVtshx8N8Y+XYwIZ gJMcVr7MAYWbb+pXDFrmfCzedo3YvwWNG0ZgVG5C+LcZicmS6yz8x9G6JigWlqNs3kuGY2jqeuOWp kmcIdsUVS/g4zSN2pgBkfTbV2dBUX0IFLqsEbP+rEWB+PrMbCkqkWrIuPWj+snsILwUD/AL8eIeU3 L3BBRodVbrwNuf4tfmPDFchKxadx4cvKNt03ceLJswCqjT5stA0yDhnYCk2mjZW0b/pJUnkjY3Gn3 +2REFGsvtmn1n+RCEmOGOoljKCozmglVTpjCn+blTFW78qI2dCCskCuFHyDSEel2Xq0citpZETnsP F+O5cS/w==; Received: from [2601:1c0:6280:3f0::1494] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1ko8KQ-0004ub-CF; Sat, 12 Dec 2020 17:05:06 +0000 Subject: Re: [PATCH -next] platform: surface: fix non-PM_SLEEP build warnings To: Andy Shevchenko Cc: Linux Kernel Mailing List , Maximilian Luz , Hans de Goede , Platform Driver References: <20201211190335.16501-1-rdunlap@infradead.org> From: Randy Dunlap Message-ID: Date: Sat, 12 Dec 2020 09:05:01 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org On 12/12/20 5:24 AM, Andy Shevchenko wrote: > On Fri, Dec 11, 2020 at 9:20 PM Randy Dunlap wrote: >> >> Fix build warnings when CONFIG_PM_SLEEP is not enabled and these >> functions are not used: >> >> ../drivers/platform/surface/surface_gpe.c:189:12: warning: ‘surface_gpe_resume’ defined but not used [-Wunused-function] >> static int surface_gpe_resume(struct device *dev) >> ^~~~~~~~~~~~~~~~~~ >> ../drivers/platform/surface/surface_gpe.c:184:12: warning: ‘surface_gpe_suspend’ defined but not used [-Wunused-function] >> static int surface_gpe_suspend(struct device *dev) >> ^~~~~~~~~~~~~~~~~~~ > > ... > >> +#ifdef CONFIG_PM_SLEEP >> static int surface_gpe_suspend(struct device *dev) > > Perhaps __maybe_unused ? > Yes, I am aware of that option. I don't know why it would be preferred though. -- ~Randy