lib/kstrtox: common code between kstrto*() and simple_strto*() functions