2006-10-31 00:56:21

by [email protected]

[permalink] [raw]
Subject: [patch]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.

Signed-off-by: nkalmala <[email protected]>
---

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b55bb35..bf2f6cf 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -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;



2006-10-31 10:16:17

by Rolf Eike Beer

[permalink] [raw]
Subject: Re: [patch]trivial: un-needed add-store operation wastes a few bytes

nkalmala wrote:
> Un-needed add-store operation wastes a few bytes.
> 8 bytes wasted with -O2, on a ppc.
>
> Signed-off-by: nkalmala <[email protected]>

Documentation/SubmittingPatches:

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

Greetings,

Eike


Attachments:
(No filename) (279.00 B)
(No filename) (189.00 B)
Download all attachments