Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2933083rdh; Wed, 27 Sep 2023 18:39:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFSiMFFleHSZIWBrda34AGXuBM6iN9RPS9o9yLQINls8Gnm3boM2/OrWbADn7wpHEB6tzNn X-Received: by 2002:a05:6a21:628:b0:15d:9d8e:ad8b with SMTP id ll40-20020a056a21062800b0015d9d8ead8bmr3392131pzb.32.1695865184263; Wed, 27 Sep 2023 18:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695865184; cv=none; d=google.com; s=arc-20160816; b=astHMWS78uqovpIbCf/S8mc+odBWJsWOcsyCAsgtz5sR/rs14Lo/prJCsormo08aXo pAgLchBIP687v3lMMmXsaLzuO/DqmOWgCul8Kzot6tFFeEcxHhq5kDjb6H25OiPF0THP EK7FlqgbUsx0y/1xGsM6aZWU+v7XPS8Pwm3OWl6zjP6qv+dWDDk++FSsRBOfPu2ZmKgQ 3H2HQaMVSdmNpITCZz0pQyDoZT1+ybvxiQQhcsDmbzY2yzSTNRyEwlb2j8iWCtkJRkLQ 7ehUhHLtF22M41JYXlhaPx0MecUYIzfdiJRWUN/GLXHzMUG77eWbHJH3emqjvopNfpWx 1eCQ== 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=CzOpndpz8Os6EwikxqNeSaRqS4IY2g7dkCq8T2JMdQI=; fh=EJlDgVKPCsYupPYC/ATB3Ui30GnM0yNDqQLKpeBwW8Y=; b=FldO26Ao9gZO9Z1tw1kdAB16lgEbT8kkpRKSeHWVoaLuqIzch28cDvKbc4a8nC7avj 6CB8J1YNuptYLhFEV/cAZIFGOrHpSyPLlYAE8YR+gfiTeQJYfRn7S2Qi/RpDW0VqhV87 1p2sWpLiBaEXB464bvLmbLWCiGoB0ug/nTmJ2+Sf/j4Jzp9ITr8MXrUh+IghI94Bt/Wm qOuyjfP9oMZcpBWADETR2YZNCVYYDXruu95wswMuB33r9OSlww+yEsc8GC2IMk4N3rES +gw8KSSml6snGjxFnNwS5YQS2Kedtsfd2K+2TDO2eVf9gc0RfkHGcrfVSHCwfkZJRoux qTtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id u16-20020a17090341d000b001c5bd811c46si8756881ple.581.2023.09.27.18.39.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 18:39:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 1D1F98032C56; Wed, 27 Sep 2023 18:39:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229913AbjI1Bjc (ORCPT + 99 others); Wed, 27 Sep 2023 21:39:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbjI1Bjb (ORCPT ); Wed, 27 Sep 2023 21:39:31 -0400 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D33E8B3; Wed, 27 Sep 2023 18:39:29 -0700 (PDT) Received: from wangkailong$jari.cn ( [182.148.12.64] ) by ajax-webmail-localhost.localdomain (Coremail) ; Thu, 28 Sep 2023 09:38:09 +0800 (GMT+08:00) X-Originating-IP: [182.148.12.64] Date: Thu, 28 Sep 2023 09:38:09 +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: <79a31286.896.18ad96fae37.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwDXaD4B2RRlinW+AA--.579W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQAJB2T8PZMAAQALsz 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 27 Sep 2023 18:39:42 -0700 (PDT) Rml4IHRoZSBmb2xsb3dpbmcgZXJyb3JzIHJlc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