* [PATCH net-next v2 05/10] net: hns: Remove unnecessary (void*) conversions
@ 2023-07-10 6:40 Su Hui
2023-07-11 2:17 ` Hao Lan
0 siblings, 1 reply; 2+ messages in thread
From: Su Hui @ 2023-07-10 6:40 UTC (permalink / raw)
To: yisen.zhuang, salil.mehta, davem, edumazet, kuba, pabeni
Cc: netdev, linux-kernel, kernel-janitors, wuych
From: wuych <yunchuan@nfschina.com>
Pointer variables of void * type do not require type cast.
Signed-off-by: wuych <yunchuan@nfschina.com>
---
drivers/net/ethernet/hisilicon/hns_mdio.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns_mdio.c b/drivers/net/ethernet/hisilicon/hns_mdio.c
index 9232caaf0bdc..409a89d80220 100644
--- a/drivers/net/ethernet/hisilicon/hns_mdio.c
+++ b/drivers/net/ethernet/hisilicon/hns_mdio.c
@@ -217,7 +217,7 @@ static void hns_mdio_cmd_write(struct hns_mdio_device *mdio_dev,
static int hns_mdio_write_c22(struct mii_bus *bus,
int phy_id, int regnum, u16 data)
{
- struct hns_mdio_device *mdio_dev = (struct hns_mdio_device *)bus->priv;
+ struct hns_mdio_device *mdio_dev = bus->priv;
u16 reg = (u16)(regnum & 0xffff);
u16 cmd_reg_cfg;
int ret;
@@ -259,7 +259,7 @@ static int hns_mdio_write_c22(struct mii_bus *bus,
static int hns_mdio_write_c45(struct mii_bus *bus, int phy_id, int devad,
int regnum, u16 data)
{
- struct hns_mdio_device *mdio_dev = (struct hns_mdio_device *)bus->priv;
+ struct hns_mdio_device *mdio_dev = bus->priv;
u16 reg = (u16)(regnum & 0xffff);
u16 cmd_reg_cfg;
int ret;
@@ -312,7 +312,7 @@ static int hns_mdio_write_c45(struct mii_bus *bus, int phy_id, int devad,
*/
static int hns_mdio_read_c22(struct mii_bus *bus, int phy_id, int regnum)
{
- struct hns_mdio_device *mdio_dev = (struct hns_mdio_device *)bus->priv;
+ struct hns_mdio_device *mdio_dev = bus->priv;
u16 reg = (u16)(regnum & 0xffff);
u16 reg_val;
int ret;
@@ -363,7 +363,7 @@ static int hns_mdio_read_c22(struct mii_bus *bus, int phy_id, int regnum)
static int hns_mdio_read_c45(struct mii_bus *bus, int phy_id, int devad,
int regnum)
{
- struct hns_mdio_device *mdio_dev = (struct hns_mdio_device *)bus->priv;
+ struct hns_mdio_device *mdio_dev = bus->priv;
u16 reg = (u16)(regnum & 0xffff);
u16 reg_val;
int ret;
@@ -424,7 +424,7 @@ static int hns_mdio_read_c45(struct mii_bus *bus, int phy_id, int devad,
*/
static int hns_mdio_reset(struct mii_bus *bus)
{
- struct hns_mdio_device *mdio_dev = (struct hns_mdio_device *)bus->priv;
+ struct hns_mdio_device *mdio_dev = bus->priv;
const struct hns_mdio_sc_reg *sc_reg;
int ret;
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net-next v2 05/10] net: hns: Remove unnecessary (void*) conversions
2023-07-10 6:40 [PATCH net-next v2 05/10] net: hns: Remove unnecessary (void*) conversions Su Hui
@ 2023-07-11 2:17 ` Hao Lan
0 siblings, 0 replies; 2+ messages in thread
From: Hao Lan @ 2023-07-11 2:17 UTC (permalink / raw)
To: Su Hui, yisen.zhuang, salil.mehta, davem, edumazet, kuba, pabeni
Cc: netdev, linux-kernel, kernel-janitors, wuych
On 2023/7/10 14:40, Su Hui wrote:
> From: wuych <yunchuan@nfschina.com>
>
> Pointer variables of void * type do not require type cast.
>
> Signed-off-by: wuych <yunchuan@nfschina.com>
> ---
> drivers/net/ethernet/hisilicon/hns_mdio.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
Reviewed-by: Hao Lan <lanhao@huawei.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-11 2:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-10 6:40 [PATCH net-next v2 05/10] net: hns: Remove unnecessary (void*) conversions Su Hui
2023-07-11 2:17 ` Hao Lan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®