Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4338243rwl; Mon, 3 Apr 2023 03:37:16 -0700 (PDT) X-Google-Smtp-Source: AKy350ZgXqJEnHdtL1ehn16L9RuOvPatU02AkOIY7UDrnDAVtCCMFfO+EIAmNhiDJY/cp9vxfcs7 X-Received: by 2002:a17:906:ecf1:b0:932:c1e2:9983 with SMTP id qt17-20020a170906ecf100b00932c1e29983mr36046485ejb.15.1680518236524; Mon, 03 Apr 2023 03:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680518236; cv=none; d=google.com; s=arc-20160816; b=VYY2MrqBGuSmc0Y2tp1T4CxtN8TlvbMRZpiePvtahtNXBzDthbSKjDUmL88wblbaEP /mb8ZxTyc6QQcamo9oT947RZTMLtt9z6jZA9ElqG+kErR3eYjoqZjY0VjVhVrl3n6FuY Xc1D8UUaxl1ER/7pGGA5CibNonY29ndsB20KHI6y9OUQVUaj8dKsEU0fuPyAbx6Puc7c 7RcEDvLL7D873yXMOhglAPF304eooFYbkkjmrQRnOV4myhFn3LOpPbvkhaAKd3xGHqO9 /x5Ng10tH8vm1rlTcIa4i2PuNbjM7id2fKPsoXnYrbzE+yeJtrlGTX+fFKlJQNcbvQBn h0oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=L1CmuKv5JyzIMsTiwKrSQinIOIu1SOwFYh0FDtoUyC8=; b=I3GN3oiTWB/0G5zlfWgSIij7WQhjgzow/5CevQ8aZx41ts3NZzjYUL/KetGZZ8n4Wz 9ve5/7R6L3auUdqiDaUF3afA75he/S4V21DaH0RWQNwAc+l3DLYWYaFRo533nPNQfQbi BNYRfPNZ10BifoCGZbnV5dGv0jlULBcIiX3EL3yWUrZdXREDb6HzCehoVakTg9hR5fBK mdKOtZ00ARy/eHkLJ750zwWxagDXREl4KHP1f5kcQGGCgQdmI9a4tA0d9gqHZv4JNi+H AU0DKEvUK6svSY/hdLz1GzcNCWu2CRG1MAg3gVTfINc6oFVUaGtex5OvS0MZievRl0+z Lr7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lh27-20020a170906f8db00b00931f8f04e64si71496ejb.840.2023.04.03.03.36.51; Mon, 03 Apr 2023 03:37:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232065AbjDCKcT (ORCPT + 99 others); Mon, 3 Apr 2023 06:32:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231555AbjDCKcR (ORCPT ); Mon, 3 Apr 2023 06:32:17 -0400 Received: from hust.edu.cn (unknown [202.114.0.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87ACB3A9B; Mon, 3 Apr 2023 03:32:16 -0700 (PDT) Received: from [IPV6:2001:250:4000:5113:2468:8ae7:d74c:db55] ([172.16.0.254]) (user=dzm91@hust.edu.cn mech=PLAIN bits=0) by mx1.hust.edu.cn with ESMTP id 333AU1XC017671-333AU1XD017671 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 3 Apr 2023 18:30:02 +0800 Message-ID: <055f3504-0d01-aaf1-1c0b-379c6be702b1@hust.edu.cn> Date: Mon, 3 Apr 2023 18:30:01 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] scsi: lpfc: fix ioremap issues in 'lpfc_sli4_pci_mem_setup' To: Dan Carpenter Cc: lishuchang@hust.edu.cn, James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , hust-os-kernel-patches@googlegroups.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230403074821.5121-1-lishuchang@hust.edu.cn> <6df77fb0-6b3d-4e3b-9c5a-40e217e8dae9@kili.mountain> From: Dongliang Mu In-Reply-To: <6df77fb0-6b3d-4e3b-9c5a-40e217e8dae9@kili.mountain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-FEAS-AUTH-USER: dzm91@hust.edu.cn X-Spam-Status: No, score=-1.4 required=5.0 tests=NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/4/3 17:16, Dan Carpenter wrote: > On Mon, Apr 03, 2023 at 03:48:21PM +0800, lishuchang@hust.edu.cn wrote: >> @@ -12069,9 +12069,11 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba *phba) >> return 0; >> >> out_iounmap_all: >> - iounmap(phba->sli4_hba.drbl_regs_memmap_p); >> + if (!phba->sli4_hba.drbl_regs_memmap_p) >> + iounmap(phba->sli4_hba.drbl_regs_memmap_p); > The test is reversed still. Thanks for your review, Dan. Sorry for my internal careless review. Shuchang is creating a v2 patch to fix all the mentioned issues. Really sorry about this stupid mistake. > > If you make a mistake, you should write a static checker warning so that > you never make the same mistake again. ;) See attached. > > >> out_iounmap_ctrl: >> - iounmap(phba->sli4_hba.ctrl_regs_memmap_p); >> + if (!phba->sli4_hba.ctrl_regs_memmap_p) > Also reversed. > >> + iounmap(phba->sli4_hba.ctrl_regs_memmap_p); >> out_iounmap_conf: >> iounmap(phba->sli4_hba.conf_regs_memmap_p); > regards, > dan carpenter > >