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 1BC9CC04E69 for ; Tue, 8 Aug 2023 15:56:11 +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:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NTtNZeUDoX17k59QXw8hVVrObR9Aq3IdQ0SknHZrDBk=; b=UhcGJMEfiLFXRS EBnbbKe8tIjIADt6AzZylkvyqzLtsOinxWHGSNO7E3Tu2GXd4hrBuAaWosv3peEcJXU1IX9oEGs98 DISmcO5kct/LvvPct5ScRyFFmvrcntWxIGr8UdROdmY5nMrBGRcMSzsfZRW0Be5Pg21JD1O/d8iXf q4n767rS5VxWsU/6QogW3V4GIyHA4cv0M/0jtP/7p3fbY189WGIkeAuzkCkBLsFT3RwdFfw1DI7Vx tgUDByb3hEs9OArE2tpeRIhcNDEjydkOV8xnUfozuU+0Z+pcXP6FBnG/LvG0fjvZEZFcR74FbSrMx nnoNpfuGJkBVoQh0b+5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTP3d-002rP1-1x; Tue, 08 Aug 2023 15:55:41 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTP3a-002rMd-1E for linux-arm-kernel@lists.infradead.org; Tue, 08 Aug 2023 15:55:40 +0000 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3178fa77b27so4835093f8f.2 for ; Tue, 08 Aug 2023 08:55:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691510133; x=1692114933; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=rVTTn1AZhgKJEPeBZ7tIT6HQycZWcyfVoqPDmg5RGC4=; b=EaQGXIPQ3j4vzWDTfWQhmgqY1GD88nEnrxhRrg/4Gcf1jwlXlMQP9aWomOPdrM5nFO RywJRevD93f+VhA3MQgZVVeX52fNMrDqIjKGpvfCdNVB7tSg58HtAylh4APPhM27zoot i2anFqi87KoD0B0O+1uXw/s9SAYWTcqHf8sTtSQdMu+N6cy6CGbvIfhNblx821NkAiIu uyU1INw92dwgLUIZvBdm0Nvha7P0ylmMZfNmLVGtj3K9YohfsSOHa5BOoT45m89pujHg jlhTLBUP64tjeWoJI7D+4M69Ge5l1zyiKZMFhL1uUyV2pUZwz2OglZkp5U/ZDnNJa8D/ FvWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691510133; x=1692114933; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rVTTn1AZhgKJEPeBZ7tIT6HQycZWcyfVoqPDmg5RGC4=; b=dxSUAzSYmh9/HdtdVJVADU/miD4ACPhG62hjLoVh+liK5munjI1Qrru+WtIvOWrIXT Kp9kATJb7AR/3aWHMXTrkK5PvBefnZXerQLa8dJpSWqq6S4jjE+hsUlncPHQAr0VJG3c +qIih1rJjtg+D1CbtoqeYKjob4uopkJaUAjtbogj0FpWYbMq9RGOGMzumtkTygeUJSf1 4q5Xg2PYzLol5xOSkMgcJrVOmQUhtqLoUbwNya7S2J4OILhQjdwzUY0ZmdPXvN/g+MiR DXZ99taCn0VZpdv98R1HUiMdRrDsoJRjrhLVu/DXO/Fj2q2tIEMRETaMY/Vl4DRBBzgJ JeyA== X-Gm-Message-State: AOJu0YxjMObQoHGPa92PelBGUXe0k5lRFLeWA9I52S0uO06oV/i9samD DdkBoRbBX11Ebs7ArqS+tOfLEA== X-Google-Smtp-Source: AGHT+IGpiD830YQ5k6d6CQ5DckWiWf96jV+8KhexPtwkxYkpVDql5DrULb/UEUFZH/jZ/IltlIY3WQ== X-Received: by 2002:a5d:4d8a:0:b0:314:15b7:1fb5 with SMTP id b10-20020a5d4d8a000000b0031415b71fb5mr8767362wru.34.1691510133363; Tue, 08 Aug 2023 08:55:33 -0700 (PDT) Received: from [192.168.1.20] ([178.197.222.113]) by smtp.gmail.com with ESMTPSA id x21-20020a05600c21d500b003fe18d03188sm14189615wmj.17.2023.08.08.08.55.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Aug 2023 08:55:32 -0700 (PDT) Message-ID: <7698ce68-c393-d566-25b9-7b2a08dd8274@linaro.org> Date: Tue, 8 Aug 2023 17:55:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH v3 2/9] i2c: mlxbf: Use dev_err_probe in probe function Content-Language: en-US To: Andi Shyti 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 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> From: Krzysztof Kozlowski In-Reply-To: <20230808114706.g27gy3rajqvjykce@intel.intel> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230808_085538_429262_80D07B2E X-CRM114-Status: GOOD ( 26.96 ) 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 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. > > 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. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel