From: Bjorn Helgaas Date: Wed, 5 Mar 2014 00:35:44 +0000 (-0700) Subject: phy: fix compiler array bounds warning on settings[] X-Git-Tag: v3.14-rc7~10^2~36 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ae6e50c76def306d726a5d2678e88998ad5258e;p=pandora-kernel.git phy: fix compiler array bounds warning on settings[] With -Werror=array-bounds, gcc v4.7.x warns that in phy_find_valid(), the settings[] "array subscript is above array bounds", I think because idx is a signed integer and if the caller supplied idx < 0, we pass the guard but still reference out of bounds. Fix this by making idx unsigned here and elsewhere. Signed-off-by: Bjorn Helgaas Acked-by: Florian Fainelli Signed-off-by: David S. Miller --- Reading git-diff-tree failed