diff options
author | Vasiliy Kulikov <segooon@gmail.com> | 2010-10-17 18:51:41 +0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2011-03-15 22:19:16 +0300 |
commit | b0aea14bdc4a9ee5d1e8cb78488263d6ce32095e (patch) | |
tree | 7c6ce5aa12a90a31f22ac73bd12c65f9406a1699 /arch/powerpc | |
parent | a2b31dd93000136d82f675952e322ec18973a348 (diff) | |
download | linux-b0aea14bdc4a9ee5d1e8cb78488263d6ce32095e.tar.xz |
powerpc/85xx: Fix signedness bug in cache-sram
sram_params.sram_size and sram_params.sram_offset were unsigned.
If get_cache_sram_size() or get_cache_sram_offset() returns error code
then it is not seen to the caller. Made sram_size and sram_offset signed.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/sysdev/fsl_85xx_l2ctlr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c b/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c index cc8d6556d799..23b85ac9fc56 100644 --- a/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c +++ b/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c @@ -94,14 +94,14 @@ static int __devinit mpc85xx_l2ctlr_of_probe(struct platform_device *dev, l2cache_size = *prop; sram_params.sram_size = get_cache_sram_size(); - if (sram_params.sram_size <= 0) { + if ((int)sram_params.sram_size <= 0) { dev_err(&dev->dev, "Entire L2 as cache, Aborting Cache-SRAM stuff\n"); return -EINVAL; } sram_params.sram_offset = get_cache_sram_offset(); - if (sram_params.sram_offset <= 0) { + if ((int64_t)sram_params.sram_offset <= 0) { dev_err(&dev->dev, "Entire L2 as cache, provide a valid sram offset\n"); return -EINVAL; |