diff mbox

[v2,04/14] thermal: mvebu: Remove unneeded variable initialization

Message ID 1363991114-4225-5-git-send-email-ezequiel.garcia@free-electrons.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ezequiel Garcia March 22, 2013, 10:25 p.m. UTC
This variable is used only after it's properly initialized,
so there's no need to set it to NULL in its declaration.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/thermal/mvebu_thermal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Eduardo Valentin April 11, 2013, 4:29 p.m. UTC | #1
Rui, Ezequiel,

On 22-03-2013 18:25, Ezequiel Garcia wrote:
> This variable is used only after it's properly initialized,
> so there's no need to set it to NULL in its declaration.
>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
>

I am fine with this patch. Though it doesn t hurt to have this 
initialization, the code looks cleaner though.

Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>


> ---
> drivers/thermal/mvebu_thermal.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/thermal/mvebu_thermal.c b/drivers/thermal/mvebu_thermal.c
> index 031f94d..1f502ed 100644
> --- a/drivers/thermal/mvebu_thermal.c
> +++ b/drivers/thermal/mvebu_thermal.c
> @@ -72,7 +72,7 @@ MODULE_DEVICE_TABLE(of, mvebu_thermal_id_table);
>
>   static int mvebu_thermal_probe(struct platform_device *pdev)
>   {
> -	struct thermal_zone_device *thermal = NULL;
> +	struct thermal_zone_device *thermal;
>   	struct mvebu_thermal_priv *priv;
>   	struct resource *res;
>
>
Eduardo Valentin April 11, 2013, 6:54 p.m. UTC | #2
Ezequiel,


On 11-04-2013 12:29, Eduardo Valentin wrote:
> Rui, Ezequiel,
>
> On 22-03-2013 18:25, Ezequiel Garcia wrote:
>> This variable is used only after it's properly initialized,
>> so there's no need to set it to NULL in its declaration.
>>
>> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
>>
>
> I am fine with this patch. Though it doesn t hurt to have this
> initialization, the code looks cleaner though.
>
> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>

I know you have discarded the idea of merging the driver into a single 
driver, but can you please resend this patch on top of 
drivers/thermal/kirkwood_thermal.c file. This change still applies.

>
>
>> ---
>> drivers/thermal/mvebu_thermal.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/thermal/mvebu_thermal.c
>> b/drivers/thermal/mvebu_thermal.c
>> index 031f94d..1f502ed 100644
>> --- a/drivers/thermal/mvebu_thermal.c
>> +++ b/drivers/thermal/mvebu_thermal.c
>> @@ -72,7 +72,7 @@ MODULE_DEVICE_TABLE(of, mvebu_thermal_id_table);
>>
>>   static int mvebu_thermal_probe(struct platform_device *pdev)
>>   {
>> -    struct thermal_zone_device *thermal = NULL;
>> +    struct thermal_zone_device *thermal;
>>       struct mvebu_thermal_priv *priv;
>>       struct resource *res;
>>
>>
>
>
>
diff mbox

Patch

diff --git a/drivers/thermal/mvebu_thermal.c b/drivers/thermal/mvebu_thermal.c
index 031f94d..1f502ed 100644
--- a/drivers/thermal/mvebu_thermal.c
+++ b/drivers/thermal/mvebu_thermal.c
@@ -72,7 +72,7 @@  MODULE_DEVICE_TABLE(of, mvebu_thermal_id_table);
 
 static int mvebu_thermal_probe(struct platform_device *pdev)
 {
-	struct thermal_zone_device *thermal = NULL;
+	struct thermal_zone_device *thermal;
 	struct mvebu_thermal_priv *priv;
 	struct resource *res;