Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9079702pxu; Mon, 28 Dec 2020 06:09:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxFVzhiBP1g/HD7UYjCIJlJvODOc2GmkBgGFnNE+kq+7JvCRRb6ZsDGpT+Oub8AuNdKIvn X-Received: by 2002:a17:907:700c:: with SMTP id wr12mr41050020ejb.398.1609164567590; Mon, 28 Dec 2020 06:09:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164567; cv=none; d=google.com; s=arc-20160816; b=BBTOY6G9zxJl8cGVFPAabnjDORBP2oezKuL2HI6ib6shgEfuINKqOE5Uy8z3zFEpqz UtwB4+NPzrEmcPIRiQruWG7draXiPpmrbEaB8C0HF4rqD4mxuMFkk5le/+G7A3eavvzk 3V5+JYGRCzfOOpciZBroUegh7nSkFGSO/Yw9yUJhTB6Ydyq6k4unEoIY2S3Oe0v/VA3G NKsVC2GUvbvMCFIGcLYtcr4F22QUIwZnKLjBWYPcCzyCIJQjaZKLRB70W0h0VbJKZJWY kCmbPYxeql2iAa7FuWuVXiBxoKlsz6jfNy/VjQQkmkNxjc7z5c9BLiyTOA41hyZX9al5 ib5w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cXtCKhL78g+EaKo7RquA2O22GFLXPBFJUNNZRPdBLkU=; b=S/MaakTH32oZMuFc3MxzXX90iBq7COWymfM1Y9aEd9gn3XEO7zy+sMePIIS57f/E8E ZPxV4P2py3tRKUCECRJ7/xdQ18fXjNY2uPnU1dryt9yg46e5o4DD0ApH/py/EW+xFUZL q+FbNM+t0cigyz/+yD8MyGrkHPwpKHX7WQIkK5Qwm5rHqON+TzR7j0ym22OyEWS0rfrF puLtIlw7sqVbaZ9RwsTpSJoLa0jjZWwVP1nCpfQIWdsJEdQOPhwRew/+jTfiMf8eGaov GWrtlKr/0sDs7DWzIVHUzVNxyUjJHPZZAcw86XQUOLQUGhQtpVk2YOH6R4ltgUhbdc8g g/Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VqLtjMIF; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq19si15663460edb.81.2020.12.28.06.09.04; Mon, 28 Dec 2020 06:09:27 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=VqLtjMIF; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438325AbgL1OHH (ORCPT + 99 others); Mon, 28 Dec 2020 09:07:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:40542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438131AbgL1OGa (ORCPT ); Mon, 28 Dec 2020 09:06:30 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C6EF42063A; Mon, 28 Dec 2020 14:06:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164375; bh=MzZ7h9ctZyv1mzlxSsyqT9WMgDm7u9Guw8r+0LU7aJA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VqLtjMIFytk5n2ryM9J1hhaidMrj7zs9c8xmO01cp9bulRrBSXMQlyFe4qfvqykT3 XxQ5Cbm/RmdaNN7TFCzYdDPKf4QRyx0Dd4NzIli+PUZn0LfABO8nE1SRHUyPnwzMQT dtGOvTkSOksEcwrFl+7JVehNnd40udzOlOIkZEz8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tosk Robot , Kaixu Xia , Andrew Donnellan , Michael Ellerman , Sasha Levin Subject: [PATCH 5.10 159/717] powerpc/powernv/sriov: fix unsigned int win compared to less than zero Date: Mon, 28 Dec 2020 13:42:37 +0100 Message-Id: <20201228125028.574300392@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kaixu Xia [ Upstream commit 027717a45ca251a7ba67a63db359994836962cd2 ] Fix coccicheck warning: arch/powerpc/platforms/powernv/pci-sriov.c:443:7-10: WARNING: Unsigned expression compared with zero: win < 0 arch/powerpc/platforms/powernv/pci-sriov.c:462:7-10: WARNING: Unsigned expression compared with zero: win < 0 Fixes: 39efc03e3ee8 ("powerpc/powernv/sriov: Move M64 BAR allocation into a helper") Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1605007170-22171-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Sasha Levin --- arch/powerpc/platforms/powernv/pci-sriov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/pci-sriov.c b/arch/powerpc/platforms/powernv/pci-sriov.c index c4434f20f42fa..28aac933a4391 100644 --- a/arch/powerpc/platforms/powernv/pci-sriov.c +++ b/arch/powerpc/platforms/powernv/pci-sriov.c @@ -422,7 +422,7 @@ static int pnv_pci_vf_assign_m64(struct pci_dev *pdev, u16 num_vfs) { struct pnv_iov_data *iov; struct pnv_phb *phb; - unsigned int win; + int win; struct resource *res; int i, j; int64_t rc; -- 2.27.0