From: Alan Douglas Date: Wed, 23 Jul 2014 10:06:40 +0000 (+0400) Subject: xtensa: fix address checks in dma_{alloc,free}_coherent X-Git-Tag: omap-fixes-against-v3.17-rc3~14^2^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ca49463c44c970b1ab1d71b0f268bfdf8427a7e;p=pandora-kernel.git xtensa: fix address checks in dma_{alloc,free}_coherent Virtual address is translated to the XCHAL_KSEG_CACHED region in the dma_free_coherent, but is checked to be in the 0...XCHAL_KSEG_SIZE range. Change check for end of the range from 'addr >= X' to 'addr > X - 1' to handle the case of X == 0. Replace 'if (C) BUG();' construct with 'BUG_ON(C);'. Cc: stable@vger.kernel.org Signed-off-by: Alan Douglas Signed-off-by: Max Filippov --- Reading git-diff-tree failed