Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4709925pxb; Thu, 14 Oct 2021 10:22:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZCyW5xSwlHrbp8/qD85ZdvSAJb3PUMiPrAs3J+ckIG6bbXsJRKC5O5cIg5eqifvzWhkfr X-Received: by 2002:a05:6a00:1ad0:b0:44d:bd1:f392 with SMTP id f16-20020a056a001ad000b0044d0bd1f392mr6359903pfv.69.1634232130733; Thu, 14 Oct 2021 10:22:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634232130; cv=none; d=google.com; s=arc-20160816; b=kzi+WzwMlwWwK6W7zuyiFPRc4PiSaulfTNiPoNT3nMtAudjznW2EO7qk4k0n5G5WP7 2fKE9FszEt1HyxoHVWH4wheC1ucgpYNTc2lZZBOWGoV83rGc7YSA9HV+9Fz5+m3q7SsF z7BgArTYkXx3Sf1PQDIA54Qy70tMtjSHOTMYd8TpWrlHhvJhdoywPNkGlPhFixr0Oby+ z/jqqBAH/tLfTG7DXG5htx2hW70g85fyK1Gt43neaAM7E1voX5dffK+ITG1IIYAclbvc rowp46v6i7nDoe/OsFwSD6yBzTIV9SYiGpXSw7Tg9TzZCzUylkTz5rRs5Hjsuv+PTiky E6zQ== 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=ZiG0ub8OyszBcBFeyui1aGykhgLLVHZX/ajvzlvL0k4=; b=e9wZ2arqgTQ24+EDNpT8YqmROUR1YhtdTfVehMSwGYUhXeDY2HmdLGKFrAvMfsnlua Vmpuuzu+2VvNpJGQ8/l6pxhGBbAbwIZGswEXzc0bK4WNeoQuCQLwdeysVYpNOnNHSynB C4WaGzep2dbgxFoHxAdo6khGpg6HB1eQQcWBgnEOJFGWVioJvHDkL/7OyJCio/o9ohUj ADkxrJBiiZa4MOh+69DJEAH2gfxMQEzlXAuYs1D+uNWT02VIHb25aRxuRP544pp7JzRd S9AaALquDtU4mjz7bCFjv3+jdT9K4zJ6Z6l8lx4Vh1ZniPA6tbKbF00rwMZ53v2QLhOk +72w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i0Sni+tI; 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 u10si5355413pgg.339.2021.10.14.10.21.56; Thu, 14 Oct 2021 10:22:10 -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=@linuxfoundation.org header.s=korg header.b=i0Sni+tI; 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 S232739AbhJNO7n (ORCPT + 99 others); Thu, 14 Oct 2021 10:59:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:44250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232380AbhJNO6q (ORCPT ); Thu, 14 Oct 2021 10:58:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BE7A861214; Thu, 14 Oct 2021 14:56:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634223401; bh=Y4qvT3j+35BeZRrB7t9DXOF+Cor8kWff8qHy8u8g3/o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i0Sni+tIXCz9TFB/ggg16Bu8nLMwp1IRGf/IG2HVcdFwDDYwo4b1v3B/WSjqGsObZ UYYqI5r/xLxZfzQD5A5oaeBsgTwhLfy5ioY0M6Z/Wtgll8qQS5UJmcvnfZ9I6ByYU1 6YTCK2OBnL4UD9q0XUOaKYv9jzUj+ruCoGzaDePc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Abaci Robot , Jiapeng Chong , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.9 23/25] scsi: ses: Fix unsigned comparison with less than zero Date: Thu, 14 Oct 2021 16:53:54 +0200 Message-Id: <20211014145208.325960664@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211014145207.575041491@linuxfoundation.org> References: <20211014145207.575041491@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: Jiapeng Chong [ Upstream commit dd689ed5aa905daf4ba4c99319a52aad6ea0a796 ] Fix the following coccicheck warning: ./drivers/scsi/ses.c:137:10-16: WARNING: Unsigned expression compared with zero: result > 0. Link: https://lore.kernel.org/r/1632477113-90378-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/ses.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index 69046d342bc5..39396548f9b5 100644 --- a/drivers/scsi/ses.c +++ b/drivers/scsi/ses.c @@ -120,7 +120,7 @@ static int ses_recv_diag(struct scsi_device *sdev, int page_code, static int ses_send_diag(struct scsi_device *sdev, int page_code, void *buf, int bufflen) { - u32 result; + int result; unsigned char cmd[] = { SEND_DIAGNOSTIC, -- 2.33.0