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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00F6FC433F5 for ; Tue, 28 Sep 2021 10:22:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BBB4A61130 for ; Tue, 28 Sep 2021 10:22:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BBB4A61130 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 92FF46E0F8; Tue, 28 Sep 2021 10:22:35 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by gabe.freedesktop.org (Postfix) with ESMTPS id D635E6E0F8; Tue, 28 Sep 2021 10:22:34 +0000 (UTC) Received: from relay1.suse.de (relay1.suse.de [149.44.160.133]) by smtp-out2.suse.de (Postfix) with ESMTP id 538D7201F4; Tue, 28 Sep 2021 10:22:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1632824553; 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=tt5fvnB0Rph4QMU2fuRlXgFk+yrjdH4IJTG9J/9/qxk=; b=WxHveId86ce2OWT+TSt5yAtMYzHyXaDsFSKXbcunh+BiYH/Y3BGfM+kqLM1wsPvS5VYFHF nPtZly/7VuMwZYNPt92/lddN0f+kfX/QILsQI7Xx3ZUM1hLGSGFmsrvEI/wCL+eQ4NgK71 j3SJj7J1xet8GJSJW6OZ0sU1DVNP9cU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1632824553; 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=tt5fvnB0Rph4QMU2fuRlXgFk+yrjdH4IJTG9J/9/qxk=; b=LGFhye+McS1JOnT8olRVfKsK7+9cqDcy3BrCoAZ7bK1rSoOuLKa327MV8FWitm+ZMczKvz o+Uogr3Jbo4bYfDg== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay1.suse.de (Postfix) with ESMTP id 292E825D4C; Tue, 28 Sep 2021 10:22:33 +0000 (UTC) Date: Tue, 28 Sep 2021 12:22:33 +0200 Message-ID: From: Takashi Iwai To: Kai Vehmanen Cc: dri-devel@lists.freedesktop.org, gregkh@linuxfoundation.org, alsa-devel@alsa-project.org, "Rafael J . Wysocki" , jani.nikula@intel.com, Imre Deak , Russell King , Russell King , intel-gfx@lists.freedesktop.org Subject: Re: [PATCH v2] component: do not leave master devres group open after bind In-Reply-To: <20210922085432.2776886-1-kai.vehmanen@linux.intel.com> References: <20210922085432.2776886-1-kai.vehmanen@linux.intel.com> 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 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, 22 Sep 2021 10:54:32 +0200, Kai Vehmanen wrote: (snip) > --- a/drivers/base/component.c > +++ b/drivers/base/component.c > @@ -246,7 +246,7 @@ static int try_to_bring_up_master(struct master *master, > return 0; > } > > - if (!devres_open_group(master->parent, NULL, GFP_KERNEL)) > + if (!devres_open_group(master->parent, master, GFP_KERNEL)) > return -ENOMEM; > > /* Found all components */ > @@ -258,6 +258,7 @@ static int try_to_bring_up_master(struct master *master, > return ret; > } > > + devres_close_group(master->parent, NULL); Just wondering whether we should pass master here instead of NULL, too? thanks, Takashi 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8826FC433F5 for ; Tue, 28 Sep 2021 10:23:33 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4149061130 for ; Tue, 28 Sep 2021 10:23:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4149061130 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org 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 1CF991683; Tue, 28 Sep 2021 12:22:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1CF991683 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1632824610; bh=EIPRQ3NpXC7QSGhccBBnxK3zr5xT00nUrpX8lTIfjqY=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hY6v5VHprVbCurpqGRo476Jr+ZYfg5IShlUTAkxzP3ox3Cn5+spKwBsPxnSr2uIdu 1BNsT48iaZX5XFIMlc5a9yZeMsD/6zp2OFzZgy7uCOztSavwg3/eLP14sQAnBLMlIT 2RQofVmGFPx9XbulSB3PwRNmd9aRycOUKqTBoUCs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BA93CF804AD; Tue, 28 Sep 2021 12:22:39 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0EBA0F804D2; Tue, 28 Sep 2021 12:22:38 +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 C953DF804AD for ; Tue, 28 Sep 2021 12:22:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C953DF804AD Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="WxHveId8"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="LGFhye+M" Received: from relay1.suse.de (relay1.suse.de [149.44.160.133]) by smtp-out2.suse.de (Postfix) with ESMTP id 538D7201F4; Tue, 28 Sep 2021 10:22:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1632824553; 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=tt5fvnB0Rph4QMU2fuRlXgFk+yrjdH4IJTG9J/9/qxk=; b=WxHveId86ce2OWT+TSt5yAtMYzHyXaDsFSKXbcunh+BiYH/Y3BGfM+kqLM1wsPvS5VYFHF nPtZly/7VuMwZYNPt92/lddN0f+kfX/QILsQI7Xx3ZUM1hLGSGFmsrvEI/wCL+eQ4NgK71 j3SJj7J1xet8GJSJW6OZ0sU1DVNP9cU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1632824553; 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=tt5fvnB0Rph4QMU2fuRlXgFk+yrjdH4IJTG9J/9/qxk=; b=LGFhye+McS1JOnT8olRVfKsK7+9cqDcy3BrCoAZ7bK1rSoOuLKa327MV8FWitm+ZMczKvz o+Uogr3Jbo4bYfDg== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay1.suse.de (Postfix) with ESMTP id 292E825D4C; Tue, 28 Sep 2021 10:22:33 +0000 (UTC) Date: Tue, 28 Sep 2021 12:22:33 +0200 Message-ID: From: Takashi Iwai To: Kai Vehmanen Subject: Re: [PATCH v2] component: do not leave master devres group open after bind In-Reply-To: <20210922085432.2776886-1-kai.vehmanen@linux.intel.com> References: <20210922085432.2776886-1-kai.vehmanen@linux.intel.com> 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: alsa-devel@alsa-project.org, "Rafael J . Wysocki" , jani.nikula@intel.com, gregkh@linuxfoundation.org, Imre Deak , dri-devel@lists.freedesktop.org, Russell King , Russell King , intel-gfx@lists.freedesktop.org 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 Wed, 22 Sep 2021 10:54:32 +0200, Kai Vehmanen wrote: (snip) > --- a/drivers/base/component.c > +++ b/drivers/base/component.c > @@ -246,7 +246,7 @@ static int try_to_bring_up_master(struct master *master, > return 0; > } > > - if (!devres_open_group(master->parent, NULL, GFP_KERNEL)) > + if (!devres_open_group(master->parent, master, GFP_KERNEL)) > return -ENOMEM; > > /* Found all components */ > @@ -258,6 +258,7 @@ static int try_to_bring_up_master(struct master *master, > return ret; > } > > + devres_close_group(master->parent, NULL); Just wondering whether we should pass master here instead of NULL, too? thanks, Takashi 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9562AC433EF for ; Tue, 28 Sep 2021 10:22:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 64C8B610A2 for ; Tue, 28 Sep 2021 10:22:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 64C8B610A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E00AA6E0FB; Tue, 28 Sep 2021 10:22:35 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by gabe.freedesktop.org (Postfix) with ESMTPS id D635E6E0F8; Tue, 28 Sep 2021 10:22:34 +0000 (UTC) Received: from relay1.suse.de (relay1.suse.de [149.44.160.133]) by smtp-out2.suse.de (Postfix) with ESMTP id 538D7201F4; Tue, 28 Sep 2021 10:22:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1632824553; 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=tt5fvnB0Rph4QMU2fuRlXgFk+yrjdH4IJTG9J/9/qxk=; b=WxHveId86ce2OWT+TSt5yAtMYzHyXaDsFSKXbcunh+BiYH/Y3BGfM+kqLM1wsPvS5VYFHF nPtZly/7VuMwZYNPt92/lddN0f+kfX/QILsQI7Xx3ZUM1hLGSGFmsrvEI/wCL+eQ4NgK71 j3SJj7J1xet8GJSJW6OZ0sU1DVNP9cU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1632824553; 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=tt5fvnB0Rph4QMU2fuRlXgFk+yrjdH4IJTG9J/9/qxk=; b=LGFhye+McS1JOnT8olRVfKsK7+9cqDcy3BrCoAZ7bK1rSoOuLKa327MV8FWitm+ZMczKvz o+Uogr3Jbo4bYfDg== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay1.suse.de (Postfix) with ESMTP id 292E825D4C; Tue, 28 Sep 2021 10:22:33 +0000 (UTC) Date: Tue, 28 Sep 2021 12:22:33 +0200 Message-ID: From: Takashi Iwai To: Kai Vehmanen Cc: dri-devel@lists.freedesktop.org, gregkh@linuxfoundation.org, alsa-devel@alsa-project.org, "Rafael J . Wysocki" , jani.nikula@intel.com, Imre Deak , Russell King , Russell King , intel-gfx@lists.freedesktop.org In-Reply-To: <20210922085432.2776886-1-kai.vehmanen@linux.intel.com> References: <20210922085432.2776886-1-kai.vehmanen@linux.intel.com> 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 Subject: Re: [Intel-gfx] [PATCH v2] component: do not leave master devres group open after bind X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, 22 Sep 2021 10:54:32 +0200, Kai Vehmanen wrote: (snip) > --- a/drivers/base/component.c > +++ b/drivers/base/component.c > @@ -246,7 +246,7 @@ static int try_to_bring_up_master(struct master *master, > return 0; > } > > - if (!devres_open_group(master->parent, NULL, GFP_KERNEL)) > + if (!devres_open_group(master->parent, master, GFP_KERNEL)) > return -ENOMEM; > > /* Found all components */ > @@ -258,6 +258,7 @@ static int try_to_bring_up_master(struct master *master, > return ret; > } > > + devres_close_group(master->parent, NULL); Just wondering whether we should pass master here instead of NULL, too? thanks, Takashi