Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp509955rwb; Wed, 7 Dec 2022 22:19:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf6bxFEFN9U+bwHrGRI7ZbhXTZBPu67ay9RsnL72b4yuzOCZAq26SKi/O0NGPpLpURqoREuN X-Received: by 2002:aa7:db90:0:b0:459:aa70:d4fd with SMTP id u16-20020aa7db90000000b00459aa70d4fdmr80551991edt.162.1670480354095; Wed, 07 Dec 2022 22:19:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670480354; cv=none; d=google.com; s=arc-20160816; b=YTX4VDD7BIVUwIVF66WmUndmX5NtbVZU+VQPA3ldARA2AEQlIS11uKcy/oK8x9sJXH 0JBopbTISL7JXkSRFDAIYvHQoCU7miC0rHwtCyy2fkdzUmVgv37cX7Xt2kie9clSjYwe yyyPZGo8XtU02f0H2N6t3RQ8lk3pv0hACrHyP8L7fJ5f2JTyFp878YtlOUIrZe7GnI7g MulEwH/q3sM2rhPXbMySCXiC76RXjBq5s20QZ08C0LSivJOHtiKTf7ByarPOjxHk3Pun c65cLMPv+b6V2hEwEYIiqzSk+sJ9PNKoQlC48IMGxt2ce2v5em61L+J9ozvsWUO2+38j ct8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=HuJJv5o1pv1Ghc8BnP4INFe/Ym/wGhiMkLYppsCH2OI=; b=1Gud6ClB7rRZBTFa1lth7Csj432HGUKfz+WVVguoUhUMOaDgALub4mJz4DOcsATEMO +8dvXjXrqk78KMpOS304jsoZZR5QsYgIslf8Aytx43JPjo5Lha4MqI2rHTtdugJ2o7g6 Gixx5K8lo8H9FMPn9/bhKrDJehsOBhF5uEOBZyG4DHdvGlUkeSay8s/Ipn6CyyBpXg3k uamOAKwZQJaAgSYTn8ifxxLGrPO7T6mKbGglkXhPtNLcI+MiGM8EN9DSdFTKaEs8UYqs t7XUwemKT07BLjV/abYuFcyoR5FO1Tgh+eWChhiNrrvU58B9TqQk3bajy2S+t5/svyTL 1zfA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wz13-20020a170906fe4d00b007813b1924ccsi18190969ejb.934.2022.12.07.22.18.54; Wed, 07 Dec 2022 22:19:14 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229554AbiLHFwP (ORCPT + 73 others); Thu, 8 Dec 2022 00:52:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229486AbiLHFwO (ORCPT ); Thu, 8 Dec 2022 00:52:14 -0500 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D327B92A37; Wed, 7 Dec 2022 21:52:13 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 26FB5804D; Thu, 8 Dec 2022 05:52:13 +0000 (UTC) Date: Thu, 8 Dec 2022 07:52:11 +0200 From: Tony Lindgren To: Andy Shevchenko Cc: Greg Kroah-Hartman , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Jiri Slaby , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-serial@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v4 1/1] serial: core: Start managing serial controllers to enable runtime PM Message-ID: References: <20221207124305.49943-1-tony@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 * Andy Shevchenko [221207 20:28]: > We can avoid this check by caching the platform device. > > struct platform_device *ctrl_pdev = NULL; > > if (...) { > ctrl_pdev = to_platform_device(ctrl_dev); > } > > platform_device_del(ctrl_pdev); OK yeah that's nicer :) > > Shouldn't you call platform_device_unregister()? Outside the error path it should be platform_device_unregister(), I'll check. Thanks also for your other comments. Regards, Tony