Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1462055pxb; Fri, 24 Sep 2021 05:13:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS4wUv9IJLT8RR+FkSBvs2yfpbkV8E+rieWVlNzb4jTULKtznIMWMbr4qK5XfCQbjulQMD X-Received: by 2002:a05:6e02:1c04:: with SMTP id l4mr7908969ilh.83.1632485603652; Fri, 24 Sep 2021 05:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632485603; cv=none; d=google.com; s=arc-20160816; b=AP52+zO81/L5NYme+jNz6Ed19H18+fSa8QoisKTy2/oyrmtYNK2O2tQqWqoZ3ivfos ejdhKgQ1Q70AL89pVjcwekWXXFi2LxqTUJumhsm1/zTI9jiTctklOzkJDI5cEKTdXsZH PvIYlNkvXGVDq/XJAY1Cew5GuT4u0kFpH4yEkrC9ay/CmmBjObl73gBJseTVD8QXPYlu GKvrPB+JaC4MWc3AIWIftynvcbLpp+ik1VvlMfETPj4mJxtfXs5xUXVlAaqAxLmaiTT1 S92bfylTdICY2M+XLk/pfkDw7M8EDKZ3WeEXBwhtCZC/a5KJS+YThdnL+PzFpVBPtLpD 7O0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=rZUbWzyk+bKFeEsWbnulGtJBdHyprhRBU8/L04oc5Lc=; b=zd41amzH9mRu0c6/7ON61/ycKc20bdaeboMOl01IPrFkiV+UEejgCLwxD/BqTQCPcq lqpGo3oIDKNdHzS6KFPqRw1F5kI9OhioUoOJChtRYMdQY3vZtvDuYA85nkuVewZbIQlL 0p3Cgou6dA37fB/0k3c0ftpgeVp18pAIUM1x6kqV3uK0R2ihVepbrnR1ZzRbWGnPY5uo 9XHhkxocomVneNF5GaOdfz3CI0cWTHCXF0Y3++x8OONmZKm1SI5hUQvpqVh5miPMsQ0k Bc3ZY4b5IZV/iTbc+hXsqa3k4NjtQNsjwnaXPA6+NU0dkSgAMdJGcUxY0lp6l22AoRVk Q18Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w13si11188523ilv.65.2021.09.24.05.13.05; Fri, 24 Sep 2021 05:13:23 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245425AbhIXJxm (ORCPT + 99 others); Fri, 24 Sep 2021 05:53:42 -0400 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:58243 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245310AbhIXJxm (ORCPT ); Fri, 24 Sep 2021 05:53:42 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R921e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0UpPvmra_1632477120; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UpPvmra_1632477120) by smtp.aliyun-inc.com(127.0.0.1); Fri, 24 Sep 2021 17:52:07 +0800 From: Jiapeng Chong To: jejb@linux.ibm.com Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] scsi: ses: Fix unsigned comparison with less than zero Date: Fri, 24 Sep 2021 17:51:53 +0800 Message-Id: <1632477113-90378-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: ./drivers/scsi/ses.c:137:10-16: WARNING: Unsigned expression compared with zero: result > 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- 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 43e6822..0a1734f 100644 --- a/drivers/scsi/ses.c +++ b/drivers/scsi/ses.c @@ -118,7 +118,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, -- 1.8.3.1