From patchwork Thu Dec 17 15:51:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 7874111 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8AEAA9F349 for ; Thu, 17 Dec 2015 15:53:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A9E3C2044C for ; Thu, 17 Dec 2015 15:53:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D118620434 for ; Thu, 17 Dec 2015 15:53:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a9aqy-0006yK-Ew; Thu, 17 Dec 2015 15:52:28 +0000 Received: from mail-yk0-x232.google.com ([2607:f8b0:4002:c07::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a9aq7-00066M-M5 for linux-arm-kernel@lists.infradead.org; Thu, 17 Dec 2015 15:51:38 +0000 Received: by mail-yk0-x232.google.com with SMTP id v6so23311404ykc.2 for ; Thu, 17 Dec 2015 07:51:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=06YOZ/OTx2B41iyeCPlFidd+z8fm0SK+UMs6BaUjWBo=; b=YOS8+gBzylwiH0DkalqVguLBRFD+hJecV3c5Tb64KNpRR/8iE7Ka7OG3iZB/71ryvq IIJCTXseOvyyxVwimG2BuaDjLjFcR2TroI+m1+vzIwRoUoyB6bagISNpKKjA4zH3DaHI 65bKgHiLkh0wHPPzqrkp044c5ckHeKo0oxuG9cgsRbpGTlOvDRyy/GLtrZS6+OmchIHS 5p9506GusSTr8+MJvnpjOWAv40TTdPhP/kfBao9vaWHMVeyiy330T1/icnIgPX0Yxgij +Ni5Oy4Eek8te5I4E/PJH4Cq1XmrpAKFwwzEkK0cSg04BaZQMsXAiaA04LLohE7nA4fO AVyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc :content-type; bh=06YOZ/OTx2B41iyeCPlFidd+z8fm0SK+UMs6BaUjWBo=; b=EQG/6oNWOvCgaVpgOK3aIo5YJ4/hyLNOphVjCI0qp5BO5H0T7KhuJ63vtJBTt7H2Xt znvqfCySVoMCNkvRkVLfDZc0l/Br0VW8dwvkQugr2MoDi83ZIXagt4I8mhFrsYHhL/Sn 8akxFEAa/sLPIdIvSQozaDueVx3L/JJuV08EBFeDv/61PGtOHl81vNdFqGF4+fuxyJCX sQr5afEmxgHRbHuHDMIViT7uD5jx44gr0SPfTa6zQuAOFE464vOBn87CXadGFdDDpYsG 0i5fzRH9DsSifowPjSvpW7Oq5LYTo1HsJRg8981iaMeLuzm8NL8UqyR2RbiayNjj3VoN aYjA== X-Gm-Message-State: ALoCoQkPxPcb4v1z4wfHoKTQzbwG7c8fTyXpJoyPfARjhXvFvqfgUZZkQPTALhJewgmrv41ck8qI0aTYkomDqGQ7SdugBIR+4+RFrFkslHk3FINkoUmxHR4= MIME-Version: 1.0 X-Received: by 10.13.242.67 with SMTP id b64mr33255209ywf.287.1450367474446; Thu, 17 Dec 2015 07:51:14 -0800 (PST) Received: by 10.37.223.213 with HTTP; Thu, 17 Dec 2015 07:51:14 -0800 (PST) Date: Thu, 17 Dec 2015 07:51:14 -0800 Message-ID: Subject: -next regression: "driver cohandle -EPROBE_DEFER from bus_type.match()" From: Dan Williams To: Russell King X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151217_075136_060244_85CAE6AB X-CRM114-Status: GOOD ( 12.23 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 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 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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? static struct module *to_bus_provider(struct device *dev) Other ideas? commit 09a14906a26e454cad7ff0ad96af40fc4cd90eb0 Author: Tomeu Vizoso Date: Tue Dec 8 10:00:45 2015 +0100 ARM: 8472/1: driver cohandle -EPROBE_DEFER from bus_type.match() Allow implementations of the match() callback in struct bus_type to return errors and if it's -EPROBE_DEFER then queue the device for deferred probing. This is useful to buses such as AMBA in which devices are registered before their matching information can be retrieved from the HW (typically because a clock driver hasn't probed yet). [changed if-else code structure, adjusted documentation to match the code, extended comments] Signed-off-by: Tomeu Vizoso Signed-off-by: Marek Szyprowski Reviewed-by: Ulf Hansson Signed-off-by: Russell King 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); }