From patchwork Tue Nov 12 09:30:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 179175 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7855802ilf; Tue, 12 Nov 2019 01:34:38 -0800 (PST) X-Google-Smtp-Source: APXvYqy5NgACAy4C/0OnVl3XEtcTLGKwqml0Ky8qIIJBtBNSy84ed/bteTwzT//ZKkimczpcP6h5 X-Received: by 2002:a17:906:2e5a:: with SMTP id r26mr27563767eji.283.1573551278520; Tue, 12 Nov 2019 01:34:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573551278; cv=none; d=google.com; s=arc-20160816; b=obz6BpVhiGJw3Afpbv42/c1OLzQYCFqbJKlh1YG2xOqD7TDVZr52WojxiFEvmlOIyL WLrZx5kNx5QwCDZRwu2uIM+PcU0yg3FrLxTrr7WTHDQuOf3Ng/C9IvzY1i6eDPU8MW0Z x7yg2W8jcmfeH+oXnrsi79MFLgoyKWlepBRx7sFWGfX7jUM3280JzrbHoykBTE4qSLG0 iphqEkkzyD3iIH7E+Nenbh0lpr15gGQo78IsoUHMupsKIS1uph2xupVUlQUDRpJK+qMw z4A3r1kQaRgY2g4wzeYRn+ttAtSTUGryHLRMXjUccrCy9Wvtza7Ek1BpC23MN5RqlP0m +T7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=MO1FMy8BjeQaur0n2iVe3jUqzM6VKKPrtIUvwhZIEiA=; b=GLMNWBT4+lLCQW7D9mGi/sonB5Q01O4AHhYoEMwSbqa+pD+s95yzUWWXD6d7/0vloQ NF55hKWsAUGpU2R3T4IkYx9fmnwKIqm9zGmsUmwsWkJnbJ5kYQz6OOFioEViv9jxZowW kF7fhntbrgS1swH/SKvEmVyKnEltDDXlFaLFFRlCiqy0Z6jkqdKI7t8kdtxxsI+HbmdU Yw02kRS++bNuhEYLJ+vQ9fSJGbwHf4WJInGZV333oXSYielsyDjxbLaPR0/XJqFPwtem 6LhlziusXpRuWbQdTxIxhRoyTy+I50zClZxuwzfVNW+qPybjBEsMHgVy0bTTId0VpsTg Wi6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u3si7443133eja.201.2019.11.12.01.34.38; Tue, 12 Nov 2019 01:34:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727473AbfKLJef (ORCPT + 26 others); Tue, 12 Nov 2019 04:34:35 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:6206 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727302AbfKLJe3 (ORCPT ); Tue, 12 Nov 2019 04:34:29 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id D3AB48A5A483CEA67AAB; Tue, 12 Nov 2019 17:34:24 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Tue, 12 Nov 2019 17:34:18 +0800 From: John Garry To: , CC: , , , Xiang Chen , "John Garry" Subject: [PATCH 1/4] scsi: hisi_sas: Check sas_port before using it Date: Tue, 12 Nov 2019 17:30:56 +0800 Message-ID: <1573551059-107873-2-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1573551059-107873-1-git-send-email-john.garry@huawei.com> References: <1573551059-107873-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiang Chen Need to check the structure sas_port before using it. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 18c95b33592b..c72fc59353bd 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -974,12 +974,13 @@ static void hisi_sas_port_notify_formed(struct asd_sas_phy *sas_phy) struct hisi_hba *hisi_hba = sas_ha->lldd_ha; struct hisi_sas_phy *phy = sas_phy->lldd_phy; struct asd_sas_port *sas_port = sas_phy->port; - struct hisi_sas_port *port = to_hisi_sas_port(sas_port); + struct hisi_sas_port *port; unsigned long flags; if (!sas_port) return; + port = to_hisi_sas_port(sas_port); spin_lock_irqsave(&hisi_hba->lock, flags); port->port_attached = 1; port->id = phy->port_id; From patchwork Tue Nov 12 09:30:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 179177 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7856018ilf; Tue, 12 Nov 2019 01:34:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxvnobnx9X0f7nBoa0hMwHBAATBCDocHC8Mw41CHFyKo3Apdn5T7M4/z1iIxExm3TyhDfrR X-Received: by 2002:aa7:d916:: with SMTP id a22mr18254307edr.115.1573551290728; Tue, 12 Nov 2019 01:34:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573551290; cv=none; d=google.com; s=arc-20160816; b=WIy+KvyBiB2wNSV1417Q0XFGTfPJtSXDfbOXqNUfk+/L72V+XmLgnprynrKYW/6HBW i+ql/+IKdcV3oj2jF7yHjOB/szjCQCeQaRkmD3vfZsJ/OFcfK8AyKUunSaBbJwC7zRVg PbDZD7YGCXljH/7wgv8xb8+DMYV3xAPSPInzuvjYL8+kX/zjnQnemEKrvNZNSPj0V20U hwS2yg532dK3a/zmF4MFid55/NMjUaE6utXkQJh0KVoUacjwZXk4geoptZNngCUX85dP AujjOa5TPaG7+tonUKcg7ycRQbYqlegPoU4nCkN0kjxgcsLRvtE9XV51zq6kwtWI/g1h VXfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=pk77XTFRNYH6rGy2KygEfMud1uU95+LWvPA4jBPtRHI=; b=bSyFB0MMVGQJ0S3JUW9Y1cEizp28lQczBDq9hmV1dE7ouzxi9aVolAx7+VR0wc/hCN xLKX7dm06RzCmYZphIlTuBtD7yLNq/mkYum+LP7lUZByxNhhM/wTA6shzS0t/0XvfLcv DbWbijqsxP4Qgdanjfp43SaOnZKsI/LoOEq64879oqBdT/8WKPoV2Bq8Ft2sNONMowSB gM4gmrbJWlGliZtEh+YrSGFVAQuIzTLLFkJqihz9SpRThPBZ3Mlv1Sr+gPAcR8Of0zfX DrG9axSypbk3uNP1IQV3TUQZjIZGvVhGbcpYl38Bp8WxhvT7qyBEuVhC9UbAve6HZne/ Veiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si14111272edx.315.2019.11.12.01.34.50; Tue, 12 Nov 2019 01:34:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727478AbfKLJes (ORCPT + 26 others); Tue, 12 Nov 2019 04:34:48 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:6207 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727216AbfKLJe1 (ORCPT ); Tue, 12 Nov 2019 04:34:27 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id D7E0CD00DD1FD5603B76; Tue, 12 Nov 2019 17:34:24 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Tue, 12 Nov 2019 17:34:18 +0800 From: John Garry To: , CC: , , , Xiang Chen Subject: [PATCH 2/4] scsi: hisi_sas: Return directly if init hardware failed Date: Tue, 12 Nov 2019 17:30:57 +0800 Message-ID: <1573551059-107873-3-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1573551059-107873-1-git-send-email-john.garry@huawei.com> References: <1573551059-107873-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiang Chen Need to return directly if init hardware failed. Fixes: 73a4925d154c ("scsi: hisi_sas: Update all the registers after suspend and resume") Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 1 + 1 file changed, 1 insertion(+) -- 2.17.1 Signed-off-by: John Garry diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 2ae7070db41a..b7836406debe 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -3432,6 +3432,7 @@ static int hisi_sas_v3_resume(struct pci_dev *pdev) if (rc) { scsi_remove_host(shost); pci_disable_device(pdev); + return rc; } hisi_hba->hw->phys_init(hisi_hba); sas_resume_ha(sha); From patchwork Tue Nov 12 09:30:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 179174 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7855750ilf; Tue, 12 Nov 2019 01:34:35 -0800 (PST) X-Google-Smtp-Source: APXvYqxyZGjGSEJzBG1WIhhzapOt1kV7DAhRrPcJRsuBb9cIQzo9yd+XifNjEl/yb0JMz5MBI7V1 X-Received: by 2002:aa7:db52:: with SMTP id n18mr30603067edt.169.1573551275807; Tue, 12 Nov 2019 01:34:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573551275; cv=none; d=google.com; s=arc-20160816; b=bWGVAtfJC74bMQZNvp6bC1TsEmvqg1WJ0Ik6JZQSIQblAC34AlM5kQn1JtOyAONn0v vg6iIWHEUAO/h4+FgBFIoUz3+9heJO9Mt4bhKdwHEJkURjgc8D0oJ1Bt6BK31Z2pwABv fp55qTphndbN+/SdSsAFwlVtiKYXpQi9Lv+WPdMlmV+57pHBqgU4HxbuYf6MHxByGsAp o++n3sgEuzgFtbhK0qM89GGgO5qo2ON8d/qm/okvRN0DHsdoNK814en5Y+1ftn1+QUmK dSmAnLqcvaIM34mky8aYSjCHDMRGO27CjUzyL6TkTfQB7L5Hzuk85bZWMhUikrk2fuHR 8wtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=t+O231XlCGuv8osQjKMJ44fWWGG17qzBlwHhBBPM4nU=; b=OK9WbogLmQgVKXt+8uwBCMp/XKKUE7Wm8t/+AYweXUmq2v68kFIDzLy/qjVcClzDZq yexrmJesHxGlXWl5IiRw9ZdbbggL4Z9nJyJYsXU3dqyZlYuNwLfmqr4P8rhPUfoMygyG A5mQr8ta0fDiS6oPh7cgSVFw+VS9YsrJ+GnyHGOAxBbSJ/7hCTMpwUuxBXnmBMrEUNeA 89DN0dky0iNkQUBjmmcRC1WK2k8jBCz4mHliZDvXBmudMliH3fVqMCRehROFGGHkG2rU sQdDgzUASQ3EAqZpow5qoCZMUyjUJD790+j67+jheBI8NCEbVzMhwZ48x7MrdAgk5NCo 1CJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b19si12780645edb.40.2019.11.12.01.34.35; Tue, 12 Nov 2019 01:34:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727151AbfKLJee (ORCPT + 26 others); Tue, 12 Nov 2019 04:34:34 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:6205 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727171AbfKLJe1 (ORCPT ); Tue, 12 Nov 2019 04:34:27 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id CF1CF6C0DA9CB716FA85; Tue, 12 Nov 2019 17:34:24 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Tue, 12 Nov 2019 17:34:18 +0800 From: John Garry To: , CC: , , , Xiang Chen , "John Garry" Subject: [PATCH 3/4] scsi: hisi_sas: Relocate call to hisi_sas_debugfs_exit() Date: Tue, 12 Nov 2019 17:30:58 +0800 Message-ID: <1573551059-107873-4-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1573551059-107873-1-git-send-email-john.garry@huawei.com> References: <1573551059-107873-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiang Chen Currently we call function hisi_sas_debugfs_exit() to remove debugfs_dir before freeing interrupt irqs and destroying workqueue in the driver remove path. If a dump is triggered before function hisi_sas_debugfs_exit() but debugfs_work may be called after it, so it may refer to already removed debugfs_dir which will cause NULL pointer dereference. To avoid it, put function hisi_sas_debugfs_exit() after free_irqs and destroy workqueue when removing hisi_sas driver. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index b7836406debe..bf5d5f138437 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -3302,8 +3302,6 @@ static void hisi_sas_v3_remove(struct pci_dev *pdev) struct hisi_hba *hisi_hba = sha->lldd_ha; struct Scsi_Host *shost = sha->core.shost; - hisi_sas_debugfs_exit(hisi_hba); - if (timer_pending(&hisi_hba->timer)) del_timer(&hisi_hba->timer); @@ -3315,6 +3313,7 @@ static void hisi_sas_v3_remove(struct pci_dev *pdev) pci_release_regions(pdev); pci_disable_device(pdev); hisi_sas_free(hisi_hba); + hisi_sas_debugfs_exit(hisi_hba); scsi_host_put(shost); } From patchwork Tue Nov 12 09:30:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 179176 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7855934ilf; Tue, 12 Nov 2019 01:34:45 -0800 (PST) X-Google-Smtp-Source: APXvYqyrtc0xApSqxy/mVWaxfAJ7BiHksNnigl+9qbYLMOLZmxcXRLMvy4y2foRhepZpc3pWiXB/ X-Received: by 2002:a17:906:1d59:: with SMTP id o25mr26661964ejh.17.1573551285803; Tue, 12 Nov 2019 01:34:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573551285; cv=none; d=google.com; s=arc-20160816; b=hQ4rtWS1z8FgEuQP0xwj6Owbq90pUlOvsZcKhSVJ20tNz6HHDvoFInuOgFV0xfwshz xzNrPYPdrATBRfVFl6FFPJGR84OmhRkQtOij9Q0fFG+xJSCVRxkl5xc3yqgtG59VQsx2 kEDLLZrzs3aBz7ZctINkmyCDfU1VoY4N8p5MvmXGK87Fa8HbNkehaeGLLfDyU0A5bzvO IPu0TTcV3nUrr5JiiD+Xqc98oLoKJGzIuVRUYeBUuL6bgMe5dKhfBxuv/gj6ZuUhdyW1 LZfuur4vdHOGa4D0BD7FkSI96qW9eGiB0WTE2fiIk0ehZCKx/HntKctPSlbyeenNMWaw kgjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=wCSewvXVUgMDz5w6dvSazxnK7bEtLa5TAautWTc/+jM=; b=TUqX9vKe3/GoO/3SDH6km17n3fCOvgyqo5bxHi1kHWTIpTHsUpiUdKh5VcgFcez0Uz +K0Al9Tg2r4ZQF7SCA1Jd9OwRRsEif9xyTOIZHPBIq5dyGYzVEqMRS+gPhxL8ld6m7Ao rguPdGGQ2DWwZUz/21+ixrlYzX/73TCJfABn1MjG76drppHz5f5p6kZvuqdbikhUCofi 4Lzk9Z1wWcWo9aRNxCGSBnhhf6+onCxfLqDl1o7AWH67uSiiPlJkxs9PlKrQHocoAElu mlKaua+/Aow3r55OuVSppYgWSyUDxQCkm2Ne8CYjEVlmDc2QBPBx2bj0+hWdugbGWcCn LyUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cx17si8305812ejb.421.2019.11.12.01.34.45; Tue, 12 Nov 2019 01:34:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727451AbfKLJe2 (ORCPT + 26 others); Tue, 12 Nov 2019 04:34:28 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:6203 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727126AbfKLJe0 (ORCPT ); Tue, 12 Nov 2019 04:34:26 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id CAD395C1204561B52913; Tue, 12 Nov 2019 17:34:24 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Tue, 12 Nov 2019 17:34:19 +0800 From: John Garry To: , CC: , , , John Garry Subject: [PATCH 4/4] scsi: hisi_sas: Stop converting a bool into a bool Date: Tue, 12 Nov 2019 17:30:59 +0800 Message-ID: <1573551059-107873-5-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1573551059-107873-1-git-send-email-john.garry@huawei.com> References: <1573551059-107873-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The !! operator on a bool is pointless, so remove an example in hisi_sas_rescan_topology(). Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index c72fc59353bd..03588ec3c394 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -1413,7 +1413,7 @@ static void hisi_sas_rescan_topology(struct hisi_hba *hisi_hba, u32 state) struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; struct asd_sas_phy *sas_phy = &phy->sas_phy; struct asd_sas_port *sas_port = sas_phy->port; - bool do_port_check = !!(_sas_port != sas_port); + bool do_port_check = _sas_port != sas_port; if (!sas_phy->phy->enabled) continue;