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 077E0C43217 for ; Tue, 19 Apr 2022 06:57:40 +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 7257C16C0; Tue, 19 Apr 2022 08:56:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7257C16C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1650351458; bh=poc6p9yQF9XdOV99Y/wvoJwTvJq2PNV+haBDLQW90k4=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=X3ZpVIT0ElxhRoGnBKy+zNOwTDTM1U1o3+jpaWLxCrZH7RcgTOf/RN/NIK55OYicq bZMefGzOQsqscrTQ9uEEr+gkQXtxvVNBgZ8rw8LFGrbR8OY47JrUDC2MR2bjl1wXXO 69vC0dUBUxOKn4ifX5ez0LHX+weRPpAqrPrtxcxQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 06190F80237; Tue, 19 Apr 2022 08:56:48 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1FF28F80121; Tue, 19 Apr 2022 08:56:46 +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 E8F48F80116 for ; Tue, 19 Apr 2022 08:56:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E8F48F80116 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="tACuNbNQ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="k+rlk7iC" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 58FAC1F383; Tue, 19 Apr 2022 06:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1650351399; 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=a+A8MWLQ2UX1UgFOdddAhdAjlzvvzqOUMYMntwHYcDw=; b=tACuNbNQaVN6l37GrRDXnNMM5pHAfmCwSgThEqNybo8ZkAA26W1tUGx2k5BfbBO2Chm1Dj 488xucK5SlcyPmXpdx1NUxuygnToF+f7RmqZ+PQu8sCta+99srI7ryNrSl4zfj0EAGLrU8 qdZpVTLuRnn9Uixmh6MRwcX7zFfZxIg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1650351399; 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=a+A8MWLQ2UX1UgFOdddAhdAjlzvvzqOUMYMntwHYcDw=; b=k+rlk7iCLll2si+kDHTFQKAmQOb59hMIpnUfhjTevIXBTfiR7VXaHCT8cuBOhA6ZfHAZP0 dMY1RyLsWU/pz5Cg== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 51009A3C1F; Tue, 19 Apr 2022 06:56:39 +0000 (UTC) Date: Tue, 19 Apr 2022 08:56:39 +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: References: <20220416064418.2364582-1-lucas.demarchi@intel.com> <20220418045032.74gipx7fo6ajnoib@ldmartin-desk2> <20220419062606.73bsepujqcmlnjl3@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 Tue, 19 Apr 2022 08:40:01 +0200, Takashi Iwai wrote: > > On Tue, 19 Apr 2022 08:26:06 +0200, > Lucas De Marchi wrote: > > > > On Tue, Apr 19, 2022 at 07:54:30AM +0200, Takashi Iwai wrote: > > >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. > > > > not sure if I was clear. This patch is already targeting the sound tree: > > it should apply cleanly. > > The original patch hasn't reached to me (we've had the mail server > problem in the last weekend, and that might be the reason). > > Could you resubmit? Never mind, I could find it in lore. https://lore.kernel.org/all/20220416064418.2364582-1-lucas.demarchi@intel.com/ Takashi