From patchwork Tue Feb 22 17:16:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 12755721 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11EE7C433EF for ; Tue, 22 Feb 2022 17:18:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234610AbiBVRSk (ORCPT ); Tue, 22 Feb 2022 12:18:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234604AbiBVRSj (ORCPT ); Tue, 22 Feb 2022 12:18:39 -0500 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2088.outbound.protection.outlook.com [40.107.220.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07F2F162024 for ; Tue, 22 Feb 2022 09:18:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N7SSgU/WgFwYvvXxmdiDNnGNlF0Ou4x/bhm/l/skNfRv8vW7HVyUwuGihQNPPiMQl+Ml8sou2Zo2FomkBHTiKWdmPr+O0tOYJ7c5gTp9QFOLPwqPKJqTYNVL9cSjIo3H6nRvj187Z1f3Yu6clRPN74zOFA5UKVatZN63W/F1+Z7tzbbIzDUjGGcWJxjuCz6DhYP0OtCFFs0VHif5J54BQxeLDz5Y4K1ZVNnjlao1zaPEfSWKcA513hbP0tcaCQmwHPDWq/0WEAw/O7eHkKbn0nTqZ3/BSguuoz9evcM+Lj2V5W9MSPwzwSYZnJ51307u6wKewBd4AL6dBWvZesUtVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=upIIBueZOMSFugXauE9kqZUDdevU6dmo+/5mQ6/Tcjs=; b=JX2qqShHsIxJCPvUOoo14lLmsaa89ahzSpNGVrXypVC/JwThm8/kAAi86Rzoba9p/lJuFsqzNAqCJd5DQUMQtfoyS3BbQ/xfFhQ0lNozSAW5+RNtLEEQL2l4n3dNPiNKDDfK7GtTA2/xwg0jItSTPuwSlO604eMa+r74zLFSgaHiV52+HKX2VrAp3JNcjx+UtsCStPsmqNk9IW6SEEdpPapdfREIj1Ae+fGXDjYeB+qdcmGr4H4JAO2u/0kyKhcO6cMYyp3F7EpLGZXBwTTxueVgM8q8f35/LKl0XcbK3p9vfrlOjK/Eu/mjOyfcwvahMc/fwO7dQkgloG5CohT48A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=upIIBueZOMSFugXauE9kqZUDdevU6dmo+/5mQ6/Tcjs=; b=dE/CL7MEqJrktljeOevbIID0Tjsj4yUYvJfkOQcbspNQgOr26hxoX1k2xBDV1wTQN3sx/d70Dp0BAs0rLimCmomQuZ5LHRUFJOjfbvwtqvJMCmdNfUTSpHwh5b7u3uIjHHZP5iELTzGi/uiUKHPKOofsm49vWFJ5+vUVViZmeA3A4xGttIZV0umMUtPCmPpkbuqWZW00P1O3RbRb3hoxlNxMjt8N3whf5aDU1IIHeEDehlzu4QLGkcQhMGZE0JsIc+mh0VY+uAIIKyiOqrpYTQfyIzbFbAC9uBkpTa2DGGKQEJSNXS75I03XWXhEH02accwVNW5FRRwCBDRTF7FjEQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from DM6PR12MB4337.namprd12.prod.outlook.com (2603:10b6:5:2a9::12) by CH2PR12MB4262.namprd12.prod.outlook.com (2603:10b6:610:af::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.14; Tue, 22 Feb 2022 17:18:12 +0000 Received: from DM6PR12MB4337.namprd12.prod.outlook.com ([fe80::95a1:8c7f:10ef:2581]) by DM6PR12MB4337.namprd12.prod.outlook.com ([fe80::95a1:8c7f:10ef:2581%7]) with mapi id 15.20.5017.022; Tue, 22 Feb 2022 17:18:12 +0000 From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, petrm@nvidia.com, jiri@nvidia.com, danieller@nvidia.com, vadimp@nvidia.com, Ido Schimmel Subject: [PATCH net-next 06/12] mlxsw: core_thermal: Remove obsolete API for query resource Date: Tue, 22 Feb 2022 19:16:57 +0200 Message-Id: <20220222171703.499645-7-idosch@nvidia.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220222171703.499645-1-idosch@nvidia.com> References: <20220222171703.499645-1-idosch@nvidia.com> X-ClientProxiedBy: VI1PR07CA0294.eurprd07.prod.outlook.com (2603:10a6:800:130::22) To DM6PR12MB4337.namprd12.prod.outlook.com (2603:10b6:5:2a9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9eb8dad4-0e6e-4f85-6bbf-08d9f6274e18 X-MS-TrafficTypeDiagnostic: CH2PR12MB4262:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /SONjovzXgbWBEKJqQt4UmkznOUWaAzCDFK/A1JEwmICp8pf6HsFWujG+XlyCzAGS6vmp3wWJ+yESN05rxIYkIIGam7x5PrNDshVi3NQ7EI78v27HR8hqxSuuFKbjBfoaBSfHmRLRGC1Y+rVSZjEctaAYDUlCWZ7FM69GTLfIPaUrkVV+fEf+ql3POngdlkOmk5v6kbG49SXxqiXf/9dGOhbh+tLRHFL+iS9nvVbk3ZD+Bz/6H2+tqu/67B1QWeGcoXU0ik0SYFFDGSDWqvBNshDbMCBCyP4H/1KPTH9885rPK/f813JwcXurfchiljHULWF0g/DhupcYONwNamaiR9rrznZ6MB09aLAoRm121N8mUXPpZy7R+YQoFEymA+KzEE+Kl084nXYArCJ+9MKXz4t5S3wbaSJo7qRNcP/doLmkPGqrTQdCyEkqJQq3kl7hJGw9gcHfBnooTOAaJRGyyOxmLp1kRVuv6Dmh36WR6Dm90iTHq9T18ujjV+Fi8tkLOefyIrxQDR3442yc+ud/2MVIzkzjPIBL7BzmwZHjnNyenOU3B0U5l6sLjpO2LKmEVghuz6nGCbFhz6bOp+Q5PEirdiRn8v9e0HgMD57MYgeDEN/0f0/wpDN1B3NDML4dVFdV6+3qcQnurCvCfCMEQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB4337.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(66946007)(66556008)(6916009)(66476007)(83380400001)(508600001)(4326008)(36756003)(8676002)(6666004)(6506007)(6486002)(5660300002)(186003)(107886003)(26005)(1076003)(86362001)(316002)(2906002)(8936002)(38100700002)(2616005)(6512007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /vB70PuW3qLD34qtvlsJVT49/3evNlySuQl6Abtf/yYGtP4rSh4wmfxPhZ4VvMIcsCV/mLSDzfBEbIUTjt1icbHqbUfXhSE+mRdhC9ou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8oXjl8OSnpDQqfZEsVP8p+1UqUwNY3KzQnbYBrbmzr5RlWDFEIzmT3S6XZm6sCymjQSk2N2apaPgvQlw4sTL2+1fAmUbGp9DG9/bfG8IM/meDyauy8IWU/k0JgKOQn6JOl8FDCtL6q1whaDRAOYWN9JkVjjzAyvOx8k/ZxjnR6NhqgEuD9MDt4RWIa10HnCkQz1ulP1g6g70lpupPkEaqO0JLs9Ur4l8sBjLyU3whjh9RVenV4aSU58hcWFcmowimVnh81p/VnMgR5hvuyGkiHtsJGhIVljq/3TTbbH/oleNQsN//GADp2RTY4fMbBpXJO07S2skNTXmRMVPpXug3dMmBtwXdb0iicRpISdcoYamJxmNaxWu83z7UD5oGqD+Al7JAvbhQoSZiyQeH7upzbdzeTW/KWDhwjSp3JWBOmjXIKQ0VO0sjoPWKw7s19gdWxE= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9eb8dad4-0e6e-4f85-6bbf-08d9f6274e18 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4337.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2022 17:18:12.6672 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8uDO6HoQsp3Oe0zTM5C/tY2sO3IAm1Js9y26pQAQRLjrl4Oo79j3vay/g3SzOB1TR+MsMGNFahQiFw5alwgVFQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4262 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Vadim Pasternak Remove obsolete API mlxsw_core_res_query_enabled(), which is only relevant for end-of-life SwitchX-2 ASICs. Support for these ASICs was removed in commit b0d80c013b04 ("mlxsw: Remove Mellanox SwitchX-2 ASIC support"). Signed-off-by: Vadim Pasternak Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/core.c | 6 ------ drivers/net/ethernet/mellanox/mlxsw/core.h | 2 -- drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | 3 --- drivers/net/ethernet/mellanox/mlxsw/core_thermal.c | 12 ------------ 4 files changed, 23 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.c b/drivers/net/ethernet/mellanox/mlxsw/core.c index 1c6c1ea107a1..aefd3eeb3c9f 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core.c @@ -177,12 +177,6 @@ void *mlxsw_core_driver_priv(struct mlxsw_core *mlxsw_core) } EXPORT_SYMBOL(mlxsw_core_driver_priv); -bool mlxsw_core_res_query_enabled(const struct mlxsw_core *mlxsw_core) -{ - return mlxsw_core->driver->res_query_enabled; -} -EXPORT_SYMBOL(mlxsw_core_res_query_enabled); - bool mlxsw_core_temp_warn_enabled(const struct mlxsw_core *mlxsw_core) { return mlxsw_core->driver->temp_warn_enabled; diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.h b/drivers/net/ethernet/mellanox/mlxsw/core.h index 6d304092f4e7..e973c056f0b4 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core.h +++ b/drivers/net/ethernet/mellanox/mlxsw/core.h @@ -35,8 +35,6 @@ unsigned int mlxsw_core_max_ports(const struct mlxsw_core *mlxsw_core); void *mlxsw_core_driver_priv(struct mlxsw_core *mlxsw_core); -bool mlxsw_core_res_query_enabled(const struct mlxsw_core *mlxsw_core); - bool mlxsw_core_temp_warn_enabled(const struct mlxsw_core *mlxsw_core); bool diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c index 3788d02b5244..8b170ad92302 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c @@ -655,9 +655,6 @@ static int mlxsw_hwmon_module_init(struct mlxsw_hwmon *mlxsw_hwmon) u8 module_sensor_max; int i, err; - if (!mlxsw_core_res_query_enabled(mlxsw_hwmon->core)) - return 0; - mlxsw_reg_mgpir_pack(mgpir_pl); err = mlxsw_reg_query(mlxsw_hwmon->core, MLXSW_REG(mgpir), mgpir_pl); if (err) diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c index 784f9c7650d1..05f54bd982c0 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c @@ -746,9 +746,6 @@ mlxsw_thermal_modules_init(struct device *dev, struct mlxsw_core *core, char mgpir_pl[MLXSW_REG_MGPIR_LEN]; int i, err; - if (!mlxsw_core_res_query_enabled(core)) - return 0; - mlxsw_reg_mgpir_pack(mgpir_pl); err = mlxsw_reg_query(core, MLXSW_REG(mgpir), mgpir_pl); if (err) @@ -793,9 +790,6 @@ mlxsw_thermal_modules_fini(struct mlxsw_thermal *thermal) { int i; - if (!mlxsw_core_res_query_enabled(thermal->core)) - return; - for (i = thermal->tz_module_num - 1; i >= 0; i--) mlxsw_thermal_module_fini(&thermal->tz_module_arr[i]); kfree(thermal->tz_module_arr); @@ -843,9 +837,6 @@ mlxsw_thermal_gearboxes_init(struct device *dev, struct mlxsw_core *core, int i; int err; - if (!mlxsw_core_res_query_enabled(core)) - return 0; - mlxsw_reg_mgpir_pack(mgpir_pl); err = mlxsw_reg_query(core, MLXSW_REG(mgpir), mgpir_pl); if (err) @@ -889,9 +880,6 @@ mlxsw_thermal_gearboxes_fini(struct mlxsw_thermal *thermal) { int i; - if (!mlxsw_core_res_query_enabled(thermal->core)) - return; - for (i = thermal->tz_gearbox_num - 1; i >= 0; i--) mlxsw_thermal_gearbox_tz_fini(&thermal->tz_gearbox_arr[i]); kfree(thermal->tz_gearbox_arr);