Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1744407pxu; Sun, 13 Dec 2020 02:01:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIF0MpDJDQ+bfKYGbytiPV+GAEUf2Ddot914arU0ltDoiJh9hNWJCdiT74CemY8jspmnuh X-Received: by 2002:a17:906:52d9:: with SMTP id w25mr17685444ejn.504.1607853704434; Sun, 13 Dec 2020 02:01:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607853704; cv=none; d=google.com; s=arc-20160816; b=H0ZwxKXgfaty8BVhm+hA944HALWvfjykm5f973bry1yLAnp/RsklI/xlKxnvvsMN1W Xkmr7vuDlsOxFb3ZKRDHwwP3DOn+PKv2t0Cz4kHnTNIUTvRByG86sqLUTwZ7Edn4xr1C Yo2GXUK+zKgyXyf1NSkMs3IQL0ahZFikicZghyr3LE2KMvSF3tZtl67J5/mg6pbZ62oz TZkCSM/lESXzCoaeFh/l9BNHD9rK+U7mE2R6nQYUQBbxYIV6q/ddaQRhI29OZiv/Cbth f8wxV993S7MJ1AVxN/DeAUdnZyWziEPKb3OPVpTbJcsqScKm667xGjpQDPvvnv65+rKf 8L+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=GLYiJ8CVCPtC2wb1C1lGxMhHOFkkPnpzN9R1KhxEacU=; b=wqWIInyxwsbnb3teOhh8p6lboIP8Eax1IdYxY7sva2jgt/PjW64P66hWEvWn6c8hVK K0qqfKrPFSyc1X+mMfdCLY76kuF8VMhO3VbebeqeWy5GyjM2Y0vhpsMXx7/0yq4O25/C E1nQBSgT+eEsFELgzfC9ouuYOrl+RL7i8YUsG1vN/ZnRRDUCocuUQUA98eh+pc2LKT1N JLDXcr6QpR3iofLndc2f+svu4KgNY1GHmlUdLf+bWUwf4zlEUPtAtjlKOJkjg075scsW NqEU0lEJWy69TBRYIzYbzXTwX7as5hWgzb+fzbSD/Zf/Vo5l2BMB8WXhRs6KLdcSt5eY /9pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uL26DPrE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o9si8444987ejr.672.2020.12.13.02.00.50; Sun, 13 Dec 2020 02:01:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uL26DPrE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391534AbgLKVBr (ORCPT + 99 others); Fri, 11 Dec 2020 16:01:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731470AbgLKVBd (ORCPT ); Fri, 11 Dec 2020 16:01:33 -0500 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 998DCC0613D3; Fri, 11 Dec 2020 13:00:52 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id k10so8630278wmi.3; Fri, 11 Dec 2020 13:00:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=GLYiJ8CVCPtC2wb1C1lGxMhHOFkkPnpzN9R1KhxEacU=; b=uL26DPrE4Bxe9zYqM2aEoQA0fSoFierTOPDW0/Xzk+mcMZ4oZUAR6x0VtwQRC7v+wn IGLoO6ndyXwHi8DImKlM7wpgDsQtZVefohJyMYG09jKh9Hc9F3jTfU1NMajqsV70zYLQ Rz36KdhffQocudgAwDQDJ9iC0T7PgXGN/QfrsicE/F7vTitxh3bM7dsSxa3N9AfNmZpu 2W3D0qIYzh1QJGCoElHik1VFXy7uO7VlFy/WkiVEjmiPFITX1mxVaPIrBnYQHM2jGDjB L6qrdk5aFsWeMTI9E/YGp50BDO/mqId6UhlbuXYkj1FaMEJtfy3tOsGk/m6BhGs+2gd1 vkzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GLYiJ8CVCPtC2wb1C1lGxMhHOFkkPnpzN9R1KhxEacU=; b=DsHMnLurWv5zJXUGYENyofWdW6eL6JdeGtlkvn5GpO0r+iYD7PEGw/oXS+zETEt6JB K48FJtk8MVouOmUFWlHs6ChokcEBwCItzngDYFzAdrnZqr7/s/G1bGuLRHXkwiNl4W2W 2WT9sTYr0S45l/HcRpHTgk3IlaLitHfb3l0vOgwIP5xZi1r3DEvz4N0DZxOBWA+5reY9 D1fJQHZbYVEIqGfCBeC0WPYk5nQjXLsFCbPGYX42OsoW5djaOJnbfj0gR74NNhphu05g Tm+T4CXItqqLF44h/m5j9a3s92+TUVBTHHaU45zqhMjBR1OCAgxf0kddebQzpHozDnbb d8Yw== X-Gm-Message-State: AOAM5312BnHmXzbEoi0qntvBLuS0fJo2IN4ubr65MrPDVhlEC5KCodpq fP4emm4sus7VHgJSQMpg+sGXO9+AEVA= X-Received: by 2002:a1c:2203:: with SMTP id i3mr15089494wmi.6.1607720450981; Fri, 11 Dec 2020 13:00:50 -0800 (PST) Received: from [192.168.2.202] (pd9e5a2a8.dip0.t-ipconnect.de. [217.229.162.168]) by smtp.gmail.com with ESMTPSA id r128sm17577305wma.5.2020.12.11.13.00.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Dec 2020 13:00:50 -0800 (PST) Subject: Re: [PATCH -next] platform: surface: fix non-PM_SLEEP build warnings To: Randy Dunlap , linux-kernel@vger.kernel.org Cc: Hans de Goede , platform-driver-x86@vger.kernel.org References: <20201211190335.16501-1-rdunlap@infradead.org> <3705938f-6f82-88ef-455b-e0f7459989e3@gmail.com> From: Maximilian Luz Message-ID: <4ed22944-c10b-221f-f7eb-52ca3e7f2d18@gmail.com> Date: Fri, 11 Dec 2020 22:00:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/11/20 9:41 PM, Randy Dunlap wrote: > On 12/11/20 12:23 PM, Maximilian Luz wrote: >> On 12/11/20 8:03 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) >>>              ^~~~~~~~~~~~~~~~~~~ >>> >>> Fixes: 274335f1c557 ("platform/surface: Add Driver to set up lid GPEs on MS Surface device") >>> Signed-off-by: Randy Dunlap >>> Cc: Maximilian Luz >>> Cc: Hans de Goede >>> Cc: platform-driver-x86@vger.kernel.org >>> --- >>>   drivers/platform/surface/surface_gpe.c |    2 ++ >>>   1 file changed, 2 insertions(+) >>> >>> --- linux-next-20201210.orig/drivers/platform/surface/surface_gpe.c >>> +++ linux-next-20201210/drivers/platform/surface/surface_gpe.c >>> @@ -181,6 +181,7 @@ static int surface_lid_enable_wakeup(str >>>       return 0; >>>   } >>>   +#ifdef CONFIG_PM_SLEEP >>>   static int surface_gpe_suspend(struct device *dev) >>>   { >>>       return surface_lid_enable_wakeup(dev, true); >>> @@ -190,6 +191,7 @@ static int surface_gpe_resume(struct dev >>>   { >>>       return surface_lid_enable_wakeup(dev, false); >>>   } >>> +#endif >>>     static SIMPLE_DEV_PM_OPS(surface_gpe_pm, surface_gpe_suspend, surface_gpe_resume); >>> >> >> Right, thanks. >> >> I assume this covers all instances of this warning in platform/surface? >> Otherwise, a "platform: surface: gpe: ..." subject would make more sense. > > It should cover all of surface/. It was an allmodconfig and then I disabled > CONFIG_PM and CONFIG_PM_SLEEP etc. Perfect, thanks! > As for prefixes, how many levels do we want to use? > (that's mostly rhetorical, although I would read answers :) Looking at platform/x86 and past commit messages, I'd prefer something like platform/surface: : This would be similar to the platform/x86 style. So two or three, depending on how you count "platform/surface". I agree that this probably tends to get a bit long, so I propose we drop the surface_ prefix on the component part to help with that. So, for example, "surface_gpe" will become "gpe". > >> As for the rest: >> >> Reviewed-by: Maximilian Luz > > thanks. > Regards, Max