Re: [PATCH] ARM: EXYNOS: PD: Fix duplicate variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Wed, May 09, 2012 at 01:50:28PM +0100, Sangwook Lee wrote:
> struct generic_pm_domain already has a field for name. Use that field
> instead of creating another field in struct exynos_pm_domain

Argh.  No.

> @@ -99,7 +98,7 @@ static __init int exynos_pm_dt_parse_domains(void)
>  		if (of_get_property(np, "samsung,exynos4210-pd-off", NULL))
>  			pd->is_off = true;
> -		pd->name = np->name;
> +		pd-> = (char *)np->name;

Why this cast?  Why can't pd-> be correctly typed in the first place?

I assume this is because np->name is const.  Never EVER cast away const.
It's wrong to do so.
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Home]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Video Projectors]     [PDAs]     [Free Online Dating]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [16.7MP]

Add to Google Powered by Linux