Message ID | 20230313093114.1498305-8-john.g.garry@oracle.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-scsi-owner@vger.kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64CB0C74A4B for <linux-scsi@archiver.kernel.org>; Mon, 13 Mar 2023 09:33:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231288AbjCMJdW (ORCPT <rfc822;linux-scsi@archiver.kernel.org>); Mon, 13 Mar 2023 05:33:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230420AbjCMJcn (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Mon, 13 Mar 2023 05:32:43 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5D3753D96; Mon, 13 Mar 2023 02:31:56 -0700 (PDT) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32CMo832004881; Mon, 13 Mar 2023 09:31:51 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 : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=JT0I1lmBwY2/I26xELUpQi/FnxBeftdM885RAyK68YI=; b=Zf60wYcVpeba03dA6L0eUIylZSpPuEDoXAA+li9wp76HHmj6SiyD4FxJV7qOnFVZ3rS5 KJGvEyqLi/BzyZYXnP2mGPULC8i3cpmXG2e0WUjXFbK8vTMGIh4U1v6iGpaam1bwWGjP pNI6kiEzgYHQF5CflDERUluT4zjn1NU/oBsS/kFqkrl2SKM+hKxIWBrGh6zXTlzAoIFL YPOu9dN/xpOMvcuk0aZslbe8n+i6er9ZxNGoqezSOVJNBk0z4R5Tk83qssfqK9bhJiHS Yut88J2QhxttId2SVo0bYrVqIOZDJ8aD+DnV/DfXxVhDXuge9oe61TZMhQjx7GECF5D6 nQ== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3p8j6u3b6g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Mar 2023 09:31:51 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 32D7v6bO002392; Mon, 13 Mar 2023 09:31:49 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2172.outbound.protection.outlook.com [104.47.56.172]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3p8g3awer7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Mar 2023 09:31:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j+FvIMMBEs2JsS9iCXVLe78lLwEhb2j8rtm3ut7AbxYlJP2wkaKU8XhCUX9DYPbVrXq9ETdxAknbRJ/a6KV/q8KA69joIW1Tk8VgZFPKcwI/in2PXWVMP+pyZ4Bha4lhkrVwa7nwuWaQEg6Ug6FwdWwBtgZcVwtXthZsSeCiYFLkY+Vl+jHnFV2fPjrLg3Eu0wueMkldHdGKR8bmrjWMHnC0MuUw3nKLx9RJ1AKxQdg9QQ2itSkbxzBQWCrIEfiyMo8EbIvAgIauaM5txy1tROHVELwzxrYyK4/EaH+YFcvRwPmbh4ywjPui2y863J9PMlco/a9eJJNDayFoQkQa8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JT0I1lmBwY2/I26xELUpQi/FnxBeftdM885RAyK68YI=; b=mi7b+oRU8A3aEOwoE7pIzNheDitUoBT98ziY+I7rJT42FXLHUXlwL3uqIcrkRZofV6MWNTpVRtvx2QYvOxX6hw32nSXZ5/xdEKn9jwUr3CV0PzCUA4je7E3jG6BK4ipp9ZkdPYv00AiaFDWuRC9X1Xpt0vtvqCqwMKvBR/GOwVssjXH0dsnVnjb0Q/45OtDLgtV+qIfAgzX3pNw6LxyjllSuelsc4Ol619rrn5XF8Qhwckkcolul5Y19aPmi5uuccOUxWC2c64S4hq1eYdh60ow2HHwZh6fUpz5MgOMMa5JtITDEv6bhP0/bvC5JXHQ/lDg9ttyOz2fEyUk+CXcvsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JT0I1lmBwY2/I26xELUpQi/FnxBeftdM885RAyK68YI=; b=wnQhRW9c7Qj3dMtacreo/v9NgVgBQclkgF0Npnc2yOVrY8r9O4ZijireAAUBs9lcHq3N8Hb0HxgooiRcdfjIcNInWUjlrXYEhAQEhZbAiUP49Tzd/mM5Qnh/fug+iX8HksMhrcxDVHr+yD0XwsnoDhpJOT264jFcpWAg682cc9o= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by SN7PR10MB7048.namprd10.prod.outlook.com (2603:10b6:806:347::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.24; Mon, 13 Mar 2023 09:31:47 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::7276:bc4c:17a0:7267]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::7276:bc4c:17a0:7267%6]) with mapi id 15.20.6178.024; Mon, 13 Mar 2023 09:31:47 +0000 From: John Garry <john.g.garry@oracle.com> To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, bvanassche@acm.org, linux-kernel@vger.kernel.org, dgilbert@interlog.com, John Garry <john.g.garry@oracle.com> Subject: [PATCH RESEND v2 07/11] scsi: scsi_debug: Drop scsi_debug_host_reset() device NULL pointer check Date: Mon, 13 Mar 2023 09:31:10 +0000 Message-Id: <20230313093114.1498305-8-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230313093114.1498305-1-john.g.garry@oracle.com> References: <20230313093114.1498305-1-john.g.garry@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: LO4P123CA0682.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:351::7) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|SN7PR10MB7048:EE_ X-MS-Office365-Filtering-Correlation-Id: aacc9396-bd30-4d3b-0fc7-08db23a5c46c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NVJoFjCLM5mB5X+rppvplF3hZpogxm/LyOGoSPNtDYDF4+hVkT6Z1vuIITrG9LOFDwII78jqMprE0Bb7RsSZAiUjLedFUmsHyQuajzogWdZ5NYt8b31oIydljOXZyg/zI3PdaK89NLsZhUbVgALRqzU9wCYH3Eh6zvUBi/HmTV/EDpICPUE2Yq7JKVRKy2PolV8r+E5XVL3F+u7x0fkciBwqr/tXZpp6sC8bXhiup8QlR4PJ0CKdCDKq24KDZ+VZh017kgJttyfrvHn3UbTnQrTRror4F3EL62bxIYnVQJvj/H4rz3APv9pD2l1/ZOV8yD29865e+AgTzni0Wiqf+k6QtpbOSxyBYmI6aIB3u0pO35se2ktuVsQA18I7lx6dCHsK836LjM2wQzPKT5r5174lNKgvwkRIMRMREdyzRxYe6Y7f8XLuiMxikmClrCSjiUtW6E/kkrIwVtwLMtl4q+MMtP540I/Jvad/vS+0Ov6c8oU+goUi6sM8QTFU+XeFS+0Q0clAKCeKd71gYshszm70wDeiQhWY7JWnpYXc6jSetjfU0YPi4OXeLYZH1wsanvPXUosWmnS//4At1SEGrcfDq0Y55Q6VMjPu5r8QteWThe3fSsrlTu1yPL2Df3SSQW+1twurplvc2dDFtQ8LhQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR10MB4313.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(39860400002)(346002)(396003)(136003)(376002)(366004)(451199018)(2616005)(186003)(6506007)(26005)(1076003)(6512007)(103116003)(6486002)(478600001)(83380400001)(6636002)(316002)(2906002)(41300700001)(8676002)(66476007)(66556008)(86362001)(4326008)(66946007)(8936002)(6666004)(107886003)(36756003)(5660300002)(38100700002)(4744005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MHAe0pSjkfL25HxWv5SjmWlElu7nvta/dTiCqUm/xRY5vElGbFR/+DPi3qIh1b5aFiBpmDM6MnptZ4TbACxwliR0rdJmV/OfV9kKjUDzS3BmxOE6EBstbita+1/fKVHBU74mXsfC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ORIb9ixiEx1tMa92+CPlvCbkjqCHY9WNqeFPUCtH+CgIHaguscPUL9VRjzrcpuaqTaB+Z4XrPQP100fXHxKE54XVHpvxvVyq6v8rqbEdJrLtCM5nV9DPZAer9hQEaAOI8V5sInjfDAwm3GBg/v7a9Yf1P/lRX9+nynix76fWPYkxKLdVJVKgLTnwbyipORBBm9UQSo50sKn1z/SiTp8tA+WnmzED6drsbod9MJIpDOVTyDpkQSYELA3Bk1Rr0PqEgUtCbcg95hPCLh2xAP1D4Abk= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: aacc9396-bd30-4d3b-0fc7-08db23a5c46c X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2023 09:31:47.5830 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OhudysfflbxL1t0htYilXv0zP+JwL2wxmB/flFdMn0iVCC0NaSK9FcRkAsd7sYILgYlEL3lsNfrJ6PeHwkusMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR10MB7048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-13_02,2023-03-10_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 adultscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303130077 X-Proofpoint-GUID: OqJSCrVDfQRIQlztVg8oyO1jE88XGOW0 X-Proofpoint-ORIG-GUID: OqJSCrVDfQRIQlztVg8oyO1jE88XGOW0 Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 749358b48335..47820b9f6326 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -5440,7 +5440,7 @@ static int scsi_debug_host_reset(struct scsi_cmnd *SCpnt) int k = 0; ++num_host_resets; - if ((SCpnt->device) && (SDEBUG_OPT_ALL_NOISE & sdebug_opts)) + if (SDEBUG_OPT_ALL_NOISE & sdebug_opts) sdev_printk(KERN_INFO, SCpnt->device, "%s\n", __func__); spin_lock(&sdebug_host_list_lock); list_for_each_entry(sdbg_host, &sdebug_host_list, host_list) {
The check for device pointer for the SCSI command is unnecessary, so drop it. The only caller is scsi_try_host_reset() -> eh_host_reset_handler(), and there that pointer cannot be NULL. Indeed, there is already code later in the same function which does not check the device pointer for the SCSI command. Signed-off-by: John Garry <john.g.garry@oracle.com> --- drivers/scsi/scsi_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)