Received: by 10.213.65.68 with SMTP id h4csp1443937imn; Thu, 29 Mar 2018 05:02:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx49vCW+W8h6rbr83WLlSiqyBuYFqcdou36xdz9GrdjzDc7ke1J6tNgkQU9VDHvTr1vrh9j0R X-Received: by 10.167.129.136 with SMTP id g8mr6160899pfi.19.1522324940019; Thu, 29 Mar 2018 05:02:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522324939; cv=none; d=google.com; s=arc-20160816; b=RLrKzB2cAYe7AhQQhHl9p+2VvTp6pjFy/R+uqCiNyWxgOrJpYLX2i3NuTY08yoHP0O flpLaDMCITT4yyQGnzCuLZfSkVvFHLjCRErjJ0j+jXtb3gZrBDXm3U9PJrVQxxZ0onqA znMSh2s6n4vxE+3aFDCLMjxRySFBK9IYEiEZJngkNTbMgSZiKoNyZHmby7qNWOkFtrok MakrUpsPfj/TE1gl1Fn9+K8FUYuau5WiOmSGCN50zXDJNsWGAhDVNOjOHQY9lukgJfkF 3Kq/zAvV+TA2OTX/fZOwG6txRjwOANVlhmhmoFtt4dS1X4gsm8V184lJtuZHMikcYX4j Cxjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=Foid1YY7rVSLkV73ONMa12DOcaQBgIPnfs8TPj4Agfg=; b=U6t6WKILIZnsfH0ppfm6gNFYf0R93c6zq9mlhugc0ghcqqWBob8syX+f+nEKxGQyvS 8euXnz/lfhneENRpnb/d3fpN20xMLNpEU8O8hYeiLidVpdNhLircjml6PbvWs8CSUYp0 2fB/a8GuFLiHpDTGr7GQB5cfFxjgXIzcT8Ce6RGnPqS9+p+2Avw6Os1I3u7sel8TFz/F rkeJ2WDauAR/hTFDiPz6n1ppaEy8UY7okSRXnuu7w8igTEAJ7/BKNqnGZh5UbB107o9U z8foYcLAiM3Xt1NOHygH6vWhIp6KymEDUO2m6sNLT2g8fqO25k1Tc06lEV2j9tgBs+2A 8pAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e2si3887133pgs.556.2018.03.29.05.02.02; Thu, 29 Mar 2018 05:02:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753287AbeC2L7m (ORCPT + 99 others); Thu, 29 Mar 2018 07:59:42 -0400 Received: from bmailout3.hostsharing.net ([176.9.242.62]:35651 "EHLO bmailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751211AbeC2L7h (ORCPT ); Thu, 29 Mar 2018 07:59:37 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 717FF100FC2AD; Thu, 29 Mar 2018 13:59:35 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 03F3CFCA2; Thu, 29 Mar 2018 13:59:34 +0200 (CEST) Date: Thu, 29 Mar 2018 13:59:34 +0200 From: Lukas Wunner To: Arnd Bergmann Cc: Jaroslav Kysela , Takashi Iwai , Hans de Goede , Guneshwor Singh , Vijendar Mukunda , Libin Yang , alsa-devel@alsa-project.org, Linux Kernel Mailing List Subject: Re: [PATCH] ALSA: hda_intel: mark PM functions as __maybe_unused Message-ID: <20180329115934.GA22529@wunner.de> References: <20180328142020.3275989-1-arnd@arndb.de> <20180328143150.GA17992@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 29, 2018 at 12:14:03AM +0200, Arnd Bergmann wrote: > On Wed, Mar 28, 2018 at 4:31 PM, Lukas Wunner wrote: > > On Wed, Mar 28, 2018 at 04:19:29PM +0200, Arnd Bergmann wrote: > >> Two callsites of azx_suspend/azx_resume were removed, leaving these > >> functions only called from the optional SET_SYSTEM_SLEEP_PM_OPS() > >> and causing a warning without CONFIG_PM_SLEEP: > >> > >> sound/pci/hda/hda_intel.c:1029:12: error: 'azx_resume' defined but not used [-Werror=unused-function] > >> static int azx_resume(struct device *dev) > >> ^~~~~~~~~~ > >> sound/pci/hda/hda_intel.c:994:12: error: 'azx_suspend' defined but not used [-Werror=unused-function] > >> static int azx_suspend(struct device *dev) > >> ^~~~~~~~~~~ > >> > >> Keeping track of the correct #ifdef checks is hard, so this removes > >> all the #ifdefs for power management in this file and instead uses > >> __maybe_unused annotations that let the compiler do the job right > >> by itself. > > > > Ugh, this isn't as hard as it may seem, just replace > > > > #if defined(CONFIG_PM_SLEEP) || defined(SUPPORT_VGA_SWITCHEROO) > > > > with > > > > #if defined(CONFIG_PM_SLEEP) > > > > That way it's just a simple one line change which is less intrusive. > > > > Care to respin like this? > > I won't be able to test that properly before the merge window. If you > are sure that works, maybe you can send that patch and just mark > it as 'Reported-by: Arnd Bergmann '? Okay, I've just sent out the patch. Could somebody ack this? I'll then be able to push it to drm-misc-next-fixes before the merge window opens. From that point on the issue will be gone in linux-next. The drm pull for 4.17 has already been sent out by Dave Airlie tonight, but he's indicated that he'll send another pull with fixes during the second half of the merge window. Once that lands, the issue will be fixed in Linus' tree as well. I've verified that with this patch, the build compiles cleanly using the drm-misc defconfigs for x86 and arm, and I've also verified that the compiler warning is present without the patch, and gone with the patch. Thanks again for the report. Lukas