Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp477774pxk; Thu, 3 Sep 2020 05:04:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpz7GoQRVUM83XD+1SVPhu/JgtqSKFX9qAvbf71jQnFKRbb7pY6rRHM/ySrJVYq0pqf8gM X-Received: by 2002:a50:fc83:: with SMTP id f3mr2861214edq.102.1599134692760; Thu, 03 Sep 2020 05:04:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599134692; cv=none; d=google.com; s=arc-20160816; b=wAGyI2f+giz7cDLOU2ZNLdNortdLhMPdasL0K06uG5wTpJak/2elkM1pnq4HnJsWBb l/hnPCqn9y4SqeF5ncYB+k7067ZMmdfXp4RJovMvZqXHAuto/utR+RGX/gmiqm3dodrD YGVEQvLY+VPked/+iXngHwlBiyp9/Y6jeCm8tFf8U9NL80Z/qLMyurHJDEPxnx9nMnIR wGSRQYE4FcwyVC/FNQLpkjAYASzLmNmwELdr0e88XDwes90lWM1QadYnZMyKB8GExZvR 5/ylsvD69Z4uahKsS7JE+9YPzsQiqkx4W054FSc76cSxHnmJM3T4qDgHrxacSbq54ISq xxGg== 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=Z5zvgcZUoW5Io9sgMGUikuZFxGnlBEY2tqNKWBWTmQM=; b=ZieAsl88Qvriozope5kmxoWAOmijklVr2PXxHV5pH3Er53HrW/d4nVcq6WW21CslV/ eNDKLfKjGAjseXdOS/SQ7EsP5E8eRJ090yDYWyrvm1DPxmSDwrHChHoQeZDobksUDddW sFXFm4JuIac8M7JpfuWvXmhNChu9Dt1G+K7EN46fXsv1NI2UJG4cQZ+GAlowktbhz29L nYeI7I4SetwBh0G51AtzFXNg6ApSuSpeSrtWkORPl4Mpj2BbF4jn0u8EruRZWwGxkBzY sGQe7Ko7GQEso6+9y78+wCrivaAp5vFoLgimPNZAUDV4o7ljEYBpEgQujsB+VxcxXS3Y LmFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec15si1648702ejb.236.2020.09.03.05.04.04; Thu, 03 Sep 2020 05:04:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728591AbgICMDI (ORCPT + 99 others); Thu, 3 Sep 2020 08:03:08 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:46780 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728780AbgICL4V (ORCPT ); Thu, 3 Sep 2020 07:56:21 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id E475A43671EBED340873; Thu, 3 Sep 2020 19:55:09 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Thu, 3 Sep 2020 19:55:03 +0800 From: Weili Qian To: , CC: , , , Subject: [PATCH 1/2] crypto: hisilicon/qm - fix wrong return type of 'pci_get_drvdata' Date: Thu, 3 Sep 2020 19:53:59 +0800 Message-ID: <1599134040-55860-2-git-send-email-qianweili@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1599134040-55860-1-git-send-email-qianweili@huawei.com> References: <1599134040-55860-1-git-send-email-qianweili@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Yang Shen The parameter type of 'pci_set_drvdata' is 'struct hisi_qm', so here the return type of 'pci_get_drvdata' should be 'struct hisi_qm' too. Signed-off-by: Yang Shen Signed-off-by: Weili Qian Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 3 +-- drivers/crypto/hisilicon/sec2/sec_main.c | 3 +-- drivers/crypto/hisilicon/zip/zip_main.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c index 45741d2..4fd0a0a 100644 --- a/drivers/crypto/hisilicon/hpre/hpre_main.c +++ b/drivers/crypto/hisilicon/hpre/hpre_main.c @@ -900,8 +900,7 @@ static int hpre_probe(struct pci_dev *pdev, const struct pci_device_id *id) static void hpre_remove(struct pci_dev *pdev) { - struct hpre *hpre = pci_get_drvdata(pdev); - struct hisi_qm *qm = &hpre->qm; + struct hisi_qm *qm = pci_get_drvdata(pdev); int ret; hisi_qm_wait_task_finish(qm, &hpre_devices); diff --git a/drivers/crypto/hisilicon/sec2/sec_main.c b/drivers/crypto/hisilicon/sec2/sec_main.c index f912e57..6d4380b 100644 --- a/drivers/crypto/hisilicon/sec2/sec_main.c +++ b/drivers/crypto/hisilicon/sec2/sec_main.c @@ -915,8 +915,7 @@ static int sec_probe(struct pci_dev *pdev, const struct pci_device_id *id) static void sec_remove(struct pci_dev *pdev) { - struct sec_dev *sec = pci_get_drvdata(pdev); - struct hisi_qm *qm = &sec->qm; + struct hisi_qm *qm = pci_get_drvdata(pdev); hisi_qm_wait_task_finish(qm, &sec_devices); hisi_qm_alg_unregister(qm, &sec_devices); diff --git a/drivers/crypto/hisilicon/zip/zip_main.c b/drivers/crypto/hisilicon/zip/zip_main.c index 8bbae28..6641d39 100644 --- a/drivers/crypto/hisilicon/zip/zip_main.c +++ b/drivers/crypto/hisilicon/zip/zip_main.c @@ -846,8 +846,7 @@ static int hisi_zip_probe(struct pci_dev *pdev, const struct pci_device_id *id) static void hisi_zip_remove(struct pci_dev *pdev) { - struct hisi_zip *hisi_zip = pci_get_drvdata(pdev); - struct hisi_qm *qm = &hisi_zip->qm; + struct hisi_qm *qm = pci_get_drvdata(pdev); hisi_qm_wait_task_finish(qm, &zip_devices); hisi_qm_alg_unregister(qm, &zip_devices); -- 2.8.1