Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932265AbbLQRuv (ORCPT ); Thu, 17 Dec 2015 12:50:51 -0500 Received: from mail-ig0-f174.google.com ([209.85.213.174]:36894 "EHLO mail-ig0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751818AbbLQRut (ORCPT ); Thu, 17 Dec 2015 12:50:49 -0500 MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 17 Dec 2015 10:50:48 -0700 Message-ID: Subject: Re: -next regression: "driver cohandle -EPROBE_DEFER from bus_type.match()" From: Ross Zwisler To: Dan Williams Cc: Russell King , Stephen Rothwell , tomeu.vizoso@collabora.com, "linux-nvdimm@lists.01.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , m.szyprowski@samsung.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1406 Lines: 30 On Thu, Dec 17, 2015 at 8:51 AM, Dan Williams wrote: > The commit below causes the libnvdimm sub-system to stop loading. > This is due to the fact that nvdimm_bus_match() returns the result of > test_bit() which may be negative. If there are any other bus match > functions using test_bit they may be similarly impacted. > > Can we queue a fixup like the following to libnvdimm, and maybe > others, ahead of this driver core change? > > diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c > index 7e2c43f701bc..2b2181cdeb63 100644 > --- a/drivers/nvdimm/bus.c > +++ b/drivers/nvdimm/bus.c > @@ -62,7 +62,7 @@ static int nvdimm_bus_match(struct device *dev, > struct device_driver *drv) > { > struct nd_device_driver *nd_drv = to_nd_device_driver(drv); > > - return test_bit(to_nd_device_type(dev), &nd_drv->type); > + return !!test_bit(to_nd_device_type(dev), &nd_drv->type); How is this call to test_bit() returning a negative value? That can only happen if the bit number we supply is 63, correct? I only see to_nd_device_type() returning 1-6 for the defines ND_DEVICE_DIMM thru ND_DEVICE_NAMESPACE_BLK? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/