Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3678329lfo; Mon, 23 May 2022 11:09:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLTfNJ2Q7hjDfS3Jz1XtpZvreVW2Cq2XwRbxdhP5iWxVdkn6KBNUxe3rBtNSaBnErgi8QJ X-Received: by 2002:a63:7d48:0:b0:3db:33fd:b227 with SMTP id m8-20020a637d48000000b003db33fdb227mr21665306pgn.194.1653329394074; Mon, 23 May 2022 11:09:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653329394; cv=none; d=google.com; s=arc-20160816; b=EXn15tu5CswIMuh20xdlIFqum2vDdPCK9MwzTJhKnrCcMjaravxEFanO9LmW1m/VNN 65zlVdtrY9LgrXthIA1jcUhRjpa7Aab5WN9ykOSCQiTgbrY17ir9A7qhOZy1rpKuLdHd Qh5w450qNenJAGCSilI0GprINVcEOveuS8XQS7gDMvoZIN425XR54sdEc0I7f0cggQgR 5ogIBK0xJeM3iyew8bfaN3vMdMZ/trhNcco56low5+RT+7DXYGLC+o0XUVtHMMhvPcx7 VTk1gKzf1l3Y72mayxTAbSsZ2ZiU7pMieeHG7FxBL39t1BhBhx0+mU3oSqtbobXrLi5A xdIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KGijFstZPSz26FB3BBq0dP9DO9GEW78QNCFR17fBFQU=; b=rOjt56NSeqUpQ3qG9Jhh+0yobTezv7cAB7eUb2cYYvPFux17oB/j/W2Aq7AEYan7Fr Iizs7N1hh4QCjymPQ/8G8R/yT4sbfO0IkkLf9cjX0GmJezrikAbOfztNQ5INaz2aAg4I eeHiA9P4ASju6gG0iOxVsUjCO/WGUm8ih7rhAcp6YsO+pb35+udszyT7xY5TuT+jAqa2 b+o/EeIzmTxO/3pHJ7jRoYDpgJtXMfB/MSqgJkuZvYH0yRAK1uCSS6hlR/cGohUw6oKD 3ExcGi1ySVO4l6mZuq2Fvs/3hvf+F4qBCCtTtfHfIeGGGXYgu3/xZK8uOecWcz55+76i 50ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2B2Ms9Yc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o14-20020a635d4e000000b003daeb3ad0e3si4334007pgm.172.2022.05.23.11.09.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 11:09:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2B2Ms9Yc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 216D7149ABE; Mon, 23 May 2022 11:09:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242613AbiEWSA0 (ORCPT + 99 others); Mon, 23 May 2022 14:00:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240994AbiEWRck (ORCPT ); Mon, 23 May 2022 13:32:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0C3575232; Mon, 23 May 2022 10:27:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 84EAAB81201; Mon, 23 May 2022 17:27:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7850C385A9; Mon, 23 May 2022 17:27:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653326838; bh=f/gxUlTFfj5frVlRI3KJBmQ/F3Zpezwb6EMBb3DBUTw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2B2Ms9YcNExZ6Z7GaQMmMq1xQxsGpVHBaBEsuUqsx0ghCGBQFLTO4E9GKqngje8KJ 0muF7APF6ia2lu9Zk0lRL/F0tWacjG4LSaI68CLjmEPPWNgWU23pv5DMG12+yXELIS Mp9T6T/3eWMuLbzm2r6EV98Q/pDzOniocwPmJxgk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , kernel test robot , Takashi Iwai , Sasha Levin Subject: [PATCH 5.17 075/158] ALSA: hda - fix unused Realtek function when PM is not enabled Date: Mon, 23 May 2022 19:03:52 +0200 Message-Id: <20220523165843.404303095@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165830.581652127@linuxfoundation.org> References: <20220523165830.581652127@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap [ Upstream commit c3d9ca93f1e3bd3d1adfc4479a12c82fed424c87 ] 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 Link: https://lore.kernel.org/r/20220430193318.29024-1-rdunlap@infradead.org Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/pci/hda/patch_realtek.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 779205bf5862..e38acdbe1a3b 100644 --- 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 *codec) 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_codec *codec) 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 *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; -- 2.35.1