From patchwork Tue Oct 16 07:22:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 10643173 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8FFF314E2 for ; Tue, 16 Oct 2018 07:23:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7326629AA0 for ; Tue, 16 Oct 2018 07:23:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7132629AAA; Tue, 16 Oct 2018 07:23:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9EF9129AA0 for ; Tue, 16 Oct 2018 07:23:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: Message-id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:List-Owner; bh=t+cUapukUwqXiWqD5RrlydOOk0SEK9R8ImwnIErKnOQ=; b=LY 581Rk/zrbMI/aChYer5yfC/lY3ICjMm87ICSYeZxP8SsSBTAWIYaZYe4LMQkB2VfJOCHrToi99MTw ifqI2TliloHjpgnQXPTk6LMx1BfxB7H9O8/7gkgehxYLr2ZwSopeZL5Dhwi3f0AqJSAXDOPfypK95 OVQSKdXqgYZoI8Ot0Ee5dKR7k4Uq6B/twKsSYh4/x7tg80w02Tk9nPEWZb7IjU274PKLNsnTdjc34 gnyIXsO5/uyt449XIPIdf7O0k+9ha3D5gv9coK+/FO86Y8etYw6A0RoA7Yaed0JWvkHWqCyu0Xyvt ricZokCdKYBEgr8Prt7RZUFirIk6DJXg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gCJhf-0000NV-KG; Tue, 16 Oct 2018 07:23:43 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gCJh3-00005e-B5 for linux-arm-kernel@lists.infradead.org; Tue, 16 Oct 2018 07:23:07 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181016072250euoutp0287b92d3b04f14186857d34217dd5cdd8~eBd1GxxA01631116311euoutp02R; Tue, 16 Oct 2018 07:22:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181016072250euoutp0287b92d3b04f14186857d34217dd5cdd8~eBd1GxxA01631116311euoutp02R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539674570; bh=4PXZJ+LXXEF+OtbzATccRUV0NPhfME8U+BVmIFjw9bk=; h=From:To:Cc:Subject:Date:References:From; b=uAlDI7alhN3ZfnSSfWKo+PihazyYgtm5STJ4FulA4ez0u7CznuDznK/swgIJSX/ri t8/Jqs2fBleria/CNrQOWEjwn4JGGCCy9n45bNerH0AeZFCjtHLTrEg65Iv7HI9EDb ErbPaQ8DjETZOPOW19J2Ml6yKr/i2ssHcavso8NQ= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181016072249eucas1p170e0b078977f3b79b4ee1b59fc5744b3~eBd0S-Jya1687516875eucas1p1o; Tue, 16 Oct 2018 07:22:49 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 0A.2A.04806.9C195CB5; Tue, 16 Oct 2018 08:22:49 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181016072248eucas1p18943ce87e084797cd597afd4edb65a65~eBdzaxeFq1687516875eucas1p1n; Tue, 16 Oct 2018 07:22:48 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-6a-5bc591c96f49 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 9F.56.04128.8C195CB5; Tue, 16 Oct 2018 08:22:48 +0100 (BST) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PGO0048DKHZVR70@eusync1.samsung.com>; Tue, 16 Oct 2018 08:22:48 +0100 (BST) From: Andrzej Hajda To: Greg Kroah-Hartman Subject: [PATCH 0/3] driver core: add probe error check helper Date: Tue, 16 Oct 2018 09:22:41 +0200 Message-id: <20181016072244.1216-1-a.hajda@samsung.com> X-Mailer: git-send-email 2.18.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrEIsWRmVeSWpSXmKPExsWy7djP87onJx6NNjjcJWxxa905VouXEw4z WmycsZ7VYurDJ2wWzYvXs1ksnLac0WLT42usFpd3zWGzWHvkLrvF3C9TmR24PHbOusvusWlV J5vH/rlr2D02L6n3eL/vKptH35ZVjB6fN8kFsEdx2aS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Q6+QlHh5v Z5zAyLWAkWEVo0hqaXFuem6xkV5xYm5xaV66XnJ+7iZGYPBsO/Zzyw7GrnfBhxgFOBiVeHh/ XD8SLcSaWFZcmXuIUYKDWUmEV7byaLQQb0piZVVqUX58UWlOavEhRmkOFiVx3vMGlVFCAumJ JanZqakFqUUwWSYOTqkGRg4u9s2HjAx6/7He2XVijYrOeW+GHquL54OzOCanz2w4Pu1sJI9O 64w9VXJ87pJ5v2c0/nJNKlTWV9yyRc4vju1g88Z/ziceLWdKvxYqUvjm3XovWfHNFpudmR8+ SWRJu1d47eght/KiFO+U03PVGP6wzlE5HZgwhfebMH/yRrWvio+8OPu2K7EUZyQaajEXFScC AOsjSTkaAgAA X-CMS-MailID: 20181016072248eucas1p18943ce87e084797cd597afd4edb65a65 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181016072248eucas1p18943ce87e084797cd597afd4edb65a65 References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181016_002305_669794_ECFC09A9 X-CRM114-Status: GOOD ( 15.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Rafael J. Wysocki" , Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org, Javier Martinez Canillas , Andrzej Hajda , andy.shevchenko@gmail.com, Mark Brown , linux-arm-kernel@lists.infradead.org, Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Greg, Rafael, This patchset proposes probe helper function which should simplify little bit resource acquisition error handling, it also extend it with adding defer probe reason to devices_deferred property: # cat /sys/kernel/debug/devices_deferred exynos-hdmi 13970000.hdmi: cannot find out bridge arizona-extcon tm2-audio sound: Unable to get codec_dai_name The last patch was generated by cocci script to show the gain for the most obvious probe_err usage scenarios. Of course there are many more places where it could be used. If the 1st patch will be accepted I can split 3rd one per subsystems if neccessary. Regards Andrzej Andrzej Hajda (3): driver core: add probe_err log helper driver core: add deferring probe reason to devices_deferred property drivers: use probe_err function in obvious cases drivers/ata/libahci_platform.c | 7 +- drivers/base/base.h | 3 + drivers/base/core.c | 40 +++++++++++ drivers/base/dd.c | 34 +++++++++- drivers/base/power/domain.c | 10 ++- drivers/bus/fsl-mc/fsl-mc-bus.c | 8 +-- drivers/bus/ts-nbus.c | 8 +-- drivers/clk/qcom/clk-spmi-pmic-div.c | 9 +-- drivers/clk/sunxi-ng/ccu-sun8i-de2.c | 16 ++--- drivers/clk/sunxi-ng/ccu-sun9i-a80-de.c | 11 ++-- drivers/clk/sunxi-ng/ccu-sun9i-a80-usb.c | 5 +- drivers/cpufreq/qcom-cpufreq-kryo.c | 10 ++- drivers/crypto/caam/caamalg_qi2.c | 3 +- drivers/firmware/arm_scmi/driver.c | 9 +-- drivers/firmware/imx/imx-scu.c | 7 +- drivers/gpio/gpio-pca953x.c | 4 +- drivers/gpio/gpio-pisosr.c | 9 +-- .../gpu/drm/omapdrm/displays/encoder-opa362.c | 8 +-- .../gpu/drm/omapdrm/displays/encoder-tfp410.c | 8 +-- .../drm/omapdrm/displays/encoder-tpd12s015.c | 8 +-- drivers/gpu/drm/omapdrm/dss/dpi.c | 8 +-- drivers/gpu/drm/omapdrm/dss/dsi.c | 8 +-- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 8 +-- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 8 +-- drivers/gpu/drm/omapdrm/dss/sdi.c | 8 +-- drivers/gpu/drm/omapdrm/dss/venc.c | 8 +-- drivers/gpu/drm/panel/panel-lvds.c | 10 ++- drivers/gpu/drm/panel/panel-simple.c | 5 +- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 5 +- drivers/gpu/drm/vc4/vc4_dsi.c | 23 +++---- drivers/hid/i2c-hid/i2c-hid-core.c | 9 +-- drivers/hwmon/pwm-fan.c | 7 +- drivers/i2c/busses/i2c-bcm2835.c | 8 +-- drivers/i2c/busses/i2c-rk3x.c | 10 ++- drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 30 +++------ drivers/i2c/muxes/i2c-mux-gpmux.c | 16 ++--- drivers/iio/adc/envelope-detector.c | 23 +++---- drivers/iio/adc/rcar-gyroadc.c | 5 +- drivers/iio/afe/iio-rescale.c | 8 +-- drivers/iio/dac/dpot-dac.c | 16 ++--- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 11 ++-- drivers/iio/multiplexer/iio-mux.c | 16 ++--- drivers/input/keyboard/bcm-keypad.c | 8 +-- drivers/input/misc/pwm-beeper.c | 12 ++-- drivers/input/misc/pwm-vibra.c | 18 ++--- drivers/input/mouse/elan_i2c_core.c | 6 +- drivers/input/touchscreen/bu21029_ts.c | 14 ++-- drivers/input/touchscreen/chipone_icn8318.c | 5 +- drivers/input/touchscreen/ektf2127.c | 5 +- drivers/input/touchscreen/elants_i2c.c | 16 ++--- drivers/input/touchscreen/pixcir_i2c_ts.c | 10 ++- drivers/input/touchscreen/raydium_i2c_ts.c | 20 +++--- .../input/touchscreen/resistive-adc-touch.c | 9 +-- drivers/input/touchscreen/silead.c | 15 ++--- drivers/input/touchscreen/sis_i2c.c | 12 ++-- drivers/input/touchscreen/surface3_spi.c | 9 +-- drivers/leds/leds-pwm.c | 7 +- drivers/media/i2c/ad5820.c | 9 +-- drivers/media/i2c/tc358743.c | 10 ++- drivers/media/platform/omap3isp/isp.c | 3 +- drivers/media/platform/video-mux.c | 4 +- drivers/media/rc/gpio-ir-recv.c | 5 +- drivers/media/rc/gpio-ir-tx.c | 10 ++- drivers/mfd/madera-core.c | 6 +- drivers/mmc/host/bcm2835.c | 3 +- drivers/mmc/host/davinci_mmc.c | 5 +- drivers/mmc/host/dw_mmc-zx.c | 6 +- drivers/mmc/host/jz4740_mmc.c | 5 +- drivers/mmc/host/meson-gx-mmc.c | 17 ++--- drivers/mmc/host/sdhci-of-arasan.c | 8 +-- drivers/mtd/nand/onenand/omap2.c | 5 +- drivers/mtd/nand/raw/atmel/nand-controller.c | 20 +++--- drivers/mux/gpio.c | 9 +-- drivers/net/dsa/lantiq_gswip.c | 8 +-- drivers/net/ethernet/renesas/sh_eth.c | 3 +- .../stmicro/stmmac/dwmac-dwc-qos-eth.c | 10 +-- .../ethernet/stmicro/stmmac/dwmac-meson8b.c | 9 +-- .../ethernet/stmicro/stmmac/stmmac_platform.c | 10 +-- drivers/net/ethernet/ti/cpsw.c | 9 ++- drivers/net/ieee802154/mcr20a.c | 5 +- drivers/net/phy/mdio-mux-mmioreg.c | 9 +-- drivers/opp/core.c | 12 ++-- drivers/pci/controller/pcie-rockchip.c | 66 +++++++------------ drivers/phy/amlogic/phy-meson-gxl-usb2.c | 9 +-- drivers/phy/amlogic/phy-meson-gxl-usb3.c | 9 +-- drivers/phy/lantiq/phy-lantiq-rcu-usb2.c | 8 +-- drivers/phy/qualcomm/phy-qcom-qmp.c | 21 +++--- drivers/phy/qualcomm/phy-qcom-qusb2.c | 19 ++---- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 8 +-- drivers/phy/rockchip/phy-rockchip-pcie.c | 9 +-- drivers/phy/st/phy-stm32-usbphyc.c | 10 ++- drivers/platform/x86/intel_cht_int33fe.c | 8 +-- drivers/power/supply/lego_ev3_battery.c | 24 +++---- drivers/pwm/pwm-rockchip.c | 11 ++-- drivers/regulator/gpio-regulator.c | 7 +- drivers/remoteproc/da8xx_remoteproc.c | 11 ++-- drivers/remoteproc/qcom_q6v5.c | 55 ++++++---------- drivers/remoteproc/qcom_q6v5_adsp.c | 9 +-- drivers/remoteproc/qcom_q6v5_mss.c | 11 ++-- drivers/remoteproc/qcom_q6v5_pas.c | 19 ++---- drivers/remoteproc/qcom_wcnss_iris.c | 8 +-- drivers/reset/reset-meson-audio-arb.c | 8 +-- drivers/rtc/rtc-rk808.c | 10 ++- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 7 +- drivers/soc/amlogic/meson-gx-pwrc-vpu.c | 8 +-- drivers/soc/imx/gpcv2.c | 9 ++- drivers/soc/lantiq/gphy.c | 8 +-- drivers/soc/qcom/rpmh-rsc.c | 9 +-- drivers/soc/qcom/smem.c | 8 +-- drivers/soc/qcom/smp2p.c | 9 +-- drivers/spi/spi-tegra114.c | 6 +- drivers/spi/spi-tegra20-slink.c | 6 +- .../clocking-wizard/clk-xlnx-clock-wizard.c | 16 ++--- drivers/thermal/broadcom/bcm2835_thermal.c | 5 +- drivers/thermal/hisi_thermal.c | 5 +- drivers/tty/serial/8250/8250_dw.c | 7 +- drivers/tty/serial/8250/8250_ingenic.c | 12 ++-- drivers/tty/serial/amba-pl011.c | 7 +- drivers/usb/chipidea/ci_hdrc_imx.c | 5 +- drivers/usb/chipidea/ci_hdrc_msm.c | 3 +- drivers/usb/chipidea/ci_hdrc_usb2.c | 7 +- drivers/usb/dwc3/core.c | 24 +++---- drivers/usb/host/ehci-mv.c | 3 +- drivers/usb/host/ehci-omap.c | 5 +- drivers/usb/host/ohci-da8xx.c | 6 +- drivers/usb/musb/da8xx.c | 8 +-- drivers/usb/musb/musb_cppi41.c | 5 +- drivers/usb/typec/tcpm/fusb302.c | 3 +- drivers/video/backlight/gpio_backlight.c | 12 +--- drivers/video/backlight/pwm_bl.c | 3 +- drivers/watchdog/davinci_wdt.c | 8 +-- include/linux/device.h | 2 + sound/soc/atmel/tse850-pcm5142.c | 32 ++++----- sound/soc/codecs/es7241.c | 13 ++-- sound/soc/codecs/max9759.c | 15 ++--- sound/soc/codecs/max9860.c | 8 +-- sound/soc/codecs/pcm3168a.c | 8 +-- sound/soc/codecs/sgtl5000.c | 5 +- sound/soc/codecs/simple-amplifier.c | 5 +- sound/soc/codecs/ssm2305.c | 6 +- sound/soc/davinci/davinci-mcasp.c | 11 ++-- sound/soc/generic/audio-graph-card.c | 3 +- sound/soc/generic/audio-graph-scu-card.c | 3 +- sound/soc/generic/simple-card.c | 3 +- sound/soc/generic/simple-scu-card.c | 3 +- sound/soc/img/img-i2s-in.c | 8 +-- sound/soc/img/img-i2s-out.c | 24 +++---- sound/soc/img/img-parallel-out.c | 24 +++---- sound/soc/img/img-spdif-in.c | 8 +-- sound/soc/img/img-spdif-out.c | 24 +++---- sound/soc/img/pistachio-internal-dac.c | 6 +- sound/soc/meson/axg-card.c | 7 +- sound/soc/meson/axg-fifo.c | 20 +++--- sound/soc/meson/axg-pdm.c | 12 +--- sound/soc/meson/axg-spdifout.c | 8 +-- sound/soc/meson/axg-tdm-formatter.c | 22 ++----- sound/soc/meson/axg-tdm-interface.c | 8 +-- sound/soc/mxs/mxs-sgtl5000.c | 9 +-- sound/soc/sunxi/sun4i-codec.c | 5 +- 159 files changed, 658 insertions(+), 1031 deletions(-) Reviewed-by: Javier Martinez Canillas