From: Michel Lespinasse Date: Tue, 7 May 2013 13:45:58 +0000 (-0700) Subject: rwsem: simplify __rwsem_do_wake X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~14^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cf5322ce69afea1fab6a6270db24d057d664798;p=pandora-kernel.git rwsem: simplify __rwsem_do_wake This is mostly for cleanup value: - We don't need several gotos to handle the case where the first waiter is a writer. Two simple tests will do (and generate very similar code). - In the remainder of the function, we know the first waiter is a reader, so we don't have to double check that. We can use do..while loops to iterate over the readers to wake (generates slightly better code). Signed-off-by: Michel Lespinasse Reviewed-by: Peter Hurley Acked-by: Davidlohr Bueso Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed