From mboxrd@z Thu Jan 1 00:00:00 1970 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 CED0CC001E0 for ; Wed, 9 Aug 2023 08:03:23 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HT7jYKx1Eq097PWpVvXz0wP03df/XMPGxVVVWwjiSY0=; b=RbZ6JF4j8Z5uWQ qtpumZ2DloJPFiSMkuFSvOYT7HIbnNW37GdfF+HyKDMg1JUpZ+ihbaELqmXrr11B+ZmEtY3GmbObO TpZnhPopsVxPB23qUHx3DTKk5O2WBU/BrBWLgfp0NJCa1FYMjpawlmtFXDU81eU0E5p+8KxcKmT3I /XXRymOljWaHOvrlIkY+tGo7bEOLEFniQhf23+h8on65ctE1/Bhod9tztJhjsVh1TE1Vdnm0XqkFz Fc4wlDWX+ZxdRuYCP877WioY3e2ZxTCpq57e2GA4zz8XTTXA2TXlVwYSbNBoFeVZeqcmtfaTWpTrh C5DXynVjH+/p92HavD/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTe9P-004Jzr-0d; Wed, 09 Aug 2023 08:02:39 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTe9M-004JzD-25; Wed, 09 Aug 2023 08:02:38 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BB71C61A40; Wed, 9 Aug 2023 08:02:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE382C433C7; Wed, 9 Aug 2023 08:02:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691568155; bh=RGgJ0entgYCUagS5IzNaQUQFxxpHtnwZKXcXxBX55aM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aWxue7mmxXai4i8fgyUFTZKxRBVv1/eUfvCc7lWWn2/v+T0dDw2LxQYk1uDpj2GDQ wtW15wbExemCPVVQ8H/QGuw6++ZOLgmYUTslvFmyB+t8FNEBur6NT49BuqXnHTt+2f 8QMArWscV4SzexKiPmRaE5A+Ka2uaoVIRINY4mPczoVblhGYRDbLzUZU4bvQor8pdl VJyzGsoOQw39qCl3tZdUQfvqwrDY2TvEANwOOn1ZU5Ak71uN1As0sZtXpakY5AvmzQ rW0GVi3ZrJpmHN95yOcyyafSlIM6xKdow18d9xmcFwvRStX3sR7oEZy3LwVCaXptS3 cGH26QCe8gBag== Date: Wed, 9 Aug 2023 10:02:32 +0200 From: Andi Shyti To: Krzysztof Kozlowski Cc: Liao Chang , florian.fainelli@broadcom.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, yangyicong@hisilicon.com, aisheng.dong@nxp.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, kblaiech@nvidia.com, asmaa@nvidia.com, loic.poulain@linaro.org, rfoss@kernel.org, ardb@kernel.org, gcherian@marvell.com, linux-i2c@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v3 2/9] i2c: mlxbf: Use dev_err_probe in probe function Message-ID: <20230809080232.ktoryciynfuhnmnk@intel.intel> References: <20230808012954.1643834-1-liaochang1@huawei.com> <20230808012954.1643834-3-liaochang1@huawei.com> <20230808112907.4rnvmyha4v6cg5ds@intel.intel> <29e20953-5660-079e-2136-0962eec9cab5@linaro.org> <20230808114706.g27gy3rajqvjykce@intel.intel> <7698ce68-c393-d566-25b9-7b2a08dd8274@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7698ce68-c393-d566-25b9-7b2a08dd8274@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230809_010236_769863_59325D64 X-CRM114-Status: GOOD ( 33.02 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Aug 08, 2023 at 05:55:29PM +0200, Krzysztof Kozlowski wrote: > On 08/08/2023 13:47, Andi Shyti wrote: > > Hi Krzysztof, > > > > On Tue, Aug 08, 2023 at 01:31:31PM +0200, Krzysztof Kozlowski wrote: > >> On 08/08/2023 13:29, Andi Shyti wrote: > >>> Hi Krzysztof, > >>> > >>> On Tue, Aug 08, 2023 at 10:36:40AM +0200, Krzysztof Kozlowski wrote: > >>>> On 08/08/2023 03:29, Liao Chang wrote: > >>>>> 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. > >>>>> > >>>>> Reviewed-by: Andi Shyti > >>>>> Signed-off-by: Liao Chang > >>>> > >>>> ... > >>>> > >>>>> @@ -2413,10 +2399,8 @@ static int mlxbf_i2c_probe(struct platform_device *pdev) > >>>>> ret = devm_request_irq(dev, irq, mlxbf_i2c_irq, > >>>>> IRQF_SHARED | IRQF_PROBE_SHARED, > >>>>> dev_name(dev), priv); > >>>>> - if (ret < 0) { > >>>>> - dev_err(dev, "Cannot get irq %d\n", irq); > >>>>> - return ret; > >>>>> - } > >>>>> + if (ret < 0) > >>>>> + return dev_err_probe(dev, ret, "Cannot get irq %d\n", irq); > >>>> > >>>> I don't think this is needed: > >>>> https://lore.kernel.org/all/20230721094641.77189-1-frank.li@vivo.com/ > >>> > >>> Hmm, that's a bit borderline, I'd say. The change to > >> > >> What's borderline exactly? devm_request_threaded_irq_probe() is coming, > >> right? If it is accepted this hunk is useless and soon should be > >> replaced with proper one. > > > > Such change is out of the scope of this series, there are two > > options that I'd prefer (in the listed order): > > > > 1. accept the patch as it is, this patch is not sent today the > > first time and at the current state it's correct. > > 2. not accept a change on this line > > The 2 is what I commented here. This change should not be made and > instead we should just switch all such users to new API, because this is > preferred for all error messages, when applicable and does not result in > lost context. If there was no such API, sure, but we have this API coming. To me the patch is correct... I am OK also with 2, but I find 1 more complete... let's say that it's a matter of taste? > > Replacing devm_request_irq belongs to another series and, > > besides, I don't want to ask Liao to hold on this series for such > > trivialities. > > So the comment about this redundant and unneeded change, thus switching > to new API you call 'triviality' but a comment of yours of changing the > tone of error message to 'please' is appropriate. > https://lore.kernel.org/all/20230807231320.svssge6uymw3jiho@intel.intel/ > > That's double standards. That was a joke, the review was somewhere else in my comment. Thanks for your inputs, Andi _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel