Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2602380lqz; Wed, 3 Apr 2024 03:09:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWTg3ZjUxkwtBpVra8oRzP0kXKHkG8PjBvY8uiFuAh5OrctDuUh+D6TFHDlWa08kUwFdizEOuk5XZbzgQCP1klcYLl+sO2q2Hbna2fUpQ== X-Google-Smtp-Source: AGHT+IHB/7ebJIJVfymrx4NkMko1svnUkVmClttfhsGfKeaL7APHZDDd79FfxYJNIskCplICHC3E X-Received: by 2002:a50:a69e:0:b0:56d:c768:731c with SMTP id e30-20020a50a69e000000b0056dc768731cmr3828962edc.5.1712138953581; Wed, 03 Apr 2024 03:09:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712138953; cv=pass; d=google.com; s=arc-20160816; b=O/YXeEQZa8JfbvrYVNj3SXR/sC76uqtTns8OEPqtuPdH9Hj5TouTOtJsk+KkvMI1eE UkFJ5jybcizefvZ4Xr48Po+AOqEV8v/FrwIkno+WM+4YsKYCrLovRNfyb7L5RTCkyw/F axyysjQjzVT+qvAYM8OUvEV1v7j912C99y5XlalG34AutAQ+G8h7kEvRnS9yY6gLN/Eq ErOSZOF2T2mYKQdchCeDni4y0oK+6pezAQ9zF7XvieHxqahkSUPhQy/gRIYxLQTvVAnD b5yrdI91Hl4LxAwMqB2h5hcXpSwLjMq4JOYo64xVaPk9eGUo293X8R/eTEq4mJTYM5x/ p0kQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=IfjCaKY/wckd4ZtbqeONfA7LbY0JtT1IfmR+x5wNH58=; fh=VzMToBYo5MUfLaQO74C2Chjt/otG4r80qnd7ynZ/RBQ=; b=LWWZJ64HJjxK0MaNAHmami87GSVObsFRlFoBsoOVeEQh1x6PSMs0ucvtET9dOLQLil pVvHiLxtSkMm7K9tl6WHkQhCWE/n7EqcRF2qw42GMGxdRbM9FZ2rzbYv0pClYi3sqqeX YRslO214MqOvV8UXYBAcgYFOchP/h+Q/0LVWS2JldOlVia4x98dNRiCdpx5sWTKMv2cS N4NHJwQxKgAzlVukzEhFDdknO7oK4PoRKa74wAC8L4WVYxXNTm7D+f8FSZ/Ru0PxPW/g XZ97sNgUqSljB32om+0wbC1S89F20g3k07cU76sG5n5+ds1EZzH8eaj1jrzCgv2S20Om CZ0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-129496-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129496-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id y9-20020a056402358900b0056e0dc9561csi43825edc.437.2024.04.03.03.09.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 03:09:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129496-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-129496-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129496-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 38D681F28F23 for ; Wed, 3 Apr 2024 10:07:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58FDC137774; Wed, 3 Apr 2024 10:05:44 +0000 (UTC) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D31A413D603; Wed, 3 Apr 2024 10:05:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712138743; cv=none; b=E1jvHxNW1QoVWpsKpqb1DH7j6d+v1N2tTDXENz7Rhh9dZQhBgBU3ASo2+9V1KDuLcntAvwOZtaFDq+AfBBZk8/919qvxePsWNkm6LJPh1kEFFIOi9MbEjqCTNFoRWQwWmGCasdSioCkF1PkT7hrWgRLS0w4RG5H42i5UtoTVxNY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712138743; c=relaxed/simple; bh=INGEGqdsSMSW8P5U9FPTJWpgdgTcifxfTvht2tN20+A=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gj6UxY7JjUCU2foQB5iNMB4roOqf/LWYksV/AEEW+hQc+i5Fl1rFahlHe7Bc+dvRUIlL0YXDMzypbqlYGMZcCtzewEt9kH1stjtXwUHjnyOdNt/ihYVHwVI/cR9QV7BADK0rYJrlE0QnWkPujWPbDk9B3wSUSVDAyXgsdKAW394= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.162.254]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4V8gLH1lnfz1JB5G; Wed, 3 Apr 2024 18:03:19 +0800 (CST) Received: from dggpemd200003.china.huawei.com (unknown [7.185.36.122]) by mail.maildlp.com (Postfix) with ESMTPS id B332518007E; Wed, 3 Apr 2024 18:05:27 +0800 (CST) Received: from localhost.localdomain (10.67.165.2) by dggpemd200003.china.huawei.com (7.185.36.122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Wed, 3 Apr 2024 18:05:27 +0800 From: Chenghai Huang To: , CC: , , , , , , , , , , , Subject: [PATCH 1/9] crypto: hisilicon/sec - Add the condition for configuring the sriov function Date: Wed, 3 Apr 2024 18:00:54 +0800 Message-ID: <20240403100102.2735306-2-huangchenghai2@huawei.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20240403100102.2735306-1-huangchenghai2@huawei.com> References: <20240403100102.2735306-1-huangchenghai2@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemd200003.china.huawei.com (7.185.36.122) When CONFIG_PCI_IOV is disabled, the SRIOV configuration function is not required. An error occurs if this function is incorrectly called. Consistent with other modules, add the condition for configuring the sriov function of sec_pci_driver. Signed-off-by: Chenghai Huang --- drivers/crypto/hisilicon/sec2/sec_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/sec2/sec_main.c b/drivers/crypto/hisilicon/sec2/sec_main.c index c290d8937b19..f4e10741610f 100644 --- a/drivers/crypto/hisilicon/sec2/sec_main.c +++ b/drivers/crypto/hisilicon/sec2/sec_main.c @@ -1324,7 +1324,8 @@ static struct pci_driver sec_pci_driver = { .probe = sec_probe, .remove = sec_remove, .err_handler = &sec_err_handler, - .sriov_configure = hisi_qm_sriov_configure, + .sriov_configure = IS_ENABLED(CONFIG_PCI_IOV) ? + hisi_qm_sriov_configure : NULL, .shutdown = hisi_qm_dev_shutdown, .driver.pm = &sec_pm_ops, }; -- 2.30.0