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 9E308C433F5 for ; Tue, 19 Apr 2022 05:55:35 +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 B339A16E5; Tue, 19 Apr 2022 07:54:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B339A16E5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1650347732; bh=jJveFDHy30Dejyb0Tl1ENmYhauhtZNIhHnsaUcVQqT0=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=GLWDxMoWsa9R9cEkm8rk96/1RoxhQLVgEGbua6AwuMBlxfhO3xDEiP+VCJX74DHG4 4v8m6xOxpYXbAOIDKH/y+A5qL0gZzQXZpXhrsVHRJNPfZLNxrjvsW4s2gidXsLW7hi pJXFJXtSsXIhYHKd1SQNbQq36xidi5kpucSZERs8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4891AF80237; Tue, 19 Apr 2022 07:54:42 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5995DF8025D; Tue, 19 Apr 2022 07:54:39 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F0726F800C1 for ; Tue, 19 Apr 2022 07:54:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F0726F800C1 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="uxvnlnC/"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="IfXXSkBv" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id C60A81F37E; Tue, 19 Apr 2022 05:54:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1650347670; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2N3Ip/JaMBhfh7P/K8zsWkej8aS8SAaAJc3WaNdFEt4=; b=uxvnlnC/SRXOyf1N1A2h5PV79E+lvijv/JwstO+mwG3Rd7q0YqME6TLqDz2P8Afg9Rqvez 3YgQ1k65cX0fzsl6gm41OGVth1+ktd2nMsELrzukCHA62cdEgTWFaRQJijMRfpY5CjOSpr b2lDe0BdjFW50+q8L48EQSu/2Mrxdd4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1650347670; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2N3Ip/JaMBhfh7P/K8zsWkej8aS8SAaAJc3WaNdFEt4=; b=IfXXSkBvCqZEEK60Dtrsv0YMR8Q46fhCCml2OC2DcbS4n1a7jmvOosAIOn2sVrXrqXYTFX oZnnEDcxlLj+G6DA== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id BEB40A3B89; Tue, 19 Apr 2022 05:54:30 +0000 (UTC) Date: Tue, 19 Apr 2022 07:54:30 +0200 Message-ID: From: Takashi Iwai To: Lucas De Marchi Subject: Re: [Intel-gfx] [PATCH] ALSA: hda/i915: Fix one too many pci_dev_put() In-Reply-To: <20220418045032.74gipx7fo6ajnoib@ldmartin-desk2> References: <20220416064418.2364582-1-lucas.demarchi@intel.com> <20220418045032.74gipx7fo6ajnoib@ldmartin-desk2> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: intel-gfx@lists.freedesktop.org, alsa-devel@alsa-project.org, Kai Vehmanen 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" On Mon, 18 Apr 2022 06:50:32 +0200, Lucas De Marchi wrote: > > On Sun, Apr 17, 2022 at 01:13:49PM +0300, Kai Vehmanen wrote: > >Hi, > > > >On Fri, 15 Apr 2022, Lucas De Marchi wrote: > > > >> pci_get_class() will already unref the pci device passed as argument. > >> So if it's unconditionally unref'ed, even if the loop is not stopped, > > > >thanks Lucas. And yes indeed, overlooked that pci_get_class() > >will decrement the from device is specified. > > > >> --- a/sound/hda/hdac_i915.c > >> +++ b/sound/hda/hdac_i915.c > >> @@ -127,11 +127,10 @@ static int i915_gfx_present(struct pci_dev *hdac_pci) > >> display_dev = pci_get_class(class, display_dev); > >> > >> if (display_dev && display_dev->vendor == PCI_VENDOR_ID_INTEL && > >> - connectivity_check(display_dev, hdac_pci)) > >> + connectivity_check(display_dev, hdac_pci)) { > >> + pci_dev_put(display_dev); > >> match = true; > >> - > >> - pci_dev_put(display_dev); > >> - > >> + } > > > >Reviewed-by: Kai Vehmanen > > I applied this to our topic/core-for-CI branch to unblock CI on > DG2. Ultimately the target for this is the sound tree though. The patch looks good, feel free to submit it. thanks, Takashi