Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp486617ybl; Tue, 28 Jan 2020 06:42:59 -0800 (PST) X-Google-Smtp-Source: APXvYqyJ0iaBW6FP5xvAXEEm43tazsWqhf88wwHIk8WKe9wzAZYZ8QpGE7W47XozWoikQaej/EUd X-Received: by 2002:a9d:7593:: with SMTP id s19mr15807290otk.219.1580222579180; Tue, 28 Jan 2020 06:42:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580222579; cv=none; d=google.com; s=arc-20160816; b=fBflDz5A2nteypUp3gOCYwfKx/9CCxf/jGlQ/9rnjv7FlPdlzODm5BJ+jbkdwqnqXv SWet6TIEATM2DRDa5bBdvnyI/rpZI+ZZ3MwLTs9YyyqewcKsqOTEtFSUvNHnBIAHP0n8 jW44Jfn8zHfLxZbyuptzo+IY9pNfwAiRSPZXuxZsHJGh5YFrJWbhEScunbfnhw3vCOEh FunNgvsI8pxv5nqs/m9aAe1ZCL/lenLHEA5mF43NvyDraW5R5ViZJyNYidiYo4FqnQwU xYBhxc/mkoq5z5j3D9nU6tiWCM1bAIIxeGUWnyb2PC8XIrAAabEV96uto+pAgJua2U+L cCzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tEhh1uyx9qa/MiGFgBr7340G6ORcciZxCy+bbO1f0Q8=; b=0Wfui0s/d5+I6SQxp6WsxHCkiL1egInHMU/wINBKv+7dbu5a46B0FGnio58+9oCZUs /dhizezd/1ELljX1ned/u2nuAY+y1+dBoA8A+36Vsmswbq6bK37j16dttBXzH/mhzKHS lawEDXlrExbLJmQ2VM+0JmI+QywT08K9MF+hJ7v9X1AwFj7EB1E5oVOb3mtSW4ADILhY BSZbst3w0f3esPBciYp8OCy2TSi3NU34N240BkLppRvx4e5UGWaK2Z6APUNmZzC4Jyg6 LcyJjTpeqFdTYX9JjZWZHJmPMJLWrsHns96KDzs8m9b4i1HV+UyibB5K/jW1bKXMzXLc V/8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bIJV6RSA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q127si5244729oic.99.2020.01.28.06.42.47; Tue, 28 Jan 2020 06:42:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bIJV6RSA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730206AbgA1OPy (ORCPT + 99 others); Tue, 28 Jan 2020 09:15:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:38744 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730198AbgA1OPu (ORCPT ); Tue, 28 Jan 2020 09:15:50 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DF4822070E; Tue, 28 Jan 2020 14:15:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220950; bh=A4VOQoF9dWI8S5tSrJ048hbisbbfIjDHmUMOCk3lkHE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bIJV6RSAhOLNtrf0sb7c3S8qCNEFlBi9H9uOxByJ65ESJ0QSa9jDCRDmxRFgxQpGO hJ4DKzJDzM7Bh9WDci3NOUXUXFmgSNroklLtu9nhp8e3gyDWz9SQvrYyGTg0EA/Rh5 cfuNR/32HHp+4AYdgDbDZdeoj9hnB19xmHmUfKyo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jakub Kicinski , Lorenzo Bianconi , Kalle Valo Subject: [PATCH 4.9 003/271] mt7601u: fix bbp version check in mt7601u_wait_bbp_ready Date: Tue, 28 Jan 2020 15:02:32 +0100 Message-Id: <20200128135852.655913475@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135852.449088278@linuxfoundation.org> References: <20200128135852.449088278@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lorenzo Bianconi commit 15e14f76f85f4f0eab3b8146e1cd3c58ce272823 upstream. Fix bbp ready check in mt7601u_wait_bbp_ready. The issue is reported by coverity with the following error: Logical vs. bitwise operator The expression's value does not depend on the operands; inadvertent use of the wrong operator is a likely logic error. Addresses-Coverity-ID: 1309441 ("Logical vs. bitwise operator") Fixes: c869f77d6abb ("add mt7601u driver") Acked-by: Jakub Kicinski Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/mediatek/mt7601u/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/wireless/mediatek/mt7601u/phy.c +++ b/drivers/net/wireless/mediatek/mt7601u/phy.c @@ -221,7 +221,7 @@ int mt7601u_wait_bbp_ready(struct mt7601 do { val = mt7601u_bbp_rr(dev, MT_BBP_REG_VERSION); - if (val && ~val) + if (val && val != 0xff) break; } while (--i);