From: Rafał Miłecki Date: Tue, 12 May 2015 16:46:12 +0000 (+0200) Subject: MIPS: BCM47XX: Simplify function looking for NVRAM entry X-Git-Tag: omap-for-v4.2/fixes-rc1^2~82^2~127 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bfad4eee93df88def330ac9b021bacccb51bdff;p=pandora-kernel.git MIPS: BCM47XX: Simplify function looking for NVRAM entry First of all it shouldn't modify copied NVRAM just to make sure it can loop over all entries. It's enough to just compare current position pointer with the end of buffer address. Secondly buffer is guaranteed to be \0 ended, so we don't need strnchr. Signed-off-by: Rafał Miłecki Cc: linux-mips@linux-mips.org Cc: Hauke Mehrtens Cc: Hante Meuleman Cc: Ian Kent Patchwork: https://patchwork.linux-mips.org/patch/10032/ Signed-off-by: Ralf Baechle --- Reading git-diff-tree failed