The patch titled pid: reduce code size by using a pointer to iterate over array has been added to the -mm tree. Its filename is pid-reduce-code-size-by-using-a-pointer-to-iterate-over-array.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: pid: reduce code size by using a pointer to iterate over array From: André Goddard Rosa <andre.goddard@xxxxxxxxx> It decreases code size by 16 bytes on my gcc 4.4.1 on Core 2: text data bss dec hex filename 4314 2216 8 6538 198a kernel/pid.o-BEFORE 4298 2216 8 6522 197a kernel/pid.o-AFTER Signed-off-by: André Goddard Rosa <andre.goddard@xxxxxxxxx> Cc: Pekka Enberg <penberg@xxxxxxxxxxxxxx> Cc: Oleg Nesterov <oleg@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/pid.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff -puN kernel/pid.c~pid-reduce-code-size-by-using-a-pointer-to-iterate-over-array kernel/pid.c --- a/kernel/pid.c~pid-reduce-code-size-by-using-a-pointer-to-iterate-over-array +++ a/kernel/pid.c @@ -269,12 +269,11 @@ struct pid *alloc_pid(struct pid_namespa for (type = 0; type < PIDTYPE_MAX; ++type) INIT_HLIST_HEAD(&pid->tasks[type]); + upid = pid->numbers + ns->level; spin_lock_irq(&pidmap_lock); - for (i = ns->level; i >= 0; i--) { - upid = &pid->numbers[i]; + for ( ; upid >= pid->numbers; --upid) hlist_add_head_rcu(&upid->pid_chain, &pid_hash[pid_hashfn(upid->nr, upid->ns)]); - } spin_unlock_irq(&pidmap_lock); out: _ Patches currently in -mm which might be from andre.goddard@xxxxxxxxx are linux-next.patch vsprintf-factorize-null-string.patch vsprintf-pre-calculate-final-string-length-for-later-use.patch vsprintf-give-it-some-care-to-please-checkpatchpl.patch vsprintf-use-tolower-whenever-possible.patch vsprintf-reduce-code-size-by-avoiding-extra-check.patch vsprintf-move-local-vars-to-block-local-vars-and-remove-unneeded-ones.patch vsprintf-factor-out-skip_space-code-in-a-separate-function.patch vsprintf-reuse-almost-identical-simple_strtoulx-functions.patch ctype-constify-read-only-_ctype-string.patch string-factorize-skip_spaces-and-export-it-to-be-generally-available.patch string-on-strstrip-first-remove-leading-spaces-before-running-over-str.patch tree-wide-convert-open-calls-to-remove-spaces-to-skip_spaces-lib-function.patch parser-remove-unnecessary-strlen.patch pid-tighten-pidmap-spinlock-critical-section-by-removing-kfree.patch pid-reduce-code-size-by-using-a-pointer-to-iterate-over-array.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html