Received: by 10.213.65.68 with SMTP id h4csp499827imn; Wed, 28 Mar 2018 07:33:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx49JZoFrq4iHHNeewQxiFNWyanT7bC5VczwEgoMofGzqRvdObKsf6JLB+yWo3QyBis6xFMk9 X-Received: by 2002:a17:902:760e:: with SMTP id k14-v6mr4016478pll.292.1522247609582; Wed, 28 Mar 2018 07:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522247609; cv=none; d=google.com; s=arc-20160816; b=xaBXpX7+Tngx2Ebh0xLAYK3EEtsDc8k3s3+joJWTIy4UWTACMqiL6WkxdRKJ+8YFqH TFOTZGqNHFVZtFC1d7Nz64sjx6wiSX5srFyB/3rkbnBLVwo41VfF3rl1xhcDFKxVhn2Q VgAzxWZo1xFg31m87YyT2qYw4rJk4C88L+upUETOlg7qAknvF3lwfNFyKhztifXYEaeV YXYEIWbeQCtF86DsPj1pDGBQhOVM91nRpHEqtk4mOYooLImF9PpNwHCru9rTFWK0XZyG ajUrL3Eug5OXZ2SYos+REkvLtzoeas618gj/YjnG5EsbumWFtuF141vE6wf4q84MzjNO NBTw== 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=xVOA0M9IcmD60FNnPB35liZBMR2O5ZR2VBX5FZzu9+0=; b=G2OSkVOokV8+ZgLRS6J/18o0PtQd9b+/9BUBGdHlqZp6SqhA3L5O0snyAU4BUarjU1 fYv8mYWtTWBvW3hDkg8x1vAIM+ITNkHsC3zyJqb+Y+Kde3h9ZnRFIAsWXF5OIwebQE13 uLXd+VlTEpt+v22xSPZ/DhSOPUhdy71tFFtoZih5vULTvJ50Jr9wgjpdwSu7T8O4JVq7 /dsmAGEA/CoWTbopzUclfhJHVwPN+vi+HSgIbG1eIlAXk4j2V5lF6JMau56Do8JaxvdC aSJgVkoBUa3J0MDwq/OWE3neJb7Fns/7yiWUA7CLhXLmeSNL9thrbIgAPxpTEZOmw5e0 AYTQ== 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 l8si2533050pgr.187.2018.03.28.07.33.14; Wed, 28 Mar 2018 07:33:29 -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 S1753815AbeC1Obx (ORCPT + 99 others); Wed, 28 Mar 2018 10:31:53 -0400 Received: from bmailout1.hostsharing.net ([83.223.95.100]:34071 "EHLO bmailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753772AbeC1Obw (ORCPT ); Wed, 28 Mar 2018 10:31:52 -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 bmailout1.hostsharing.net (Postfix) with ESMTPS id 90E0430002245; Wed, 28 Mar 2018 16:31:50 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 5B26941858; Wed, 28 Mar 2018 16:31:50 +0200 (CEST) Date: Wed, 28 Mar 2018 16:31:50 +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@vger.kernel.org Subject: Re: [PATCH] ALSA: hda_intel: mark PM functions as __maybe_unused Message-ID: <20180328143150.GA17992@wunner.de> References: <20180328142020.3275989-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180328142020.3275989-1-arnd@arndb.de> 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 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? Thanks for the report, Lukas