Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1586103rwl; Fri, 31 Mar 2023 13:30:32 -0700 (PDT) X-Google-Smtp-Source: AKy350YpnHGZp256BJz+Cqnb1n1Oi8EXj06mAdIMzR2mexUNVIbs8ZI86Hw7jWG8Mt8DspU+rMEO X-Received: by 2002:a05:6a20:7fa4:b0:d9:ec4b:82b4 with SMTP id d36-20020a056a207fa400b000d9ec4b82b4mr8197516pzj.1.1680294632552; Fri, 31 Mar 2023 13:30:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680294632; cv=none; d=google.com; s=arc-20160816; b=lOJblpYhwg4SluEWcRSLQdqgQAsqIi+fwv6HBukhsKnBK11fANLqL4I8427xTq5Lqw iDpu9KJS+7PUKYPSFEj/Jo8SfdZyzg3HHnoVh7jp0Dq+wXNncpAzMgisdv/lf8/tLOtR CSwZGitAuVKSaJp1FRU1VqUIVSKxKLi3QFjPTDkqsTpswTZk9wNRGEqLnIVaiETrD5DZ gmzf5He/qlEEAd3UrcgfRGD1RSdp7Bn1nXGD8QbM+LiPgqtf0qkn2+eU3TQeWsjwjMgR FJoWW/j8BdWZTCO57Pc6m8OTamoVphVgR4HW262Rplm5lUAnmmrPwNtuGN+ivrileh6b lpsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=F0rdfklWB+3ErIysI23wmhnI1b+cVI6AXoSFY0RGj4c=; b=ZcvNrySrML6lO+MHEnD0LWHXm8jAkqAK8AWhiAhQnOpKRjF6x/M1Hj6tzpE6z+ORpQ 4M+zKqWlEW2ApzSG/7QxRkttJZkvG1WoIRSEFG7WuUnHN+Fg6gm65w5Dd15WRR1kE5Hh nMCZlYQ0mdIxQAj6h0HAiCsO94yaqqXRh0hUxJH9TjEQofD/2N33tzF8lpjCozAcvFib inxDxT1nk5/O4Jmo7FahXGvItwMFDkUymjuaM1Ojw8Zhu3E2zdOZlow30TwvYpX0N9pO IbhCBweg5GVMzAeEZI6ETwlk6U7quQo8MwppCV/m7u0Y5k6nEJcKZxFMPfA6qH6dfyb+ Mf2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l15-20020a635b4f000000b005139d2b9306si2899819pgm.514.2023.03.31.13.30.19; Fri, 31 Mar 2023 13:30:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231929AbjCaUYF (ORCPT + 99 others); Fri, 31 Mar 2023 16:24:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232462AbjCaUYD (ORCPT ); Fri, 31 Mar 2023 16:24:03 -0400 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F34822205 for ; Fri, 31 Mar 2023 13:23:58 -0700 (PDT) Received: from [192.168.1.18] ([86.243.2.178]) by smtp.orange.fr with ESMTPA id iLHvp2hY8xuxqiLHvpWGqu; Fri, 31 Mar 2023 22:23:56 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Fri, 31 Mar 2023 22:23:56 +0200 X-ME-IP: 86.243.2.178 Message-ID: <4464e70f-71a3-3c04-7e53-8ccf2e143a04@wanadoo.fr> Date: Fri, 31 Mar 2023 22:23:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH 1/2] dmaengine: mv_xor_v2: Fix an error code. To: Dan Carpenter Cc: Vinod Koul , Rob Herring , Gregory CLEMENT , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, dmaengine@vger.kernel.org References: <201170dff832a3c496d125772e10070cd834ebf2.1679814350.git.christophe.jaillet@wanadoo.fr> <16cfc681-7a08-4160-bd69-4c8b59774688@kili.mountain> Content-Language: fr, en-US From: Christophe JAILLET In-Reply-To: <16cfc681-7a08-4160-bd69-4c8b59774688@kili.mountain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.0 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 29/03/2023 à 12:27, Dan Carpenter a écrit : > On Sun, Mar 26, 2023 at 09:06:37AM +0200, Christophe JAILLET wrote: >> If the probe is deferred, -EPROBE_DEFER should be returned, not >> +EPROBE_DEFER. >> >> Fixes: 3cd2c313f1d6 ("dmaengine: mv_xor_v2: Fix clock resource by adding a register clock") >> Signed-off-by: Christophe JAILLET >> --- >> drivers/dma/mv_xor_v2.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/dma/mv_xor_v2.c b/drivers/dma/mv_xor_v2.c >> index 89790beba305..0991b8265829 100644 >> --- a/drivers/dma/mv_xor_v2.c >> +++ b/drivers/dma/mv_xor_v2.c >> @@ -752,7 +752,7 @@ static int mv_xor_v2_probe(struct platform_device *pdev) >> >> xor_dev->clk = devm_clk_get(&pdev->dev, NULL); >> if (PTR_ERR(xor_dev->clk) == -EPROBE_DEFER) { >> - ret = EPROBE_DEFER; >> + ret = -EPROBE_DEFER; >> goto disable_reg_clk; > > Heh. Looking through the Smatch results, I don't think this actually > affects runtime because driver_probe_device() checks for both positive > and negatives. People shouldn't be returning positives, of course, but > it appears there is a work around for bugs built in already. Correct, but weird. I've tried to look at the history of [1], but couldn't find any rational for it. Apparently it was already in the v1 of the serie. [2] CJ [1]: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=45ddcb42949f825f0caa25352e825cede94b6aba [2]: https://lore.kernel.org/all/20210614150846.4111871-5-hch@lst.de/ > > regards, > dan carpenter > >