Received: by 10.213.65.68 with SMTP id h4csp897267imn; Wed, 28 Mar 2018 15:15:14 -0700 (PDT) X-Google-Smtp-Source: AIpwx494clSNoSDwuIe16nAuj7fc7wY3lkHMxtuiM5lOTvZIFFkzNy5CBRtakWWXMf8mapexR/Z8 X-Received: by 10.167.128.71 with SMTP id y7mr1876833pfm.12.1522275314548; Wed, 28 Mar 2018 15:15:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522275314; cv=none; d=google.com; s=arc-20160816; b=EZVNUxqKwYqPCNRYyn3C098/wlipFH2Z13mrnsaASKfHc4E+vh+A/UMsuR35WkxSh/ ZH4ipvRQbUrRkGPw6XiLefc+82yFJyE5ZPs5NwM8bjWt7ji5Lr82fESaBIP+xUZBr4SI p7J2S8I0rv9wlfZ3IMuAHxVdqv44nmJo6fjASiTBFrzRSqH6cOiF8CPZ4C/aoGv6xJHr Q3CGKuEuUfJDncvRKI62ayMKPqu9vA0i0ZRokYJbXqETHNJWZzQwKCPILhVM01sq7bCc 5Nqzx+YVUidUDmW3boY4cJUnmNW92I9RR1dGjfn+VFSwoqqnlAVYrp9FLaQ21JMKn2YQ hq6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=zXAFHGgr3HQdPQGT4lPYXpwuULDpWvjRBUM3ujnLjfI=; b=gXUUqzNlG3oDc5p0IRcHLwoq10n0aUGqdTYahBHkEBWSRrsJPwMrAEYP7u4IUxHPa3 BtFE2j8KX4K7Xauyt6/8a2JakdDQCUbOF3LnmhEeCYIBH6qyzDGkzPQ9SXuxJI017KCn +QC/8Cs1xLf78k1iGNitziPKgKJroijLaKfA7/D363rMJMvlqlnL6gRL411boB87CnrJ p9ivym7EBuXjZz5c1+q8ma3stnU5iamLbk1zFV4RBXKDcX+1ZihqTzDovhjL0vv0Wxbb vmTRvy7iqRzzBjmnDtG8IDgp22wbQe5r7pLImcNE7qYbpL7nBB1dyW1qS2jPppzxHYsT VmRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=YJp3FH+Q; 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 n1-v6si4437331pld.280.2018.03.28.15.15.00; Wed, 28 Mar 2018 15:15:14 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=YJp3FH+Q; 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 S1753675AbeC1WOG (ORCPT + 99 others); Wed, 28 Mar 2018 18:14:06 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:35579 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753098AbeC1WOE (ORCPT ); Wed, 28 Mar 2018 18:14:04 -0400 Received: by mail-qt0-f195.google.com with SMTP id s2so4314539qti.2 for ; Wed, 28 Mar 2018 15:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=zXAFHGgr3HQdPQGT4lPYXpwuULDpWvjRBUM3ujnLjfI=; b=YJp3FH+Q2ZgbHN4sRbTXg1XOb8sNVl1xVv8XsVY/xfGPTaifwAJohgpsjkug5qfXgL awWdlFvNK+t7CfVkx0yTRJPIzypd81G2L5dRcrrqnlWIMYvXC6l8nOn6s9dCDnMLXKu2 oNXWUIFbfb20kki9S8amQAPu/vic6qC0TvSkWpsTH/bet04DAVdoS6Ul3fMs+4J/YBlA K+TAaC3CHpdWRvUtMn6KbBiM/b5PRkY3McMsDeFhYAqF1DIF5YnXEqzCoWZnymnSHg1j AL1+Zoj22s861dphyuY+2s74B1HnAqRPFG7ejYptlxbAAhwlOZoSN//0WJh27Bp506j5 GLzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=zXAFHGgr3HQdPQGT4lPYXpwuULDpWvjRBUM3ujnLjfI=; b=cNfL0vyk3s8G+vS4E74zJBQMXCfoJ7Z4SI89V7f91Pjpdv4yStnFH56Uam9N920+fv 7bJUGb9z3+drjsDxOEeyIMTn6BpCrAT5Qlv2JDcf2EMZ9jLDtfFMRzp9qdY5OXMW1nWx QiO8tCvoNn77VS/IXaezvBqeZ3hcszkd74CxliPa2evsAmZL09+Nqu+IpdEhOLL5fsEg nAMpaU7iOULXrSX1s8ooB2+bpAl6p46oPZPSBhLqSPUY9bUSHsuGJY6c20w+ReREi3ST H/j1gg/5h+VpsqrHYI6sU5GO3diQTSmwLDdIqJZiS4mc5jRMQ/VMFBph+XuZnZnGaLHp ZswQ== X-Gm-Message-State: ALQs6tAW8m3kY2GXfiah6f2Ajx12l8w7XtL1c0vOLqzx53QFKSGSr+AY fznVV3zwy0P4SXh9C3PL1Y221NG0x/q8m1QkiZ4= X-Received: by 10.200.18.71 with SMTP id g7mr7829546qtj.35.1522275243859; Wed, 28 Mar 2018 15:14:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.185.25 with HTTP; Wed, 28 Mar 2018 15:14:03 -0700 (PDT) In-Reply-To: <20180328143150.GA17992@wunner.de> References: <20180328142020.3275989-1-arnd@arndb.de> <20180328143150.GA17992@wunner.de> From: Arnd Bergmann Date: Thu, 29 Mar 2018 00:14:03 +0200 X-Google-Sender-Auth: qdkeqGWe9PvdBUuDBIWo9X4-F7M Message-ID: Subject: Re: [PATCH] ALSA: hda_intel: mark PM functions as __maybe_unused To: Lukas Wunner Cc: Jaroslav Kysela , Takashi Iwai , Hans de Goede , Guneshwor Singh , Vijendar Mukunda , Libin Yang , alsa-devel@alsa-project.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 '? I've mostly stopped trying to figure out what the correct set of #ifdef for power management functions is, since I get those wrong as much as everyone else. ;-). The patch I sent has been through a few days of randconfig testing. Arnd