Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp6045lfv; Tue, 12 Apr 2022 15:01:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqyOlzxAI3Np0BwX+QEeU7YeQy5SbX7+kGkOEwl01kqweZv4wTaRHrD/Dl1xtuatx+JOl9 X-Received: by 2002:a17:903:249:b0:153:857c:a1fe with SMTP id j9-20020a170903024900b00153857ca1femr39597270plh.44.1649800882199; Tue, 12 Apr 2022 15:01:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649800882; cv=none; d=google.com; s=arc-20160816; b=wLiaDjbuMQuWWyQm+JtFUVnHQcSNfoY6CzEWd9UyoDe+yQq8Vp1RIDKYgSYBPeU6Kz vwQ9VIm7/oT92qagVxrYJeMOI21QpuulnbR1H4SQZbGD57HZlhfqvkm8QOqjq4zJgGzL spMJOkSKKbfSsOepFBdzEHUp6q1KuINz45r+BBc3ZIMghIV9sfD33ItkGS33PXQyZVpB Bjo0GnzQfPCRxjlcE+4HQEXuhR2rxDIxBxQuwxBryO4CkxGrfbEfONkzD15pNxRBuu1G R0EEdgPgoomaS9DOQlifFPHDmQsixAgBzCG9QPuv3nd0Qxjm4pxyiLzdkpy2Zu/1B0mT CWHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=e2IhvkA3kFkcBeSMk26cyJPywicAzd4ORpiA8q0a63Y=; b=mJMKiBGo6kDYULsELp5j9XWUfB+3p3ozKHK+rlCuYcJhC02uliCdshDddy1VXiDPfJ wqjSIsijmmIG8+em2Tc+CEQ2eK7yAB8YfEUsZ2+0qqfEJ5MzV4b2iVSYzSt41agQm6Nx mAnmTD9faDZRZEM2mkPJXUXnZ+Qz6FGWccg7XA+erpIazqwNsTRMxW9CN6P8gjtZ297g rEfAvUckAFY8kSYXPeIazuioEmjdEh35K5ES8GLp+6GZ9ksQZJdxNEid6dtIDaOvn8aQ YeLc6kYQZ3nqjVpW8s7BSY0Pot+fzuEeXDuzhUc7CxY+prOUGWNaflSV/a99Zqw2+rLZ 27wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="t4/LuF6X"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j5-20020a056a00130500b004fa3a8e005dsi13823893pfu.276.2022.04.12.15.01.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 15:01:22 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="t4/LuF6X"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C4C3B14D7A5; Tue, 12 Apr 2022 13:53:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348450AbiDKQLC (ORCPT + 99 others); Mon, 11 Apr 2022 12:11:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348414AbiDKQKg (ORCPT ); Mon, 11 Apr 2022 12:10:36 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EC2D1FCEE for ; Mon, 11 Apr 2022 09:08:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 66CDDCE19A1 for ; Mon, 11 Apr 2022 16:08:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3FF0C385A9; Mon, 11 Apr 2022 16:07:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649693279; bh=e2IhvkA3kFkcBeSMk26cyJPywicAzd4ORpiA8q0a63Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=t4/LuF6XIMKp1EVb9Hl7NLIKOFo6cJ+UreZ8m5PrRymVqS8ORdAReywOXvqZXY384 x1tYaEKQb01YDmIo7GVXNTN+9/uxTZQi+KwQuXWBD5BAiv0KpEXBPz4IgfUmhXSro/ xTkO/tXbRgMfuh5NHKT0ruwLQXSp6iFl1RGyEyPtf+x/AgPQWMaSW727ilMdhNy2bh 96XB4JxnCumMSOPKR2b4sicwEl4sjZ5RLTsMcb9CTJMOD2z7liM2EcXFFWS7NjS88A Jfn+KVQwaTne4/9E0m6xWKXXR+hUqcgWKCPUfyQL7QnhNiGe026zdcEutX/f96wafn HXO0SpSg34dsg== Date: Mon, 11 Apr 2022 18:07:54 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Miaoqian Lin Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: Re: [PATCH] firmware: turris-mox-rwtm: Fix return value check of wait_for_completion_timeout Message-ID: <20220411180754.5b7ab6da@thinkpad> In-Reply-To: <20220411104539.17971-1-linmq006@gmail.com> References: <20220411104539.17971-1-linmq006@gmail.com> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 On Mon, 11 Apr 2022 10:45:38 +0000 Miaoqian Lin wrote: > wait_for_completion_timeout() returns unsigned long not int. > It returns 0 if timed out, and positive if completed. > The check for <=3D 0 is ambiguous and should be =3D=3D 0 here > indicating timeout which is the only error case >=20 > Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver") > Signed-off-by: Miaoqian Lin Reviewed-by: Marek Beh=C3=BAn