mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Grazvydas Ignotas <notasas@gmail.com>
To: Anton Vorontsov <cbouatmailru@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Samuel Ortiz <sameo@linux.intel.com>, Ingo Molnar <mingo@elte.hu>,
	Grazvydas Ignotas <notasas@gmail.com>
Subject: Re: [GIT PULL] battery-2.6.git (a last minute fix)
Date: Fri, 29 Oct 2010 01:26:11 +0300	[thread overview]
Message-ID: <1288304771-27081-1-git-send-email-notasas@gmail.com> (raw)
In-Reply-To: <20101028090953.GA28283@oksana.dev.rtsoft.ru>

> 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@gmail.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@gmail.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


  parent reply	other threads:[~2010-10-28 22:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-26 14:41 [GIT PULL] battery-2.6.git Anton Vorontsov
2010-10-28  6:54 ` -tip: origin tree build failure (battery-2.6.git related) Ingo Molnar
2010-10-28  7:07   ` Andrew Morton
2010-10-28  9:09     ` [GIT PULL] battery-2.6.git (a last minute fix) Anton Vorontsov
2010-10-28 20:58       ` Samuel Ortiz
2010-10-28 21:17         ` Anton Vorontsov
2010-10-28 22:26       ` Grazvydas Ignotas [this message]
2010-10-28  9:18     ` -tip: origin tree build failure (battery-2.6.git related) Grazvydas Ignotas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288304771-27081-1-git-send-email-notasas@gmail.com \
    --to=notasas@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cbouatmailru@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®