* [PATCH] intel_scu_ipc: fix signedness bug
@ 2010-10-28 6:08 Axel Lin
2010-11-09 13:40 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2010-10-28 6:08 UTC (permalink / raw)
To: linux-kernel; +Cc: Sreedhara DS, Alan Cox, Matthew Garrett, platform-driver-x86
busy_loop() returns negative error code, thus change err variable
from u32 to int to properly propagate correct error code.
Also remove unneeded initialization for err and i variables.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/platform/x86/intel_scu_ipc.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c
index 41a9e34..50f5cf3 100644
--- a/drivers/platform/x86/intel_scu_ipc.c
+++ b/drivers/platform/x86/intel_scu_ipc.c
@@ -160,7 +160,7 @@ static int pwr_reg_rdwr(u16 *addr, u8 *data, u32 count, u32 op, u32 id)
{
int i, nc, bytes, d;
u32 offset = 0;
- u32 err = 0;
+ int err;
u8 cbuf[IPC_WWBUF_SIZE] = { };
u32 *wbuf = (u32 *)&cbuf;
@@ -403,7 +403,7 @@ EXPORT_SYMBOL(intel_scu_ipc_update_register);
*/
int intel_scu_ipc_simple_command(int cmd, int sub)
{
- u32 err = 0;
+ int err;
mutex_lock(&ipclock);
if (ipcdev.pdev == NULL) {
@@ -433,8 +433,7 @@ EXPORT_SYMBOL(intel_scu_ipc_simple_command);
int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen,
u32 *out, int outlen)
{
- u32 err = 0;
- int i = 0;
+ int err, i;
mutex_lock(&ipclock);
if (ipcdev.pdev == NULL) {
--
1.7.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] intel_scu_ipc: fix signedness bug
2010-10-28 6:08 [PATCH] intel_scu_ipc: fix signedness bug Axel Lin
@ 2010-11-09 13:40 ` Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2010-11-09 13:40 UTC (permalink / raw)
To: Axel Lin
Cc: linux-kernel, Sreedhara DS, Alan Cox, Matthew Garrett,
platform-driver-x86
On Thu, 28 Oct 2010 14:08:39 +0800
Axel Lin <axel.lin@gmail.com> wrote:
> busy_loop() returns negative error code, thus change err variable
> from u32 to int to properly propagate correct error code.
>
> Also remove unneeded initialization for err and i variables.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
This was already partly fixed in my tree but added the other fixes.
Thanks
Alan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-09 13:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-28 6:08 [PATCH] intel_scu_ipc: fix signedness bug Axel Lin
2010-11-09 13:40 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox