From: Markos Chandras Date: Mon, 18 Aug 2014 14:04:11 +0000 (+0100) Subject: MIPS: Malta: Improve system memory detection for '{e, }memsize' >= 2G X-Git-Tag: omap-for-v3.17/fixes-against-rc2~14^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64615682658373516863b5b5971ff1d922d0ae7b;p=pandora-kernel.git MIPS: Malta: Improve system memory detection for '{e, }memsize' >= 2G Using kstrtol to parse the "{e,}memsize" variables was wrong because this parses signed long numbers. In case of '{e,}memsize' >= 2G, the top bit is set, resulting to -ERANGE errors and possibly random system memory boundaries. We fix this by replacing "kstrtol" with "kstrtoul". We also improve the code to check the kstrtoul return value and print a warning if an error was returned. Signed-off-by: Markos Chandras Cc: # v3.15+ Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/7543/ Signed-off-by: Ralf Baechle --- Reading git-diff-tree failed