Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp627983rdb; Wed, 17 Jan 2024 12:11:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqDM//qeZiY17v6l3DCJyRbQp8ERnO2306UT1T+y/NZYTgZkgB5IJLgISuPIr1wSRTSY55 X-Received: by 2002:a05:6870:1656:b0:210:a2a0:93a0 with SMTP id c22-20020a056870165600b00210a2a093a0mr1461899oae.81.1705522314318; Wed, 17 Jan 2024 12:11:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705522314; cv=pass; d=google.com; s=arc-20160816; b=TNEQQ4+Yc4ygnsjE7M2cNvrmTBVLBKfYF+CDSh2QaICnVa5gG+PYb9JkVQGYr80I1F ow5XzOnlSi0a8vZ7/37dlDy+23RnheloedEQx39efMWgcVcXNX7+YXVtf08+thZSXFUk K5KBXlVPMa61v3oRlVVaGwDhtVGzOerluYkUAfnoKE29dZP7+fLOg6P5XaLtWM+hENcN hWOuj4/gQahEWkBhWqpZTqzQmOeJ9d383lk/9vlSABUxy8VynmXze4Pma+tJmyhXoCfp 6hIqEyVb4ZuDhkvo0opV0ACdeD/lbHg6opKJud3ayNFg+2xkf0cGlmqE8kXJdCukJx37 Hl/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=89HxgIwBEYJaHnsk5AEcjOC5NVX2QZpUegFxl8d9R34=; fh=PGUEcXvvy1wb+J1VlkdH3OL8kHe+XSEMadLHOst7+0A=; b=jC+Jh1K/96fQHPcO1/Dwh5WE32rGl019KewbdeU0ZtAybM/EE+Yg4Xi46s7N8jCX1M 9obOveIjsvQYIniD39DvB3CFXk0mET/paTWvlClZHI1Yo3TAr7IakMg9zTjyrp3DspCS Ldjf4LmuvqReZYvFOETmYAU0yCJp6yct1w8j2ix21yPxl37zOHTVQBmW2FGml9LmA+0S 07q3MkUjLGr71qpFRpxF7gnlfN+X4XF+gSP4gpqfWsayq8LIVhK1W0FxPq6ciJwwUv7w OM3p5bPYJ8/ZIim3V8cEC0x2t+Ri0+abYLe6eh7nobncmjmakWIxcXY+hlhIaaCnZMjZ mUOw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=nYUCsjYh; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel+bounces-29402-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29402-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o7-20020a634e47000000b005cdc5c9d6a2si103617pgl.576.2024.01.17.12.11.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 12:11:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29402-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=nYUCsjYh; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel+bounces-29402-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29402-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F2616281FCA for ; Wed, 17 Jan 2024 20:11:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7764D250ED; Wed, 17 Jan 2024 20:10:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="nYUCsjYh" Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39F5B24B57; Wed, 17 Jan 2024 20:10:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.177.32 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705522229; cv=none; b=bvPEGHynReJGKjm7bSZG7IZpkFFap6MQn3/3bmn4zhNps0X/s/K7BvEPIbO6BAlOJlfhnGTqueLIFh5AgT5Yx84qQfFlzoikytursmVTreqUjjBuZFebAIhGAJdWpv4OsqgmmZz15FKQOeA98onvqyxu3d8cImzEKC2DyJdxRxE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705522229; c=relaxed/simple; bh=4vwSLLR2Xw4dWO0MOKREjo5VSSihDzuRLLAGmh/SXv0=; h=Received:DKIM-Signature:Received:Received:Received:Received: Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Type:Content-Transfer-Encoding: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details: X-Proofpoint-GUID:X-Proofpoint-ORIG-GUID; b=Wkoge6I1QxxMx/cxf0hf07sYe2J89rLzJnnD5TSUoJ3NJ0RIrfbBdzz7SWyaiJTHBrMdvBxeFnC70Iar3iEWCx1RNDx76PDxvTKoHSR/h2zS318O2mu8/U3y9PagUdrc+airedVn8984r/TwkWnKHD+kVkp8Y3rS84NsJ5bjYVs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=nYUCsjYh; arc=none smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 40HJcrw0023582; Wed, 17 Jan 2024 20:10:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2023-11-20; bh=89HxgIwBEYJaHnsk5AEcjOC5NVX2QZpUegFxl8d9R34=; b=nYUCsjYhAJriZebos+UlDsTkfgS/cCX77IRqGYXWKIZZIEmIEbFGuIeA41GQHwY0bhZQ eauiDjqZReWKWEwdkzuAHSofQHsF9jKN2dRUWhDpfOLlj44ryYbCSpi4G1Ek/ujrTMn6 ePT3sQngXMXgwnzpe3dy+VeH8flaeoY6vTjk6V+vH8TMGmk/zdAcCge2G6ifrVthEorB oqunjQq4rbl0+2W42dP32VoT9K34iGOj7IujVCwY4PWQ8Dg2D7TS1az0NChxfi1HHAoA 8/82C4b7oixgxwIuPSnhSWZce33QDa8lnxl7X28PUs2VvNf+93UlaCo4LtriPWPhHRaV XA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3vkqce0gk2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Jan 2024 20:10:20 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 40HJn7fP019950; Wed, 17 Jan 2024 20:10:20 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3vkgyb1c10-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Jan 2024 20:10:19 +0000 Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 40HKAHCD030718; Wed, 17 Jan 2024 20:10:19 GMT Received: from ca-mkp2.ca.oracle.com.com (mpeterse-ol9.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.251.135]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3vkgyb1bw6-2; Wed, 17 Jan 2024 20:10:19 +0000 From: "Martin K. Petersen" To: Hannes Reinecke , "James E.J. Bottomley" , Justin Stitt , Kees Cook , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Harshit Mogalapalli Cc: "Martin K . Petersen" , dan.carpenter@linaro.org, kernel-janitors@vger.kernel.org, error27@gmail.com Subject: Re: [PATCH] scsi: fcoe: Fix unsigned comparison with zero in store_ctlr_mode() Date: Wed, 17 Jan 2024 15:10:06 -0500 Message-ID: <170552035090.3348001.8757972022614438996.b4-ty@oracle.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20240102085245.600570-1-harshit.m.mogalapalli@oracle.com> References: <20240102085245.600570-1-harshit.m.mogalapalli@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-17_12,2024-01-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 suspectscore=0 bulkscore=0 spamscore=0 mlxlogscore=708 phishscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401170147 X-Proofpoint-GUID: ERi6vrtsMoa9XNku4zjdaua5uLmf24C2 X-Proofpoint-ORIG-GUID: ERi6vrtsMoa9XNku4zjdaua5uLmf24C2 On Tue, 02 Jan 2024 00:52:45 -0800, Harshit Mogalapalli wrote: > ctlr->mode is of unsigned type, it is never less than zero. > > Fix this by using an extra varibale called 'res', to store return value > from sysfs_match_string() and assign that to ctlr->mode on the success > path. > > > [...] Applied to 6.8/scsi-queue, thanks! [1/1] scsi: fcoe: Fix unsigned comparison with zero in store_ctlr_mode() https://git.kernel.org/mkp/scsi/c/567a1e852e87 -- Martin K. Petersen Oracle Linux Engineering