Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp303754pxx; Thu, 29 Oct 2020 03:06:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0FMFnQJmpvCv3jF2UzPMnP1kv/upqWDb/NE+mKqPqU0GUyJNypQ4dxDG0VIIe0JxSs7/1 X-Received: by 2002:a05:6402:1482:: with SMTP id e2mr3273563edv.36.1603965988527; Thu, 29 Oct 2020 03:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603965988; cv=none; d=google.com; s=arc-20160816; b=CjerBzn7SueHhHx1yLQ3IVmeXTOt1lSpWGfXHgD4bajbxO7TBwr6cbk9S7er+Ox1WG wy5WvCu+1mCGwqIZycG3cZjiTBZOoIJ4d0eTMWjdLm8RwlIsJFMPpOVD6Um6G39uj5Yx gzgKRFC1rbm+K4rK4vA17dbSav4WZ5HOpCfyTbjMbZgHcnqe9mspg6K8GxPPDss6jDDl norQ7ofikQpqcV7+mb8qiYWBZQp2MhT+rl/K8hxvIOeyVx/KNaDjZhttOyyN1ffXg0si kNlryOnhva+jL3Z8sSO+GhfTiKk6KBIA99Td4vDES8RBFG+jC6FoQl7PaB+S6376NXf0 mv4w== 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=4Wsea6lI7KZlbuttRrb54ASLPe+z2GQfiPXTwSVGoos=; b=rEUl2NkZpEBkEiPLYghfylaZ/Qvk5rGan8PEEHHOP8pNE1Fa0izvB+xbop8OS5kpZ3 nQ0N6dkIbhQFRYCZqfigXvKbv3w2gXkaeDwIfX1zCsKcg9rBMddLzgsGphzs5BlgO9/+ dCRSpzOW7E/iR9dDqCz348nrUMCIWVHRWsswY5hRDhW77MgyDwCi1gnoWee69DkwFlxe ksiLkgaUYjAUrYXHS9HYgZBZhzEC0ncCWd8YWj3vQwLYg/4UHbNsNADD98tTrN8b7GmU d8bMUHRvJbWPDos69p2iGRaXqYB8oIUZMYl/Oiu6qxb/UhFrW/nVZyDNGFY0y2TmWFDI TD1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="K6/rsIQ8"; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l12si1562957edw.449.2020.10.29.03.06.05; Thu, 29 Oct 2020 03:06:28 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b="K6/rsIQ8"; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725848AbgJ2KEn (ORCPT + 99 others); Thu, 29 Oct 2020 06:04:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:57827 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbgJ2KEn (ORCPT ); Thu, 29 Oct 2020 06:04:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603965881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4Wsea6lI7KZlbuttRrb54ASLPe+z2GQfiPXTwSVGoos=; b=K6/rsIQ8uLJz7oey68fSHdrDgqnT+H13svv2rmaGk3N3myxbV/V8C6b2DtvZ4wPPnXpjEM YeYF4Fo/empy8j5KYekave1pVmBuLzqQyrVOymJwuGOFsCOL4oz0UiyGQbZyDfYH6WsivD JREgiY5gIgDomQBLnkVv14PZtc3yrQc= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-287-uCgZaxw5OeKDI3hS_nZacw-1; Thu, 29 Oct 2020 06:04:39 -0400 X-MC-Unique: uCgZaxw5OeKDI3hS_nZacw-1 Received: by mail-ed1-f71.google.com with SMTP id dc23so966557edb.13 for ; Thu, 29 Oct 2020 03:04:39 -0700 (PDT) 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=4Wsea6lI7KZlbuttRrb54ASLPe+z2GQfiPXTwSVGoos=; b=BgqF5omQ9FLsPPfIi4P0c2k8USbNM5spyjQh1Hw7RAkeIBg/RMC8Xsmh9QRzX6dor9 9xwjOSozi5Ty39csDVGGmTy9ICZ5h03DzowyHA3veqng3/rfFd3I41fVfK9J8HnaVKPf SOOVvch0xswoOZfJnhoOOYv470bWG7Ag1pRMbN+nLrsRL5lzJ/isnUfKPydXKtS0ct9q uXQD4u1U85BEj6ZHeCUpbMswhlq3fbUoLq5e0npXf5cJDm5j+CwmwSDSuY5RczTDGxy2 ov6JBRNjMSBanxlujmRL/YAonLluh72lYmtP14oXSfZFbXWAunsxES48AsRRxSR6duKW /9fQ== X-Gm-Message-State: AOAM533f36f9kTQuny1x1YAQht+qOq5SkkVJlaf3IHanllGmGMGxLMJ4 M3w2+ysnqOgPWpZdxk6F+HIAWvIZe8GBcovfQU6nd3Q0t5jRRCAQG0d5XjLnKW4FG26TgNuJU6C D7PEhSvNiGjTIs2PP13yb4xhi X-Received: by 2002:a17:906:3799:: with SMTP id n25mr3179389ejc.6.1603965878211; Thu, 29 Oct 2020 03:04:38 -0700 (PDT) X-Received: by 2002:a17:906:3799:: with SMTP id n25mr3179375ejc.6.1603965878044; Thu, 29 Oct 2020 03:04:38 -0700 (PDT) Received: from x1.localdomain (2001-1c00-0c0c-fe00-6c10-fbf3-14c4-884c.cable.dynamic.v6.ziggo.nl. [2001:1c00:c0c:fe00:6c10:fbf3:14c4:884c]) by smtp.gmail.com with ESMTPSA id q19sm1218091ejz.90.2020.10.29.03.04.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Oct 2020 03:04:37 -0700 (PDT) Subject: Re: [PATCH] power: supply: olpc_battery: remove unnecessary CONFIG_PM_SLEEP To: Coiby Xu , Ingo Molnar , Darren Hart , Borislav Petkov , Thomas Gleixner Cc: Andy Shevchenko , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , "open list:X86 PLATFORM DRIVERS - ARCH" , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" References: <20201029074100.225806-1-coiby.xu@gmail.com> From: Hans de Goede Message-ID: <5350ef53-cf70-c4b6-cdf8-5738e9d4b10a@redhat.com> Date: Thu, 29 Oct 2020 11:04:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201029074100.225806-1-coiby.xu@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 10/29/20 8:41 AM, Coiby Xu wrote: > SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG. No it does not, when CONFIG_PM_SLEEP is not set then the SET_SYSTEM_SLEEP_PM_OPS macro which SIMPLE_DEV_PM_OPS uses is a no-op, so nothing will reference xo15_sci_resume leading to a compiler warning when CONFIG_PM_SLEEP is not set. You could drop the ifdef and add __maybe_unused to the definition of xo15_sci_resume, but that feels like needless churn, best to just keep this as is IMHO. Also s/CONFIG_PM_CONFIG/CONFIG_PM_SLEEP/ in the commit message. Regards, Hans > > Signed-off-by: Coiby Xu > --- > arch/x86/platform/olpc/olpc-xo15-sci.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/x86/platform/olpc/olpc-xo15-sci.c b/arch/x86/platform/olpc/olpc-xo15-sci.c > index 85f4638764d6..716eefd735a4 100644 > --- a/arch/x86/platform/olpc/olpc-xo15-sci.c > +++ b/arch/x86/platform/olpc/olpc-xo15-sci.c > @@ -192,7 +192,6 @@ static int xo15_sci_remove(struct acpi_device *device) > return 0; > } > > -#ifdef CONFIG_PM_SLEEP > static int xo15_sci_resume(struct device *dev) > { > /* Enable all EC events */ > @@ -204,7 +203,6 @@ static int xo15_sci_resume(struct device *dev) > > return 0; > } > -#endif > > static SIMPLE_DEV_PM_OPS(xo15_sci_pm, NULL, xo15_sci_resume); > >