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 4B55EC433F5 for ; Tue, 19 Apr 2022 06:41:02 +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 3A47416FB; Tue, 19 Apr 2022 08:40:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3A47416FB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1650350461; bh=DSA6m3l9zD3RUlcNs0VXglIkSEq42D7PXoB46wesiHQ=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tEAfKTeZz4Aozr05lewBDWY6+pychQMKumSmCYuZJ6o+aoPoksUitQIczmuFJMLuY xY0ybUldoKlpWO+T+JEAEWx30RmUevQJARCbFj5nQ+1efQp/CEdLu2wzYcBYRtwTDW 1VcDUNySgsjwgTrSLb0pp6lsKzqAgrUG1ArtWhRk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7D078F80116; Tue, 19 Apr 2022 08:40:10 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5507DF8025D; Tue, 19 Apr 2022 08:40:08 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (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 29615F80116 for ; Tue, 19 Apr 2022 08:40:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 29615F80116 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="qsDghvnB"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="rX5iZaha" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 9890D210F5; Tue, 19 Apr 2022 06:40:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1650350401; 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=E/7EnBv+wNnSnepOQkL6k47cZM0CYr2UDZFQKWFwRTI=; b=qsDghvnB+CX2vTCT8HRayOKuZL4rtp4fpm8FyqVtowzvMR80b67xUI8qPNlmr+T+phNo7L pXXJTYm9FEfOAlkQmkwv3gi6WPs1HMNR7ENLFYPnsBtNegH5yIcM38sEBmnhP4bMwftj9j Rke2glfQeKUI+WPsUyjVLa4ozhiyiMs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1650350401; 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=E/7EnBv+wNnSnepOQkL6k47cZM0CYr2UDZFQKWFwRTI=; b=rX5iZaha2exrr54YUjCnxtvqZ11Z3gHUm8dYU6bK0GqcFkzJNFxDi22sth+S2/KuX3xO+J OGG94t/i2OlwrlBg== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 8B822A3B93; Tue, 19 Apr 2022 06:40:01 +0000 (UTC) Date: Tue, 19 Apr 2022 08:40:01 +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: <20220419062606.73bsepujqcmlnjl3@ldmartin-desk2> 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: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? thanks, Takashi