Skip to contentSkip to conversation

block: Remove some unnecessary codes

PATCH Applied [email protected] 2 participants 3 messages May 10, 2012 – May 11, 2012 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 block: Remove some unnecessary codes

From: Zhi Yong Wu <[email protected]>

---
 block/partition-generic.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
block/partition-generic.c +0 -3
index 6df5d69..b6a9d5b 100644
@@ -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)
@@ -508,8 +507,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);
Signature · 1 line
1.7.6
#1 lore raw

HI, Jens,

Can you help queue this patch up?

Quoted 36 lines · On Thu, May 10, 2012 at 11:06 AM, <[email protected]> wrote:

From: Zhi Yong Wu <[email protected]>

---
 block/partition-generic.c |    3 ---

 1 files changed, 0 insertions(+), 3 deletions(-)
block/partition-generic.c +0 -4
index 6df5d69..b6a9d5b 100644
@@ -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)
@@ -508,8 +507,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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Signature · 3 lines
Regards,

Zhi Yong Wu
maintainer Applied
#2 lore raw
In reply to [email protected]
Quoted 20 lines · On 2012-05-10 05:06, [email protected] wrote:

From: Zhi Yong Wu <[email protected]>

---
 block/partition-generic.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
block/partition-generic.c +0 -1
index 6df5d69..b6a9d5b 100644
@@ -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)

block/partition-generic.c rescan: · line 512

Quoted 8 lines
block/partition-generic.c +0 -2
@@ -508,8 +507,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);

Thanks, applied.

Signature · 1 line
Jens Axboe