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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D31F2C43331 for ; Tue, 24 Mar 2020 15:47:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AEDB820836 for ; Tue, 24 Mar 2020 15:47:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727730AbgCXPrC (ORCPT ); Tue, 24 Mar 2020 11:47:02 -0400 Received: from mga04.intel.com ([192.55.52.120]:21508 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727678AbgCXPrC (ORCPT ); Tue, 24 Mar 2020 11:47:02 -0400 IronPort-SDR: uiF6sACUtv361W6mPKjOmHze75lhDg10tJTIgAWGEdVcLUF/HiAXnvWRSJx6R3CzgQQTmch0hG ZRTNO4yFs5Xg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2020 08:47:01 -0700 IronPort-SDR: 88Vm/iaJ5JzgBwlVh6o6UXLS1iKGkcgdhPzit2FTxm7emrUtmOdXaHAaWP3eB1mkjEFYw+Edl1 Ux6vl9GIVuNA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,300,1580803200"; d="scan'208";a="447916586" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga006.fm.intel.com with ESMTP; 24 Mar 2020 08:46:59 -0700 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1jGlld-00CZUm-Ob; Tue, 24 Mar 2020 17:47:01 +0200 Date: Tue, 24 Mar 2020 17:47:01 +0200 From: Andy Shevchenko To: "Rafael J. Wysocki" Cc: Greg Kroah-Hartman , Linux Kernel Mailing List , Linux PM , Artem Bityutskiy , Mark Brown , Felipe Balbi , Andrzej Hajda , Peter Ujfalusi , Ferry Toth Subject: Re: [PATCH v2 1/3] driver core: Break infinite loop when deferred probe can't be satisfied Message-ID: <20200324154701.GQ1922688@smile.fi.intel.com> References: <20200324122023.9649-1-andriy.shevchenko@linux.intel.com> <20200324133903.GK1922688@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Tue, Mar 24, 2020 at 04:36:56PM +0100, Rafael J. Wysocki wrote: > On Tue, Mar 24, 2020 at 2:39 PM Andy Shevchenko > wrote: > > On Tue, Mar 24, 2020 at 01:52:00PM +0100, Rafael J. Wysocki wrote: > > > On Tue, Mar 24, 2020 at 1:20 PM Andy Shevchenko > > > wrote: ... > > > > + atomic_dec(&probe_okay); > > > > > > Why is this needed? > > > > Under successful probe the following is comprehended. When probe of the driver > > happens it may be discarded (as in above case) as it was initiated by another > > driver which got deferred. > > > > We also discussed this with Peter [1] during his review. > > > > [1]: https://lkml.org/lkml/2020/3/12/347 > > OK, but I would add a comment explaining that to the code. > > Also it would be good to explain why probe_okay cannot go below zero > here in the changelog. Will do, thank you for review! -- With Best Regards, Andy Shevchenko