Skip to contentSkip to conversation

trivial: un-needed add-store operation wastes a few bytes

PATCH In review nkalmala 2 participants 2 messages Oct 31, 2006

Subsystems (2)
lore
Share & tools
lore

nkalmala

author
#0 lore raw

PATCH 1/1 trivial: un-needed add-store operation wastes a few bytes

Un-needed add-store operation wastes a few bytes.
8 bytes wasted with -O2, on a ppc.

---

mm/page_alloc.c +0 -0
index b55bb35..bf2f6cf 100644
@@ -853,7 +853,7 @@ again:
		pcp = &zone_pcp(zone, cpu)->pcp[cold];
		local_irq_save(flags);
		if (!pcp->count) {
-			pcp->count += rmqueue_bulk(zone, 0,
+			pcp->count = rmqueue_bulk(zone, 0,
						pcp->batch, &pcp->list);
			if (unlikely(!pcp->count))
				goto failed;
#1 lore raw
Quoted 4 lines · nkalmala

Un-needed add-store operation wastes a few bytes.
8 bytes wasted with -O2, on a ppc.

Documentation/SubmittingPatches:

using your real name (sorry, no pseudonyms or anonymous contributions.)

Greetings,

Eike