Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7590484rwl; Thu, 23 Mar 2023 06:26:10 -0700 (PDT) X-Google-Smtp-Source: AK7set8RRk+fNVToAdeP6oHhswtbWeTAzcOIjcZzXrU7UQYIlyCjf+phpwFn9SW0yTa5mR7OMcTH X-Received: by 2002:a17:906:e08c:b0:92f:17d:4438 with SMTP id gh12-20020a170906e08c00b0092f017d4438mr12589569ejb.47.1679577970407; Thu, 23 Mar 2023 06:26:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679577970; cv=none; d=google.com; s=arc-20160816; b=pRsZ8v338QgnxayxEDJCJSueqOOlcYVJG0OIKKs8TY7Vkxr6MUPbrAtJQHJMwG+J1m x7MKJX/VTyku4YR0KaqtJxGu7kc/2zKFiGf0wTZtJ87Nr06lcIxes5yS1daSDAwXelVC +yRUd+k1J74u/ebK1joit45vV9PDfgjRDCnA8IKZwhq9796vspX5Ux6ziD/wdfr6/qSz l2TbVoOowzwKbJSEcLpQV4Urodqj1tmxChHNCH0VkkKoosMAZsvPhMzCdVCw8l0vBNPt FYuhqm7wYrM3CqI47OoQBf4+loq1TTCX037YCA5B/8Q4FZNj5+p0QS19IUgsm8SCJYCZ QOkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=tcDN4yLObJ91VpozedlyiBLgn6rGqURr9Yuhok2Y+PA=; b=VFrgdpel8+wZskvTXkS+AF51iwzqXfk0HSlOe4GKK36J4vdw/o9nVzdtzQPAwY2h74 Rad+sJINIyBj/gCmrY5MLjmqNseJAo9w0fzf2qIUSzmVQbk4BN/qZLIy3Kc4HJFmDd0+ CAITb0/2Qb5q/BpwfZvEgENoyI79QijjftayBBYgY80kNBJbdgjTuins8PTfmm/whDIG DtdV7w/gZuhVY+pzxs1r8LSTGWTjWgmwpe8sRRHF8PFwPdv0aG64RiIIvVDAXdRtZxAj t49zthduFyTUWT2/AQfQf9P2XTcjwvFzkiTV2hb1EF99RB3Cjqu5iqOC0gV9vwY8PiMC kE7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=P9YYByKL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f17-20020a056402161100b004fd2b051620si17421956edv.429.2023.03.23.06.25.45; Thu, 23 Mar 2023 06:26:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=P9YYByKL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231545AbjCWNCO (ORCPT + 99 others); Thu, 23 Mar 2023 09:02:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231442AbjCWNCN (ORCPT ); Thu, 23 Mar 2023 09:02:13 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B70F31E2F; Thu, 23 Mar 2023 06:02:07 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id i13so11940394lfe.9; Thu, 23 Mar 2023 06:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679576525; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=tcDN4yLObJ91VpozedlyiBLgn6rGqURr9Yuhok2Y+PA=; b=P9YYByKLmgGDibnq/rP1BZQfemo0fBl8D6TnLrSBncDfJdN+NJwfTBfZSQztaByYza VYON0dKQBtNI0nLdNUIl1RQDbOEbgATojc8xGo+u24vkXeXtq6IclmD4RXKu45xYZGxK JUY1dEeR80lqHDlHJV0RcQBXkk3kK56eyRAVFfyQLzxXoTz0bYGEcX5tGu+YlnaKV61/ o0nWH3/zDQdXmC6jAo/xDFp2r8cXtGV5IYx+r/z23WyVidpAyofkzx3s6mX4ViwBY9W0 I725KRdUfwzqXCIGIoxGhZxdSWQXrQfHtvkNuM9if2SvxKFqdX2AHIA9v1TezwGhAK/p HR+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679576525; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tcDN4yLObJ91VpozedlyiBLgn6rGqURr9Yuhok2Y+PA=; b=yKrtTlp5o2Pz5D9adGysDOKxrQGZsgmw2LEEzfsuwNvfVYA4O1R8+2nenEGmJ1U9ub ZrKK61y7OD+Whl1/UjMMkZhdKrysh1eRRYrR8Lxdamc51rv49NeWJtEVRiCBcmtO1zJM PoHuWPsSub8c/llhtferllptfD6ZUzl9/YJx+9PEX5XpvwbQz4MrexICD9ih9oTwxooV 7PBvct8sLwVDe7K2f23Ndit0syTAgXcZ/1RFfdwLY0y4hPu29UxkbPxRY5Nmqns0D3t8 My74PdrHS0rO9ch6RrcjqnnZJiymyj3aoScM8yhAL6p/m/b2ZbmfcNtpXV+QSdzOfG9j 5sOw== X-Gm-Message-State: AO0yUKUt4qvNXUJDIr2gGwHMMAa3224DJt0NLW0lQ4wXKO1js2NhsR39 R6BhGr/oa5WENCbjV8Uv8e4= X-Received: by 2002:ac2:55ac:0:b0:4a4:68b7:f86d with SMTP id y12-20020ac255ac000000b004a468b7f86dmr3714637lfg.17.1679576525021; Thu, 23 Mar 2023 06:02:05 -0700 (PDT) Received: from ?IPV6:2001:14ba:16f3:4a00::1? (dc75zzyyyyyyyyyyyyyyt-3.rev.dnainternet.fi. [2001:14ba:16f3:4a00::1]) by smtp.gmail.com with ESMTPSA id q5-20020a19a405000000b004db513b017esm2944811lfc.45.2023.03.23.06.02.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Mar 2023 06:02:04 -0700 (PDT) Message-ID: <590189b3-42d9-ab12-fccd-37338595cb6f@gmail.com> Date: Thu, 23 Mar 2023 15:02:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US, en-GB To: Maxime Ripard Cc: Greg Kroah-Hartman , Matti Vaittinen , "Rafael J. Wysocki" , Brendan Higgins , David Gow , Andy Shevchenko , Heikki Krogerus , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Stephen Boyd , Jonathan Cameron , linux-iio@vger.kernel.org References: <25f9758f-0010-0181-742a-b18a344110cf@gmail.com> <20230323101216.w56kz3rudlj23vab@houat> <8a03a6fb-39b9-cd17-cc10-ece71111357d@gmail.com> <20230323122925.kqdnomr7i46qnyo4@houat> From: Matti Vaittinen Subject: Re: [PATCH v5 1/8] drivers: kunit: Generic helpers for test device creation In-Reply-To: <20230323122925.kqdnomr7i46qnyo4@houat> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/23/23 14:29, Maxime Ripard wrote: > On Thu, Mar 23, 2023 at 02:16:52PM +0200, Matti Vaittinen wrote: > > This is the description of what was happening: > https://lore.kernel.org/dri-devel/20221117165311.vovrc7usy4efiytl@houat/ Thanks Maxime. Do I read this correcty. The devm_ unwinding not being done when root_device_register() is used is not because root_device_unregister() would not trigger the unwinding - but rather because DRM code on top of this device keeps the refcount increased? If this is the case, then it sounds like a DRM specific issue to me. Whether it is a feature or bug is beyond my knowledge. Still, I would not say using the root_device_[un]register() in generic code is not feasible - unless all other subsytems have similar refcount handling. Sure thing using root_device_register() root_device_unregister() in DRM does not work as such. This, however, does not mean the generic kunit helpers should use platform_devices to force unwinding? Well, It's almost the best season for ice-fishing in Finland so opening a can of worms is not that bad, right? :) Thanks for the education people! I did learn a thing or two Today. Yours, -- Matti -- Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When things go utterly wrong vim users can always type :help! ~~