From: Ganesh Mahendran Date: Sat, 13 Dec 2014 00:57:07 +0000 (-0800) Subject: mm/zsmalloc: avoid duplicate assignment of prev_class X-Git-Tag: omap-for-v3.20/drop-legacy-3517~97^2~37 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df8b5bb998f10cfc040ad30300f9a9ea4592ff82;p=pandora-kernel.git mm/zsmalloc: avoid duplicate assignment of prev_class In zs_create_pool(), prev_class is assigned (ZS_SIZE_CLASSES - 1) times. And the prev_class only references to the previous size_class. So we do not need unnecessary assignement. This patch assigns *prev_class* when a new size_class structure is allocated and uses prev_class to check whether the first class has been allocated. [akpm@linux-foundation.org: remove now-unused ZS_SIZE_CLASSES] Signed-off-by: Ganesh Mahendran Cc: Minchan Kim Cc: Nitin Gupta Reviewed-by: Dan Streetman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed