Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp81173pxb; Tue, 17 Aug 2021 19:50:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYCjcFDYqfkmBN7IfQlreC8K8bMAovOv0swUb2p5/hnTzpmmva47P07oOM/W/j5rC/Virj X-Received: by 2002:a17:907:9604:: with SMTP id gb4mr7454787ejc.142.1629255007741; Tue, 17 Aug 2021 19:50:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629255007; cv=none; d=google.com; s=arc-20160816; b=N/DgC2+6Y1ZaLhxIR1jDE6SMlF4vyitnwfE56PWNjIpPZO58nKNRP59tc01aPeBJKE 723iOmDDMJx+nme79ZK3JX9bhcaBXG57elKrakzz/OvtUE8rlZRVp68PNW6n0Txr8gb0 YEAc5zZmzBfEK+SHsTgPMLteZaol7v7WrS69F/MttN09IrWfkMWz2CSoBIEc5LDxjp34 kkCrvYgAYzm8R5lSxW8LvbRiDxZ9qftQveuFN3Mic6YfNbr8eaxkRWJL3MtN5ZnXgeck bV35E1iFQ5BEOuN+ov1e/8VBcLC0XK613KU6VxOeurD1+SsSzC6zdu2wmiVNOHnx8tLY OZqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=JV9CkkXQherlLd92QHiaKdeY0xjPOTwuWMHEmwKi7Ik=; b=GpF5hULL26MKrxsJTphhIJ5LCtPOQEyHUUVZ6ydgWrGrm+7fXlUdk883U9Sn2Lb9vj niQb07+DX/Kllaw5LfFILWdA7tLLVLtNqvVnQ3tHQw77gJgoZIbsA2top0q8yZ3Bos+I wVOmizp536f47oKE5uF2a5rqElsMJ9xpH+lSnLUA8YZZWFitliBo6V4jXKwtN4BHMT4U 73nRt89Fcsw+NjV3WLerhX4c36IaBHo5YG+UMFSj+4R9NF4CwKMu3h8PZ4CizO2WfIEx aVWnpqFltVrrWa2yiIOET8hKYnTI/aMy4Zq/0F8jdyg8R17iyiRc6TRcGh1tRjH0+9hl 6PcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gH1o7HXU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bo1si4057197ejb.535.2021.08.17.19.49.44; Tue, 17 Aug 2021 19:50:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gH1o7HXU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235650AbhHRCr4 (ORCPT + 99 others); Tue, 17 Aug 2021 22:47:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231449AbhHRCrz (ORCPT ); Tue, 17 Aug 2021 22:47:55 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92071C061764; Tue, 17 Aug 2021 19:47:21 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id qk33so1735138ejc.12; Tue, 17 Aug 2021 19:47:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JV9CkkXQherlLd92QHiaKdeY0xjPOTwuWMHEmwKi7Ik=; b=gH1o7HXUHZ9yBstJRfMaB5RBp6WJl/jOcZOajXqQbt1ZDgzlCLKHH1DppvQQqtuPWS rejnTSTM2WEpJVbaSWxMaha7MjFV14asN7I4thA4spu9fN9Jw7cg+ntHLicmmGp6oYu4 Cn7sPAt+/IeeyE282KiQclwhcA9hMWvIJfUZMKRhGLxVwGcHhH/INVJVjC1VnoMChRIB 7eDziLWZMJLyomKg5tRpAqTo24bN+rw1mc+WHgHz/RJNOEK0XPiy15ehVJ+gFbKELe0W kpYv/SzePNoKg6Xo5+fBszHkfkUbzw5w9sG3s7L/dK4P4DV6+geMCugHzoz66uxNzVj7 dalA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JV9CkkXQherlLd92QHiaKdeY0xjPOTwuWMHEmwKi7Ik=; b=BynuFHYI6VlVvQa0VetYs/1IVOxRbUckbiFfDXig21yuTHoPWPVl34PoCNhueryAkE AxdNUfzUP2sQEQ0OM6JdLN/S00+36LFFLJynuBltyqcHtxxcTOH9rWm33n607f+vFynV Tfm8FPCy5Q++h40uShGhI79dn3BvitpSgbitsF6aqCA146OvcU/aOjMG+muSSuU8wbM8 BFKmwg91ZB2xqqeHECQUcVOJWIOhb8RAnxqzonqgMll90dLw8rnLEKuRbywj8D8iLcuP Y/sFNVH0JuNT8SHQ/PcwyDE3nBELa52ynq0bqkbt+Iix0dxyzrJlEO1gMMITKRleERK8 o9ng== X-Gm-Message-State: AOAM532+EZeWTKT3sBpct+kyIO1gKG6nIlTyQcOQkVilHM7pf3f9WqW8 aWyrQfwZrzjQk3iCKLgC/2+1LwtkJwX0XuMnYd+zx40+ X-Received: by 2002:a17:907:2b09:: with SMTP id gc9mr7477125ejc.49.1629254840066; Tue, 17 Aug 2021 19:47:20 -0700 (PDT) MIME-Version: 1.0 References: <1628836842-82107-1-git-send-email-jiapeng.chong@linux.alibaba.com> In-Reply-To: <1628836842-82107-1-git-send-email-jiapeng.chong@linux.alibaba.com> From: Moritz Fischer Date: Tue, 17 Aug 2021 19:47:08 -0700 Message-ID: Subject: Re: [PATCH] fpga: machxo2-spi: Fix missing error code in machxo2_write_complete() To: Jiapeng Chong Cc: Tom Rix , linux-fpga@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 12, 2021 at 11:41 PM Jiapeng Chong wrote: > > The error code is missing in this code scenario, add the error code > '-EINVAL' to the return value 'ret'. > > Eliminate the follow smatch warning: > > drivers/fpga/machxo2-spi.c:341 machxo2_write_complete() warn: missing > error code 'ret'. > > Reported-by: Abaci Robot > Fixes: 88fb3a002330 ("fpga: lattice machxo2: Add Lattice MachXO2 > support") This shouldn't line-break. > Signed-off-by: Jiapeng Chong > --- > drivers/fpga/machxo2-spi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/fpga/machxo2-spi.c b/drivers/fpga/machxo2-spi.c > index b4a530a..ea2ec3c 100644 > --- a/drivers/fpga/machxo2-spi.c > +++ b/drivers/fpga/machxo2-spi.c > @@ -338,6 +338,7 @@ static int machxo2_write_complete(struct fpga_manager *mgr, > break; > if (++refreshloop == MACHXO2_MAX_REFRESH_LOOP) { > machxo2_cleanup(mgr); > + ret = -EINVAL; > goto fail; > } > } while (1); > -- > 1.8.3.1 > Applied to 'fixes' with modifications to commit message, Moritz