* [PATCH] powerpc: sysdev: fix signedness bug
@ 2010-10-17 14:51 Vasiliy Kulikov
2011-03-15 19:19 ` Kumar Gala
0 siblings, 1 reply; 2+ messages in thread
From: Vasiliy Kulikov @ 2010-10-17 14:51 UTC (permalink / raw)
To: kernel-janitors
Cc: Harninder Rai, devicetree-discuss, linux-kernel, Paul Mackerras,
linuxppc-dev, Vivek Mahajan
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>
---
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 cc8d655..23b85ac 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;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc: sysdev: fix signedness bug
2010-10-17 14:51 [PATCH] powerpc: sysdev: fix signedness bug Vasiliy Kulikov
@ 2011-03-15 19:19 ` Kumar Gala
0 siblings, 0 replies; 2+ messages in thread
From: Kumar Gala @ 2011-03-15 19:19 UTC (permalink / raw)
To: Vasiliy Kulikov
Cc: Harninder Rai, devicetree-discuss, kernel-janitors, linux-kernel,
Paul Mackerras, linuxppc-dev, Vivek Mahajan
On Oct 17, 2010, at 9:51 AM, Vasiliy Kulikov wrote:
> 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>
> ---
> arch/powerpc/sysdev/fsl_85xx_l2ctlr.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
applied
- k
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-15 19:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-17 14:51 [PATCH] powerpc: sysdev: fix signedness bug Vasiliy Kulikov
2011-03-15 19:19 ` Kumar Gala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).