[PATCH resend] cxgb4/cxgb4vf: Remove superfluous void * cast in debugfs_create_file() call

Subsystems: cxgb4vf ethernet driver (cxgb4vf), networking drivers, the rest

STALE2285d

2 messages, 2 authors, 2020-05-05 · open the first message on its own page

[PATCH resend] cxgb4/cxgb4vf: Remove superfluous void * cast in debugfs_create_file() call

From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: 2020-05-05 13:34:05

There is no need to cast a typed pointer to a void pointer when calling
a function that accepts the latter.  Remove it, as the cast prevents
further compiler checks.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index 9cc3541a7e1cbca5..cec865a97464d292 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -2480,7 +2480,7 @@ static int setup_debugfs(struct adapter *adapter)
 	for (i = 0; i < ARRAY_SIZE(debugfs_files); i++)
 		debugfs_create_file(debugfs_files[i].name,
 				    debugfs_files[i].mode,
-				    adapter->debugfs_root, (void *)adapter,
+				    adapter->debugfs_root, adapter,
 				    debugfs_files[i].fops);
 
 	return 0;
-- 
2.17.1

Re: [PATCH resend] cxgb4/cxgb4vf: Remove superfluous void * cast in debugfs_create_file() call

From: David Miller <davem@davemloft.net>
Date: 2020-05-05 20:16:56

From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: Tue,  5 May 2020 15:34:00 +0200
There is no need to cast a typed pointer to a void pointer when calling
a function that accepts the latter.  Remove it, as the cast prevents
further compiler checks.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Applied to net-next, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help