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: 7874081 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6229CBEEED for ; Thu, 17 Dec 2015 15:51:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7D9AD20434 for ; Thu, 17 Dec 2015 15:51:18 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4EF7620453 for ; Thu, 17 Dec 2015 15:51:17 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 384FF1A2310; Thu, 17 Dec 2015 07:51:17 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mail-yk0-x22e.google.com (mail-yk0-x22e.google.com [IPv6:2607:f8b0:4002:c07::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6F8981A2310 for ; Thu, 17 Dec 2015 07:51:15 -0800 (PST) Received: by mail-yk0-x22e.google.com with SMTP id v6so23311400ykc.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=Q6aNEqNpf3Q4MfLrEiRrkhXvNqnTnTnV2RzV99QWpjbF1ZN6RpwIW3CriXxLoyXzq7 JpVBcJiSB3WnX9z/dDMg10xvm1n5iSsawEBr5x0W+vJbDPRsg0zRCwhk4E5rgWDhDh02 aSFOOeaP+ksZuTDZ0ItBk+UeWO1nsoEh+4QIYBI9r6WPP/jIN624mmmuWziTw/kZrJac IQauicEjLsiGzj7/cY3BOaZ2VRQEooDpF1z6jZZVUTSaWYOB50R6eJsez3EB4pO1v97d FI22Bj5HXqiovRIUUJDH4rXmQ9JskeCLy0288KkT6RexR/EoqnKwiPQlTZx/1f5aHCvP gZuA== X-Gm-Message-State: ALoCoQnxV74WVkMa+d1HvQKDIPn3OBSqiEGsevsc/HXM3eC6JHWGc4rQN2ro12B5nYhOTexIn/sQLXHn3XGsE1vVRDrEz0deD137JV8BY8pk3J0qsaF6CT0= 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 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 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, 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); }