Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp11765497rwr; Sat, 13 May 2023 09:16:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5eTI77IQ8KldTu5kTBO/w1wG2rmgxpGqpUb1OyMpd1UQT7qqUr280jDkRNL9Z7Z3Tx5Wcp X-Received: by 2002:a17:902:a9cc:b0:1ac:8837:de9 with SMTP id b12-20020a170902a9cc00b001ac88370de9mr18294925plr.3.1683994607775; Sat, 13 May 2023 09:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683994607; cv=none; d=google.com; s=arc-20160816; b=SwojttsIOQisHXdz9XfDpk8UkB8QCx6YyWLF9j4eU+84Qjm83Md+sS+fROgJHW3rka +IFOusUHVCvFilVssICo3DNq/S7WbFx6KZ7H4MP82sJVIgJkVIVKebUd5ExbhBSCHjgE MrJF1ff/RcJYKqqawt2Xp+ww+a4OJSrvK2QUpJVZ+bfk68r0L3Ar37x3rOFEoq77wNkK rp5Xv04J1SPcILR4bBgI0oy70QCb0ytytR6xFaRGMXwM/RuSsu9TqfrcZKxKWmlFqf5x QC7Gotpf9u7fOfHjb+uy4rU+s/N3fDs9fTKxr7/5Y8m73uXCjX+9UQ7G53eRKY954C6/ 0CNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from; bh=CqsPN9TzL/vvBD74stAZSPkv3IMrk3Aj4WIEF5A2N6Y=; b=LCmVdJayslmjwd/qrC5GyNIW5ZMcCxGlF+X7n8p1252rw+UB83DiIDK+JX8AW5f0s2 5iqUqfTx36fV1lVyNCkXTrRuMMq1yGtsRELSV78ppkCsOh86GCI4KiR5RtLfb6+NqQVA hYTGaEbw0ji3oHLjNkqNzDPYER6s1GsKZsWCJn3Y5J5SUtYt+MDXwUFYCwxH4CVgwvkE DRMkl2yCWHwGDa+wFIC9ynuIbZWLF5kihyu5GQDoDDotrhsoQ3I4PZsCRl8lWWV8Q3q1 LVHIYA+5DzUX0fuhj4Lkbwyz1goYni7fcp9WZYbqGvqEp7ApTsp9hUNs7xgwaJNMp8BU Lkmw== 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f11-20020a170902ab8b00b001ab1a00d95dsi11125785plr.250.2023.05.13.09.16.30; Sat, 13 May 2023 09:16:47 -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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239190AbjEMPOM (ORCPT + 99 others); Sat, 13 May 2023 11:14:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230133AbjEMPOL (ORCPT ); Sat, 13 May 2023 11:14:11 -0400 Received: from fgw23-7.mail.saunalahti.fi (fgw23-7.mail.saunalahti.fi [62.142.5.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96D2E2704 for ; Sat, 13 May 2023 08:14:10 -0700 (PDT) Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw23.mail.saunalahti.fi (Halon) with ESMTP id cad2b6cb-f1a0-11ed-b972-005056bdfda7; Sat, 13 May 2023 18:14:02 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Sat, 13 May 2023 18:14:01 +0300 To: Sukrut Bellary Cc: Mark Brown , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] spi:pic32: Fix missing error code 'ret' in the failure path Message-ID: References: <20230513122653.45226-1-sukrut.bellary@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230513122653.45226-1-sukrut.bellary@linux.com> X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no 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 Sat, May 13, 2023 at 05:26:53AM -0700, Sukrut Bellary kirjoitti: > smatch warning - > drivers/spi/spi-pic32.c:634 pic32_spi_dma_prep() warn: missing error code 'ret' > > Currently in case of pic32_spi_dma_config() failure, SUCCESS is returned. > Capture and return the error code in the failure path. The comment above the pic32_spi_dma_config() call on the caller side suggests that DMA is optional. With that in mind the current code won't prevent us from using the driver in PIO mode. > This is based on static analysis only. Compilation tested. That's why I think it's incorrect fix. You need to fix smatch. -- With Best Regards, Andy Shevchenko