From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60173346782 for ; Mon, 27 Apr 2026 15:30:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777303823; cv=none; b=BezAbPeD2JcJQzoEKqEQ8m/jaIOCSvh1psx23EERcxs08osS0Z1LXknIDZkutBBgpX47za8di+BmuwPHY7vH1MjGMYRBLCh2AUTUfXBTxgkRJtaKt8WIB1dfV6UHzR0ziVAwRCXwsaBq8XtUIlXz2SNvOMgWW6j0eiGFHBkEpNs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777303823; c=relaxed/simple; bh=x2gsD/7vjDMlAPu2Z+o87th3qmqHXJ08CwGiP50qAOk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VD5G2OxmCseklRPVMTnsnjxvHShbVVUlaE7FonFbTDf27AelKF1AnlpCM8ROs5ksAoWXGI4HpJjtHtA7c0a8AIY5o3WS72zkIedlR+eqZM4Ao73n9Rm7Em2p0M0RZ/a/pFaaVVopuaWT9f6aSloYs4ZBhOaS+i3+j8knP3cJGG0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GkTxiIFv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GkTxiIFv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 014F2C19425; Mon, 27 Apr 2026 15:30:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777303823; bh=x2gsD/7vjDMlAPu2Z+o87th3qmqHXJ08CwGiP50qAOk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GkTxiIFvWfN0lmHwAMDsy3edjKrIhV6N392laA+hd80IqTlMx5aTKr/5Mf37qaZMC 7nnQbR1yyDhuCMVG1ajcnuOH46EzgrBl7XC3Xwo3lFrM9SsRzkP39RDJU8alNIDd0J ZFGdEej6zO55Kb2XJJNfMgng68krbKvvX4NlK/bwwoBfnHwhZ3oVrnORgGo9XKc0Fy /94ZMVHEnXTbK9v/4BcB0woZ+dCqVDu6oo+DhpIWohekbIlsOneZO8mOg5FUlj8wx3 O5yXzdxFgUzCL3O4YeIzz8DfWEvO0erCMqVdUJViT6Gq1hZYeqouJ1l5Jq9ivmqmKt +LuORzJ0IIoUw== Received: from johan by theta with local (Exim 4.99.1) (envelope-from ) id 1wHNud-0000000056f-0UNe; Mon, 27 Apr 2026 17:30:19 +0200 Date: Mon, 27 Apr 2026 17:30:19 +0200 From: Johan Hovold To: Finn Thain Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nubus: switch to dynamic root device Message-ID: References: <20260424104011.2616970-1-johan@kernel.org> <92e2b920-041a-78a4-e4b6-c5a7c579ade7@linux-m68k.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <92e2b920-041a-78a4-e4b6-c5a7c579ade7@linux-m68k.org> On Sat, Apr 25, 2026 at 02:07:10PM +1000, Finn Thain wrote: > On Fri, 24 Apr 2026, Johan Hovold wrote: > > > Driver core expects devices to be dynamically allocated and will, for > > example, complain loudly if a device that lacks a release function is > > ever freed. > > > > Yes, in drivers/base/core.c, there is a warning in device_release(). > > WARN(1, KERN_ERR "Device '%s' does not have a release() > function, it is broken and must be fixed. See > Documentation/core-api/kobject.rst.\n", > > But there's no way for the refcount for the nubus parent device to reach > zero that I can see. Did I miss something? It will if registration ever fails (e.g. due to fault injection or name collision): err = device_register(&nubus_parent); if (err) { put_device(&nubus_parent); return err; } Johan