Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2940189rdh; Wed, 27 Sep 2023 19:02:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdeCsoxm/Rbtv61f/flXDH+hvZEqzjzPaZ/mEp89XMvLPtUIcjTUeuiU8eoWmRtxZNcoYx X-Received: by 2002:a25:ada7:0:b0:d81:4251:4ce7 with SMTP id z39-20020a25ada7000000b00d8142514ce7mr3763226ybi.59.1695866559839; Wed, 27 Sep 2023 19:02:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695866559; cv=none; d=google.com; s=arc-20160816; b=b0rT77nI/Me4qmkpevV+0Kl/yremBSB15XzjQDQ1E7XEh+i1pu4wImHcn9b+qAORLM w/qrDNFmqHtAMqvIeu3c4GtbsHe/t4rqFw/p+RjZ+bfHz+JyIxqVGge5t0xGv2qAi9qi tD3xSEY1xEPRNyjRjAHnqJrt87HegK50rtvcOQ3JuxONk2uto3Lkv1TZqBXAuHNLaIuH 5XpJH+ABGuMt3c7ITLIpUAYCxL0hsQhBIFY57c/3fKdgxOLWsk+phCTCy15EGDPXtRha uPmRVCLyXRjN5IE8aDmo4OwCW4rNQQU7wxC9dKTThHrI3vuHcu1+8MVWlkgebt1MjFGN 8JXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:subject:cc:to:from:date; bh=OcuSL4XZwKHb6rOjnIPgMgs+B4osJ1scjItwktGSdD4=; fh=EJlDgVKPCsYupPYC/ATB3Ui30GnM0yNDqQLKpeBwW8Y=; b=FRXrYylGlM8gAZL5/RGrbx1v4iH9Qf+EZGCe4+ahZfP9R0YvytALR3Pb51hKyuW3B7 eSM0q7/MjLDXdKSuOygUveYRfPpBR4Xdo7qVPw4gBq+6+a5WaiP86duY3L2FIgxJhKO4 Mr+vLj6n7NWZa6BqlwcEAS8FB+yQ8GbHVdIuLCsDoULRBLkGRJhGEp8tROngtMUNO6u7 MABkqUCSv0PjfA1de5xIgKjdq6BVzzHGZ9vNOQVxBusEHvlZAVxTCBs+ePIjm3CjFStm ZwcMNq4PqY8cCxY+uw9ra+9qDuvk7Bg8848sgzUBReF5KKGUume5Jvq0ugoqWG2Fy/xC Q/ug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id i198-20020a639dcf000000b00537c6c285a0si16854804pgd.167.2023.09.27.19.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 19:02:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 31AD0802C904; Wed, 27 Sep 2023 19:01:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229984AbjI1CBZ (ORCPT + 99 others); Wed, 27 Sep 2023 22:01:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjI1CBY (ORCPT ); Wed, 27 Sep 2023 22:01:24 -0400 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B3D4EB3; Wed, 27 Sep 2023 19:01:22 -0700 (PDT) Received: from wangkailong$jari.cn ( [182.148.12.64] ) by ajax-webmail-localhost.localdomain (Coremail) ; Thu, 28 Sep 2023 10:00:02 +0800 (GMT+08:00) X-Originating-IP: [182.148.12.64] Date: Thu, 28 Sep 2023 10:00:02 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: "KaiLong Wang" To: linux@highpoint-tech.com, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: hptiop: Clean up errors in hptiop.c X-Priority: 3 X-Mailer: Coremail Webmail Server Version 2023.1-cmXT6 build 20230419(ff23bf83) Copyright (c) 2002-2023 www.mailtech.cn mispb-4e503810-ca60-4ec8-a188-7102c18937cf-zhkzyfz.cn Content-Transfer-Encoding: base64 Content-Type: text/plain; charset=UTF-8 MIME-Version: 1.0 Message-ID: <34fa1c8d.89c.18ad983b6a3.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwDXaD4i3hRla3i+AA--.581W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQAJB2T8PZMAAQAWsu X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 27 Sep 2023 19:01:37 -0700 (PDT) Rml4IHRoZS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