From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6057CC433EF for ; Sat, 30 Apr 2022 19:33:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244485AbiD3Tgr (ORCPT ); Sat, 30 Apr 2022 15:36:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238997AbiD3Tgp (ORCPT ); Sat, 30 Apr 2022 15:36:45 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3B8949F86 for ; Sat, 30 Apr 2022 12:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=39GrQWmkZ+YjAD7XxF6O6MKjllRIm9u5hW3pNItTxOA=; b=G53zhjoxT+zmssO/muK3gwagRT vCyYcvUkkwwYNPE6LkrDNpqlwrv8aBTl12r6bA+YymCqawfWmO61/lYk2xVRNsrK8da8VynnDKpm1 cKTJ1Cai//W/daBoEO/YspjstwTJ//y48alWvk492qtualg/T7ZP1IzyTBwcgRorLm7ev/JOpFMDm G8mFr/NP11n6X15prYk7OOL2xWJEqNHJWDQQdFktRPz989INgDeSCkfYFS1oNff5rqjve6BV8xcrj bV1VNbx5rJAjfkZ+ERALjFi9sYCdsG+UjLLpS0Z5/2jC9dUoJvbpaUBFus5CgiLIOJgSXAcXnYacC loiLeI4g==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nksqG-00F0XW-GA; Sat, 30 Apr 2022 19:33:20 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , kernel test robot , Takashi Iwai , Jaroslav Kysela , alsa-devel@alsa-project.org Subject: [PATCH] ALSA: hda - fix unused Realtek function when PM is not enabled Date: Sat, 30 Apr 2022 12:33:18 -0700 Message-Id: <20220430193318.29024-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_PM is not enabled, alc_shutup() is not needed, so move it inside the #ifdef CONFIG_PM guard. Also drop some contiguous #endif / #ifdef CONFIG_PM for simplicity. Fixes this build warning: sound/pci/hda/patch_realtek.c:886:20: warning: unused function 'alc_shutup' Fixes: 08c189f2c552 ("ALSA: hda - Use generic parser codes for Realtek driver") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Takashi Iwai Cc: Jaroslav Kysela Cc: alsa-devel@alsa-project.org --- sound/pci/hda/patch_realtek.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -937,6 +937,9 @@ static int alc_init(struct hda_codec *co return 0; } +#define alc_free snd_hda_gen_free + +#ifdef CONFIG_PM static inline void alc_shutup(struct hda_codec *codec) { struct alc_spec *spec = codec->spec; @@ -950,9 +953,6 @@ static inline void alc_shutup(struct hda alc_shutup_pins(codec); } -#define alc_free snd_hda_gen_free - -#ifdef CONFIG_PM static void alc_power_eapd(struct hda_codec *codec) { alc_auto_setup_eapd(codec, false); @@ -966,9 +966,7 @@ static int alc_suspend(struct hda_codec spec->power_hook(codec); return 0; } -#endif -#ifdef CONFIG_PM static int alc_resume(struct hda_codec *codec) { struct alc_spec *spec = codec->spec; From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5F88AC433F5 for ; Sat, 30 Apr 2022 19:34:31 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D875AF3; Sat, 30 Apr 2022 21:33:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D875AF3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1651347269; bh=23AP/G/AlhYtIydcLH5ennjXVKNhVLa4O+1GrfJ3Gzw=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=DY/U/xtTeQyvFKZjAlHYIRIYcKSCS9OsaZey2n/rNEVHHcbtVAOfgoe1m4XFZEofO 3ak585g5+exa7MUdu7R1xvz2Mhn+jFVJdMS09dVImWfVZcOepRc/Z7xe/gMWWXsuUy Vq7Ifx2hNDa0wgj2fiieWpGavlvYmK1TdfYqeVoA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 710BBF800E9; Sat, 30 Apr 2022 21:33:39 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 50411F8012A; Sat, 30 Apr 2022 21:33:36 +0200 (CEST) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CEEB6F800E9 for ; Sat, 30 Apr 2022 21:33:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CEEB6F800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="G53zhjox" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=39GrQWmkZ+YjAD7XxF6O6MKjllRIm9u5hW3pNItTxOA=; b=G53zhjoxT+zmssO/muK3gwagRT vCyYcvUkkwwYNPE6LkrDNpqlwrv8aBTl12r6bA+YymCqawfWmO61/lYk2xVRNsrK8da8VynnDKpm1 cKTJ1Cai//W/daBoEO/YspjstwTJ//y48alWvk492qtualg/T7ZP1IzyTBwcgRorLm7ev/JOpFMDm G8mFr/NP11n6X15prYk7OOL2xWJEqNHJWDQQdFktRPz989INgDeSCkfYFS1oNff5rqjve6BV8xcrj bV1VNbx5rJAjfkZ+ERALjFi9sYCdsG+UjLLpS0Z5/2jC9dUoJvbpaUBFus5CgiLIOJgSXAcXnYacC loiLeI4g==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nksqG-00F0XW-GA; Sat, 30 Apr 2022 19:33:20 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Subject: [PATCH] ALSA: hda - fix unused Realtek function when PM is not enabled Date: Sat, 30 Apr 2022 12:33:18 -0700 Message-Id: <20220430193318.29024-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Takashi Iwai , alsa-devel@alsa-project.org, Randy Dunlap , kernel test robot X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" When CONFIG_PM is not enabled, alc_shutup() is not needed, so move it inside the #ifdef CONFIG_PM guard. Also drop some contiguous #endif / #ifdef CONFIG_PM for simplicity. Fixes this build warning: sound/pci/hda/patch_realtek.c:886:20: warning: unused function 'alc_shutup' Fixes: 08c189f2c552 ("ALSA: hda - Use generic parser codes for Realtek driver") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Takashi Iwai Cc: Jaroslav Kysela Cc: alsa-devel@alsa-project.org --- sound/pci/hda/patch_realtek.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -937,6 +937,9 @@ static int alc_init(struct hda_codec *co return 0; } +#define alc_free snd_hda_gen_free + +#ifdef CONFIG_PM static inline void alc_shutup(struct hda_codec *codec) { struct alc_spec *spec = codec->spec; @@ -950,9 +953,6 @@ static inline void alc_shutup(struct hda alc_shutup_pins(codec); } -#define alc_free snd_hda_gen_free - -#ifdef CONFIG_PM static void alc_power_eapd(struct hda_codec *codec) { alc_auto_setup_eapd(codec, false); @@ -966,9 +966,7 @@ static int alc_suspend(struct hda_codec spec->power_hook(codec); return 0; } -#endif -#ifdef CONFIG_PM static int alc_resume(struct hda_codec *codec) { struct alc_spec *spec = codec->spec;