mtd: spear_smi: fix compilation warning

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sat Sep 29 10:59:04 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=036a1ac1f4ac8cdfed4574738c63aba2e81a13e4
Commit:     036a1ac1f4ac8cdfed4574738c63aba2e81a13e4
Parent:     b5170978b421222ba4c3d64d1ebd4a03d64ae42e
Author:     Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
AuthorDate: Fri Aug 17 13:05:41 2012 +0300
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Sat Sep 29 14:53:30 2012 +0100

    mtd: spear_smi: fix compilation warning
    
    drivers/mtd/devices/spear_smi.c: In function 'spear_smi_probe':
    drivers/mtd/devices/spear_smi.c:984:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
    
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/devices/spear_smi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c
index 7c10466..421bc65 100644
--- a/drivers/mtd/devices/spear_smi.c
+++ b/drivers/mtd/devices/spear_smi.c
@@ -981,7 +981,7 @@ static int __devinit spear_smi_probe(struct platform_device *pdev)
 	dev->pdev = pdev;
 	dev->clk_rate = pdata->clk_rate;
 
-	if (dev->clk_rate < 0 || dev->clk_rate > SMI_MAX_CLOCK_FREQ)
+	if (dev->clk_rate > SMI_MAX_CLOCK_FREQ)
 		dev->clk_rate = SMI_MAX_CLOCK_FREQ;
 
 	dev->num_flashes = pdata->num_flashes;



More information about the linux-mtd-cvs mailing list