Re: [PATCH] drivers : Remove unnecessary void pointer conversions

From: Sergei Shtylyov
Date: Sun Mar 27 2016 - 07:46:14 EST


Hello.

On 3/27/2016 6:42 AM, Bhaskar Jupudi wrote:

Explicit void pointer conversion is unnecessary
because the conversions to and from a void pointer
are always implicit in 'C'. Changed two instances
of such conversions.


Signed-off-by: Bhaskar Jupudi <njupudi@xxxxxxxx>
---
This patch is based on Kernel Janitors To-Do list

drivers/net/ethernet/freescale/fman/fman.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fman/fman.c b/drivers/net/ethernet/freescale/fman/fman.c
index 623aa1c..8719f7b 100644
--- a/drivers/net/ethernet/freescale/fman/fman.c
+++ b/drivers/net/ethernet/freescale/fman/fman.c
@@ -2668,7 +2668,7 @@ static struct fman *read_dts_node(struct platform_device *of_dev)

fm_node = of_node_get(of_dev->dev.of_node);

- u32_prop = (const u32 *)of_get_property(fm_node, "cell-index", &lenp);
+ u32_prop = of_get_property(fm_node, "cell-index", &lenp);

This function returns a pointer to big-endian data, no?

if (!u32_prop) {
dev_err(&of_dev->dev, "%s: of_get_property(%s, cell-index) failed\n",
__func__, fm_node->full_name);
@@ -2724,7 +2724,7 @@ static struct fman *read_dts_node(struct platform_device *of_dev)
/* Rounding to MHz */
fman->dts_params.clk_freq = DIV_ROUND_UP(clk_rate, 1000000);

- u32_prop = (const u32 *)of_get_property(fm_node,
+ u32_prop = of_get_property(fm_node,

Same here...

"fsl,qman-channel-range",
&lenp);

Please re-align these continuation lines.

[...]

MBR, Sergei