From patchwork Wed May 29 22:50:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 10967909 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F3A521398 for ; Wed, 29 May 2019 22:50:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6170289EE for ; Wed, 29 May 2019 22:50:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAEB628A1A; Wed, 29 May 2019 22:50:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80643289EE for ; Wed, 29 May 2019 22:50:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726757AbfE2Wuq (ORCPT ); Wed, 29 May 2019 18:50:46 -0400 Received: from mail-eopbgr60074.outbound.protection.outlook.com ([40.107.6.74]:40056 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726604AbfE2Wup (ORCPT ); Wed, 29 May 2019 18:50:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G04EXZkjHCo20NN/knB0LUOWmRo9eVgSz0by4kya8q8=; b=BGM6UIoKfhC3aXE9zSKs2WHE1l0emIxXwv/VcxoHEpu8/ODxmVd3/e6FHxDfU0Lq7z1I7OIRhkLs+mF7a0Rr59361vhBd455sSICj2E8Z6+CwTBz5hr2YwrXtK7CKJpwd4MZRR9iemH7ZDkUrPHodTwC85sktO3pKBBATyV/PoY= Received: from VI1PR05MB5902.eurprd05.prod.outlook.com (20.178.125.223) by VI1PR05MB4351.eurprd05.prod.outlook.com (52.133.12.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.16; Wed, 29 May 2019 22:50:39 +0000 Received: from VI1PR05MB5902.eurprd05.prod.outlook.com ([fe80::dd31:2532:9adf:9b38]) by VI1PR05MB5902.eurprd05.prod.outlook.com ([fe80::dd31:2532:9adf:9b38%6]) with mapi id 15.20.1922.021; Wed, 29 May 2019 22:50:39 +0000 From: Saeed Mahameed To: Saeed Mahameed , Leon Romanovsky CC: "netdev@vger.kernel.org" , "linux-rdma@vger.kernel.org" , Parav Pandit Subject: [PATCH mlx5-next 5/6] {IB,net}/mlx5: No need to typecast from void* to mlx5_ib_dev* Thread-Topic: [PATCH mlx5-next 5/6] {IB,net}/mlx5: No need to typecast from void* to mlx5_ib_dev* Thread-Index: AQHVFnDvTQUzpc7HYkOtVoAS0PDoeQ== Date: Wed, 29 May 2019 22:50:39 +0000 Message-ID: <20190529224949.18194-6-saeedm@mellanox.com> References: <20190529224949.18194-1-saeedm@mellanox.com> In-Reply-To: <20190529224949.18194-1-saeedm@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.21.0 x-originating-ip: [209.116.155.178] x-clientproxiedby: BYAPR02CA0010.namprd02.prod.outlook.com (2603:10b6:a02:ee::23) To VI1PR05MB5902.eurprd05.prod.outlook.com (2603:10a6:803:df::31) authentication-results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e5b0ed70-6221-4937-2d16-08d6e48811bb x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:VI1PR05MB4351; x-ms-traffictypediagnostic: VI1PR05MB4351: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1417; x-forefront-prvs: 0052308DC6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(396003)(136003)(39860400002)(346002)(376002)(199004)(189003)(66446008)(73956011)(66946007)(64756008)(186003)(305945005)(76176011)(68736007)(66476007)(52116002)(107886003)(86362001)(1076003)(50226002)(4326008)(450100002)(66556008)(85306007)(6636002)(99286004)(54906003)(53936002)(102836004)(478600001)(6506007)(36756003)(8936002)(6512007)(8676002)(81156014)(110136005)(476003)(3846002)(6486002)(2616005)(256004)(26005)(5660300002)(6436002)(446003)(486006)(25786009)(2906002)(71200400001)(71190400001)(386003)(316002)(6116002)(66066001)(11346002)(14454004)(7736002)(81166006)(142933001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR05MB4351;H:VI1PR05MB5902.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Az5plj4f04wdFtGYVnicd0kX9T2fOT043tq9qE5AX1/w9bHCKJVmQeVEsbnWEXEQ62nN0B3BlXCvnNk5xALl2awL9n4TNwuvU/9F1NAtWOsDLQ/BGWscY/LA8ShjgEC1Y2CoFqjJ2MENDCO+qSTYgeqDX/afDTthSHMFaNDlsMJIthLZs9k0xIwvg4unZaO+s5NRbj1JukyrEASfkpnX1E3C2B50d7w0mwED6LdGKw5hywaROPA+SJ9FUfaHyqVgn9bOstTcIph8fjvd5NvPG/quE+Bu3SJHYRap26wVb3KU3aGm+9k2O8fMpiekE+qeDw/whAF0bTqcp0QlB0cdrJaaHCeg78kdvS6OXsdhRcH+K4EMTZrovJHZU7AmkZU7VFdgRbq3qaUK8S5FKBdcIrTf1XtYyIWTAIO1e7gFTjY= MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5b0ed70-6221-4937-2d16-08d6e48811bb X-MS-Exchange-CrossTenant-originalarrivaltime: 29 May 2019 22:50:39.1104 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: saeedm@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4351 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Parav Pandit Avoid typecasting from void* to mlx5_ib_dev* or mlx5e_rep_priv* as it is not needed. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed --- drivers/infiniband/hw/mlx5/ib_rep.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/ib_rep.h b/drivers/infiniband/hw/mlx5/ib_rep.h index 1d9778da8a50..c995102b0276 100644 --- a/drivers/infiniband/hw/mlx5/ib_rep.h +++ b/drivers/infiniband/hw/mlx5/ib_rep.h @@ -72,6 +72,6 @@ struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw, static inline struct mlx5_ib_dev *mlx5_ib_rep_to_dev(struct mlx5_eswitch_rep *rep) { - return (struct mlx5_ib_dev *)rep->rep_if[REP_IB].priv; + return rep->rep_if[REP_IB].priv; } #endif /* __MLX5_IB_REP_H__ */ diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h index 83b573b1abac..c40c025afd99 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h @@ -91,7 +91,7 @@ struct mlx5e_rep_priv { static inline struct mlx5e_rep_priv *mlx5e_rep_to_rep_priv(struct mlx5_eswitch_rep *rep) { - return (struct mlx5e_rep_priv *)rep->rep_if[REP_ETH].priv; + return rep->rep_if[REP_ETH].priv; } struct mlx5e_neigh {