Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753926AbcJLHKd (ORCPT ); Wed, 12 Oct 2016 03:10:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52928 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752672AbcJLHKY (ORCPT ); Wed, 12 Oct 2016 03:10:24 -0400 Subject: Re: [PATCH 1/2] driver core: skip removal test for non-removable drivers To: Rob Herring References: <20161011184103.17744-1-robh@kernel.org> Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org From: Laszlo Ersek Message-ID: Date: Wed, 12 Oct 2016 09:10:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161011184103.17744-1-robh@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 12 Oct 2016 07:10:23 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1379 Lines: 40 Hi Rob, On 10/11/16 20:41, Rob Herring wrote: > Some drivers do not support removal/unbinding. These drivers should have > drv->suppress_bind_attrs set to true, so use that to skip the removal > test. > > This doesn't fix anything reported so far, but should prevent some other > cases. Some drivers will need fixes to set suppress_bind_attrs to avoid > this test. > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=177021 > Fixes: bea5b158ff0d ("driver core: add test of driver remove calls during probe") > Reported-by: Laszlo Ersek > Signed-off-by: Rob Herring > --- > drivers/base/dd.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/base/dd.c b/drivers/base/dd.c > index d22a7260f42b..8937a7ad7165 100644 > --- a/drivers/base/dd.c > +++ b/drivers/base/dd.c > @@ -324,7 +324,8 @@ static int really_probe(struct device *dev, struct device_driver *drv) > { > int ret = -EPROBE_DEFER; > int local_trigger_count = atomic_read(&deferred_trigger_count); > - bool test_remove = IS_ENABLED(CONFIG_DEBUG_TEST_DRIVER_REMOVE); > + bool test_remove = IS_ENABLED(CONFIG_DEBUG_TEST_DRIVER_REMOVE) && > + !drv->suppress_bind_attrs; > > if (defer_all_probes) { > /* > can you please repost the full series with me CC'd on all of the messages; I'm not subscribed to LKML. Thanks, Laszlo