Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4111884yba; Tue, 7 May 2019 12:17:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrvVy3GGkzNa7AeSBUdmpiThb6E2iukwP0OGPT5E1ITIgdI5nKcPvJVbpJuTuaaY6rzSNv X-Received: by 2002:a65:4b88:: with SMTP id t8mr41466632pgq.374.1557256642820; Tue, 07 May 2019 12:17:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557256642; cv=none; d=google.com; s=arc-20160816; b=luwV5bB1VVL3bRwua6SOK4khQ8jBbU3JR4OUH0Q4S15XxXErg4AHgXO3QyDJH3Z2rg XKe58T4ys+miToI3Hr+VBvLpgt4P/sRvI3gbKk5mLOZpOdjuq7nVo2Wa3/5PCMCDVxMl dJUYUpeTKGuHakhimlZR7f1hB5jKJAvXdameYZCpD3TJ90Xbqj3mTjWadXHleMjJFMPT br5+RmP8n+aaKz+9DopI2c0aZATlSQZDcgXtaGFDUwfMHGMYH95aWHqf1NYrtjGo0SQ0 mHA26M7YFATn8jQM0bp2BUYSwWzRpZ1T9INB9Q/5JklBVRj2Ie/PhRWAB9pYoEum757D lw1w== 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 :references:in-reply-to:from:subject:cc:to:message-id:date; bh=2KuqWAWwFGDS0MeNd5UAcbnSM9+iOSnodq3nYFFjGpA=; b=awy24DvZ5Wx41wfowRYs3QI4obwd48/4PzjcffMhMdWxOvxP7xWfD+Sk7hHAC3kAKu UwnL0udaD79Zue1OTbc4DmdqDkgeMVKqQ7wKHrjnAz5EZ/c1IdDO66d8TurhEUghrqbu QSY7CfgroaqZYl9YTWOOIK09DWpJkLu0z7XjhV25lHCyGPOVXyQXV8BfZ9vC4eS2lH7M 7XbNX0mU0cYcnC/f0rZ8r9PDs+kB8kvcuGZHOzmoRfbsiTFdKSQCEGj7CI7YVivL9faj LQK82bmC1zu2OzjoFJu358Ai3543PXfHWv3eyZ2aht6mPZpRZ/nnWeqIwoQvbSi5DgoP TEKA== ARC-Authentication-Results: i=1; mx.google.com; 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 g22si11293854pgb.107.2019.05.07.12.17.07; Tue, 07 May 2019 12:17:22 -0700 (PDT) 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; 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 S1727025AbfEGTPE (ORCPT + 99 others); Tue, 7 May 2019 15:15:04 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:33030 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726091AbfEGTPD (ORCPT ); Tue, 7 May 2019 15:15:03 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::3d8]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 4114A14B666A1; Tue, 7 May 2019 12:15:03 -0700 (PDT) Date: Tue, 07 May 2019 12:15:02 -0700 (PDT) Message-Id: <20190507.121502.2281459100872862589.davem@davemloft.net> To: colin.king@canonical.com Cc: maxime.chevallier@bootlin.com, antoine.tenart@bootlin.com, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] net: mvpp2: cls: fix less than zero check on a u32 variable From: David Miller In-Reply-To: <20190505213814.4220-1-colin.king@canonical.com> References: <20190505213814.4220-1-colin.king@canonical.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 07 May 2019 12:15:03 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin King Date: Sun, 5 May 2019 22:38:14 +0100 > From: Colin Ian King > > The signed return from the call to mvpp2_cls_c2_port_flow_index is being > assigned to the u32 variable c2.index and then checked for a negative > error condition which is always going to be false. Fix this by assigning > the return to the int variable index and checking this instead. > > Addresses-Coverity: ("Unsigned compared against 0") > Fixes: 90b509b39ac9 ("net: mvpp2: cls: Add Classification offload support") > Signed-off-by: Colin Ian King Applied.