public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: remove some unnecessary codes
@ 2012-05-10  2:13 zwu.kernel
  2012-05-10  2:58 ` Thiago Rafel Becker
  0 siblings, 1 reply; 3+ messages in thread
From: zwu.kernel @ 2012-05-10  2:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: axboe, wuzhy, stefanha

From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
---
 block/partition-generic.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/block/partition-generic.c b/block/partition-generic.c
index 6df5d69..4c03880 100644
--- a/block/partition-generic.c
+++ b/block/partition-generic.c
@@ -473,7 +473,6 @@ rescan:
 	/* add partitions */
 	for (p = 1; p < state->limit; p++) {
 		sector_t size, from;
-		struct partition_meta_info *info = NULL;
 
 		size = state->parts[p].size;
 		if (!size)
@@ -509,7 +508,6 @@ rescan:
 		}
 
 		if (state->parts[p].has_info)
-			info = &state->parts[p].info;
 		part = add_partition(disk, p, from, size,
 				     state->parts[p].flags,
 				     &state->parts[p].info);
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: remove some unnecessary codes
  2012-05-10  2:13 [PATCH] block: remove some unnecessary codes zwu.kernel
@ 2012-05-10  2:58 ` Thiago Rafel Becker
  2012-05-10  3:04   ` Zhi Yong Wu
  0 siblings, 1 reply; 3+ messages in thread
From: Thiago Rafel Becker @ 2012-05-10  2:58 UTC (permalink / raw)
  To: zwu.kernel; +Cc: linux-kernel, axboe, wuzhy, stefanha

You should also remove the if statement on line 511.

On Thu, 10 May 2012, zwu.kernel@gmail.com wrote:

> From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
>
> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> ---
>  block/partition-generic.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/block/partition-generic.c b/block/partition-generic.c
> index 6df5d69..4c03880 100644
> --- a/block/partition-generic.c
> +++ b/block/partition-generic.c
> @@ -473,7 +473,6 @@ rescan:
>  	/* add partitions */
>  	for (p = 1; p < state->limit; p++) {
>  		sector_t size, from;
> -		struct partition_meta_info *info = NULL;
>
>  		size = state->parts[p].size;
>  		if (!size)
> @@ -509,7 +508,6 @@ rescan:
>  		}
>
>  		if (state->parts[p].has_info)
> -			info = &state->parts[p].info;
>  		part = add_partition(disk, p, from, size,
>  				     state->parts[p].flags,
>  				     &state->parts[p].info);
> --
> 1.7.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: remove some unnecessary codes
  2012-05-10  2:58 ` Thiago Rafel Becker
@ 2012-05-10  3:04   ` Zhi Yong Wu
  0 siblings, 0 replies; 3+ messages in thread
From: Zhi Yong Wu @ 2012-05-10  3:04 UTC (permalink / raw)
  To: Thiago Rafel Becker; +Cc: linux-kernel, axboe, wuzhy, stefanha

On Thu, May 10, 2012 at 10:58 AM, Thiago Rafel Becker
<trbecker@trbecker.org> wrote:
> You should also remove the if statement on line 511.
Yeah, good comment. thanks. pls see v2.
>
> On Thu, 10 May 2012, zwu.kernel@gmail.com wrote:
>
>> From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
>>
>> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
>> ---
>>  block/partition-generic.c |    2 --
>>  1 files changed, 0 insertions(+), 2 deletions(-)
>>
>> diff --git a/block/partition-generic.c b/block/partition-generic.c
>> index 6df5d69..4c03880 100644
>> --- a/block/partition-generic.c
>> +++ b/block/partition-generic.c
>> @@ -473,7 +473,6 @@ rescan:
>>       /* add partitions */
>>       for (p = 1; p < state->limit; p++) {
>>               sector_t size, from;
>> -             struct partition_meta_info *info = NULL;
>>
>>               size = state->parts[p].size;
>>               if (!size)
>> @@ -509,7 +508,6 @@ rescan:
>>               }
>>
>>               if (state->parts[p].has_info)
>> -                     info = &state->parts[p].info;
>>               part = add_partition(disk, p, from, size,
>>                                    state->parts[p].flags,
>>                                    &state->parts[p].info);
>> --
>> 1.7.6
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
>>



-- 
Regards,

Zhi Yong Wu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-10  3:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-10  2:13 [PATCH] block: remove some unnecessary codes zwu.kernel
2012-05-10  2:58 ` Thiago Rafel Becker
2012-05-10  3:04   ` Zhi Yong Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox