lkml.org 
[lkml]   [2016]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] drivers : Remove unnecessary void pointer conversions
From
Date
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@ucsc.edu>
> ---
> 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

\
 
 \ /
  Last update: 2016-03-27 14:01    [W:0.034 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site