[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1288304771-27081-1-git-send-email-notasas@gmail.com>
Date: Fri, 29 Oct 2010 01:26:11 +0300
From: Grazvydas Ignotas <notasas@...il.com>
To: Anton Vorontsov <cbouatmailru@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Samuel Ortiz <sameo@...ux.intel.com>,
Ingo Molnar <mingo@...e.hu>,
Grazvydas Ignotas <notasas@...il.com>
Subject: Re: [GIT PULL] battery-2.6.git (a last minute fix)
> drivers/power/twl4030_charger.c: In function 'twl4030_bci_probe':
> drivers/power/twl4030_charger.c:477: warning: overflow in implicit constant conversion
> drivers/power/twl4030_charger.c:485: warning: overflow in implicit constant conversion
> make[2]: *** [drivers/power/twl4030_charger.o] Error 1
Here is a fix for these warnings (only show up for 64bit so I missed
them, my fault again).
------------ cut -----------
From: Grazvydas Ignotas <notasas@...il.com>
Date: Fri, 29 Oct 2010 00:51:32 +0300
Subject: [PATCH] power_supply: twl4030_charger: fix compilation warnings
Registers are 8bit, so use proper type, fixing following warnings:
twl4030_charger.c:477: warning: overflow in implicit constant conversion
twl4030_charger.c:485: warning: overflow in implicit constant conversion
These only show up when building for 64bit target, so I missed them
while building only for 32bit ARM.
Signed-off-by: Grazvydas Ignotas <notasas@...il.com>
---
drivers/power/twl4030_charger.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index ff1f423..07236ae 100644
--- a/drivers/power/twl4030_charger.c
+++ b/drivers/power/twl4030_charger.c
@@ -414,7 +414,7 @@ static int __init twl4030_bci_probe(struct platform_device *pdev)
{
struct twl4030_bci *bci;
int ret;
- int reg;
+ u8 reg;
bci = kzalloc(sizeof(*bci), GFP_KERNEL);
if (bci == NULL)
@@ -473,7 +473,7 @@ static int __init twl4030_bci_probe(struct platform_device *pdev)
}
/* Enable interrupts now. */
- reg = ~(TWL4030_ICHGLOW | TWL4030_ICHGEOC | TWL4030_TBATOR2 |
+ reg = (u8) ~(TWL4030_ICHGLOW | TWL4030_ICHGEOC | TWL4030_TBATOR2 |
TWL4030_TBATOR1 | TWL4030_BATSTS);
ret = twl_i2c_write_u8(TWL4030_MODULE_INTERRUPTS, reg,
TWL4030_INTERRUPTS_BCIIMR1A);
@@ -482,7 +482,7 @@ static int __init twl4030_bci_probe(struct platform_device *pdev)
goto fail_unmask_interrupts;
}
- reg = ~(TWL4030_VBATOV | TWL4030_VBUSOV | TWL4030_ACCHGOV);
+ reg = (u8) ~(TWL4030_VBATOV | TWL4030_VBUSOV | TWL4030_ACCHGOV);
ret = twl_i2c_write_u8(TWL4030_MODULE_INTERRUPTS, reg,
TWL4030_INTERRUPTS_BCIIMR2A);
if (ret < 0)
--
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists