All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Timur Tabi <timur@freescale.com>
Subject: [PATCH 5/5] powerpc/83xx: Fix sparse warnings in mpc836x_mds.c
Date: Wed, 3 Dec 2008 22:27:52 +0300	[thread overview]
Message-ID: <20081203192752.GE13035@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <20081203192644.GA6145@oksana.dev.rtsoft.ru>

This patch fixes following sparse warnings:

  CHECK   mpc836x_mds.c
mpc836x_mds.c:75:12: warning: Using plain integer as NULL pointer
mpc836x_mds.c:79:13: warning: incorrect type in assignment (different address spaces)
mpc836x_mds.c:79:13:    expected unsigned char [usertype] *static [toplevel] bcsr_regs
mpc836x_mds.c:79:13:    got void [noderef] <asn:2>*
mpc836x_mds.c:105:3: warning: incorrect type in argument 1 (different address spaces)
mpc836x_mds.c:105:3:    expected unsigned char volatile [noderef] [usertype] <asn:2>*addr
mpc836x_mds.c:105:3:    got unsigned char [usertype] *
mpc836x_mds.c:105:3: warning: incorrect type in argument 1 (different address spaces)
mpc836x_mds.c:105:3:    expected unsigned char const volatile [noderef] [usertype] <asn:2>*addr
mpc836x_mds.c:105:3:    got unsigned char [usertype] *
mpc836x_mds.c:107:3: warning: incorrect type in argument 1 (different address spaces)
mpc836x_mds.c:107:3:    expected unsigned char volatile [noderef] [usertype] <asn:2>*addr
mpc836x_mds.c:107:3:    got unsigned char [usertype] *
mpc836x_mds.c:107:3: warning: incorrect type in argument 1 (different address spaces)
mpc836x_mds.c:107:3:    expected unsigned char const volatile [noderef] [usertype] <asn:2>*addr
mpc836x_mds.c:107:3:    got unsigned char [usertype] *
mpc836x_mds.c:131:11: warning: incorrect type in argument 1 (different address spaces)
mpc836x_mds.c:131:11:    expected void volatile [noderef] <asn:2>*addr
mpc836x_mds.c:131:11:    got unsigned char [usertype] *static [toplevel] bcsr_regs

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 arch/powerpc/platforms/83xx/mpc836x_mds.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c
index fbcca19..09e9d6f 100644
--- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
@@ -18,6 +18,7 @@
 
 #include <linux/stddef.h>
 #include <linux/kernel.h>
+#include <linux/compiler.h>
 #include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/reboot.h>
@@ -56,8 +57,6 @@
 #define DBG(fmt...)
 #endif
 
-static u8 *bcsr_regs = NULL;
-
 /* ************************************************************************
  *
  * Setup the architecture
@@ -66,13 +65,14 @@ static u8 *bcsr_regs = NULL;
 static void __init mpc836x_mds_setup_arch(void)
 {
 	struct device_node *np;
+	u8 __iomem *bcsr_regs = NULL;
 
 	if (ppc_md.progress)
 		ppc_md.progress("mpc836x_mds_setup_arch()", 0);
 
 	/* Map BCSR area */
 	np = of_find_node_by_name(NULL, "bcsr");
-	if (np != 0) {
+	if (np) {
 		struct resource res;
 
 		of_address_to_resource(np, 0, &res);
-- 
1.5.6.5

  parent reply	other threads:[~2008-12-03 19:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-03 19:26 [PATCH 0/5] Few patches for galak/powerpc.git next Anton Vorontsov
2008-12-03 19:27 ` [PATCH 1/5] powerpc/qe: Implement QE Pin Multiplexing API Anton Vorontsov
2008-12-17 15:41   ` Anton Vorontsov
2008-12-17 16:46     ` Kumar Gala
2008-12-17 16:55       ` Anton Vorontsov
2008-12-17 16:56         ` Kumar Gala
2008-12-17 16:47   ` Kumar Gala
2008-12-03 19:27 ` [PATCH 2/5] powerpc: Implement GPIO driver for simple memory-mapped banks Anton Vorontsov
2008-12-17 16:56   ` Kumar Gala
2008-12-17 17:10     ` Anton Vorontsov
2008-12-03 19:27 ` [PATCH 3/5] powerpc/83xx: Add USB Host/Gadget support for MPC8360E-MDS boards Anton Vorontsov
2008-12-17 16:59   ` Kumar Gala
2008-12-17 17:03     ` Timur Tabi
2008-12-17 17:15     ` Anton Vorontsov
2008-12-17 20:21       ` Kumar Gala
2008-12-03 19:27 ` [PATCH 4/5] powerpc/83xx: Add USB Host support for MPC8360E-RDK boards Anton Vorontsov
2008-12-03 19:27 ` Anton Vorontsov [this message]
2008-12-16 18:27   ` [PATCH 5/5] powerpc/83xx: Fix sparse warnings in mpc836x_mds.c Kumar Gala
2008-12-03 19:53 ` [PATCH 0/5] Few patches for galak/powerpc.git next Kumar Gala
2008-12-03 22:28   ` Anton Vorontsov

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=20081203192752.GE13035@oksana.dev.rtsoft.ru \
    --to=avorontsov@ru.mvista.com \
    --cc=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=timur@freescale.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.