From patchwork Tue Aug 8 01:29:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liao, Chang" X-Patchwork-Id: 13345542 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7E02BC001DB for ; Tue, 8 Aug 2023 01:30:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=EPzMq3EtYvBZhdcJgSzEXIHyNmNNWYTrQtlKnjI+VME=; b=Ajoymp2EKq8YcE hZnT7dblmFS1vLxT04BXyj/mwSsOF75QxyPhK9XyMkgrBDrAG0xZlT5o8k3xAAY52hsKhWADMRFKb SiBes78Vx+oWU+r9zrJNjuHvqMMIM/cKTpKVw8Gii/N5kIoqHvyAPVRLpJkhFfbEeWUCu/tR8VT8u i3QF5v6sQrdQXba9DGDUEW9DCUMFmZ/FJ5MJnH3l9r0oaH73rf2FtL0tRWMVxjEWkBvEVbje3I1W2 KytDX2y0X3Mz2H4ye2SBmsfjHXXDZZVlP6PYMA+7FyQjN4WLa5/4e0t35g79EzIBdaeKJltgd7mKl aBEU67ovaouDfISPSpGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTBYJ-001Rky-1V; Tue, 08 Aug 2023 01:30:27 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTBYG-001RjH-09; Tue, 08 Aug 2023 01:30:25 +0000 Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RKbBk1fLsztRyg; Tue, 8 Aug 2023 09:26:54 +0800 (CST) Received: from huawei.com (10.67.174.53) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 8 Aug 2023 09:30:21 +0800 From: Liao Chang To: , , , , , , , , , , , , , , , , , CC: , , , , Subject: [PATCH v3 0/9] Use dev_err_probe in i2c probe function Date: Tue, 8 Aug 2023 09:29:45 +0800 Message-ID: <20230808012954.1643834-1-liaochang1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.67.174.53] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemi500012.china.huawei.com (7.221.188.12) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230807_183024_266597_EC9FF6AA X-CRM114-Status: UNSURE ( 7.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use the dev_err_probe function instead of dev_err in the probe function so that the printed messge includes the return value and also handles -EPROBE_DEFER nicely. NOTICE: dev_err_probe always print the second parameter that happens to be the return value, hence the return errno will be removed from the third parameter to avoid a redundant error message. v3: Convert all dev_err() in synquacer_i2c_probe() to dev_err_probe() even if the return value is known to never be -EPROBE_DEFER. v2: 1. Convert all dev_err() in lpi2c_imx_probe(), synquacer_i2c_probe(), mlxbf_i2c_probe() to dev_err_probe(). 2. Add Reviewed-by: Florian Fainelli 3. Add Reviewed-by: Yicong Yang 4. Add Reviewed-by: Andi Shyti Liao Chang (9): i2c: bcm2835: Use dev_err_probe in probe function i2c: mlxbf: Use dev_err_probe in probe function i2c: xlp9xx: Use dev_err_probe in probe function i2c: hisi: Use dev_err_probe in probe function i2c: qcom-cci: Use dev_err_probe in probe function i2c: pxa: Use dev_err_probe in probe function i2c: dln2: Use dev_err_probe in probe function i2c: imx-lpi2c: Use dev_err_probe in probe function i2c: synquacer: Use dev_err_probe in probe function drivers/i2c/busses/i2c-bcm2835.c | 14 ++++----- drivers/i2c/busses/i2c-dln2.c | 6 ++-- drivers/i2c/busses/i2c-hisi.c | 12 +++---- drivers/i2c/busses/i2c-imx-lpi2c.c | 12 +++---- drivers/i2c/busses/i2c-mlxbf.c | 50 ++++++++++-------------------- drivers/i2c/busses/i2c-pxa.c | 7 ++--- drivers/i2c/busses/i2c-qcom-cci.c | 6 ++-- drivers/i2c/busses/i2c-synquacer.c | 28 ++++++----------- drivers/i2c/busses/i2c-xlp9xx.c | 6 ++-- 9 files changed, 50 insertions(+), 91 deletions(-)