Skip to contentSkip to conversation

Adding branch to remove possible unnecessary inst

PATCH In review yc_zhou 2 participants 2 messages Dec 31, 2006 – Jan 2, 2007 Block layer

lore
Share & tools
lore

yc_zhou

author
#0 lore raw

PATCH 1/1 Adding branch to remove possible unnecessary inst

Function blk_queue_bounce_limit using dma flag to determine whether assigned a certain value for member of request_queue_t. But the assignment is unconditionally after the flag is set. It introduce possible unnecessary instructions.

---

block/ll_rw_blk.c 2006-12-31 13:34:05.032490528 +0800 renamed from block/ll_rw_blk.c.orig 2006-12-31 13:35:22.307742904 +0800 +0 -0
@@ -606,11 +606,13 @@ void blk_queue_bounce_limit(request_queu

know of a way to test this here. */
if (bounce_pfn < (min_t(u64,0xffffffff,BLK_BOUNCE_HIGH) >> PAGE_SHIFT)) dma = 1;
- q->bounce_pfn = max_low_pfn;
+ else
+ q->bounce_pfn = max_low_pfn;
#else
if (bounce_pfn < blk_max_low_pfn)
dma = 1;
- q->bounce_pfn = bounce_pfn;
+ else
+ q->bounce_pfn = bounce_pfn;
#endif
if (dma) {
init_emergency_isa_pool();

#1 lore raw
Quoted 4 lines · yc_zhou

Function blk_queue_bounce_limit using dma flag to determine whether assigned a certain value for member of request_queue_t. But the assignment is unconditionally after the flag is set. It introduce possible unnecessary instructions.

Your patch is white space damaged, it makes it hard to read and impossible to apply.

Note that blk_queue_bounce_limit() is an initialization function, so not much gained from optimizing on that.

Signature · 1 line
Jens Axboe