2009-06-04 10:25:03

by Michał Mirosław

[permalink] [raw]
Subject: Re: [PATCH 2.6.29.4] Driver for CB710/720 memory card reader (MMC part) - v5 fixed

On Wed, May 27, 2009 at 10:13:42PM +0200, Pierre Ossman wrote:
> On Fri, 22 May 2009 20:33:59 +0200
> Micha? Miros?aw <[email protected]> wrote:
[cut: CB710 driver patch description]
> Queued.

One more fixup for the driver following.

Best Regards,
Micha? Miros?aw

---here---

cb710: Fix compilation warning in DEBUG case.

Signed-off-by: Micha? Miros?aw <[email protected]>

diff -urpN test1/drivers/misc/cb710/Kconfig test2/drivers/misc/cb710/Kconfig
--- test1/drivers/misc/cb710/Kconfig 2009-06-04 12:20:29.000000000 +0200
+++ test2/drivers/misc/cb710/Kconfig 2009-06-04 10:53:34.000000000 +0200
@@ -19,3 +19,8 @@ config CB710_DEBUG
This is an option for use by developers; most people should
say N here. This adds a lot of debugging output to dmesg.

+config CB710_DEBUG_ASSUMPTIONS
+ bool
+ depends on CB710_CORE != n
+ default y
+
diff -urpN test1/drivers/misc/cb710/Makefile test2/drivers/misc/cb710/Makefile
--- test1/drivers/misc/cb710/Makefile 2009-06-04 12:20:29.000000000 +0200
+++ test2/drivers/misc/cb710/Makefile 2009-06-04 10:53:34.000000000 +0200
@@ -2,3 +2,5 @@ obj-$(CONFIG_CB710_CORE) += cb710.o

cb710-y := core.o sgbuf2.o
cb710-$(CONFIG_CB710_DEBUG) += debug.o
+
+ccflags-$(CONFIG_CB710_DEBUG) += -DDEBUG
diff -urpN test1/drivers/mmc/host/Makefile test2/drivers/mmc/host/Makefile
--- test1/drivers/mmc/host/Makefile 2009-06-04 12:20:29.000000000 +0200
+++ test2/drivers/mmc/host/Makefile 2009-06-04 10:53:34.000000000 +0200
@@ -29,3 +29,7 @@ obj-$(CONFIG_MMC_SDRICOH_CS) += sdricoh_
obj-$(CONFIG_MMC_TMIO) += tmio_mmc.o
obj-$(CONFIG_MMC_CB710) += cb710-mmc.o

+ifeq ($(CONFIG_CB710_DEBUG),y)
+CFLAGS-cb710-mmc += -DDEBUG
+endif
+
diff -urpN test1/include/linux/cb710.h test2/include/linux/cb710.h
--- test1/include/linux/cb710.h 2009-06-04 12:20:29.000000000 +0200
+++ test2/include/linux/cb710.h 2009-06-04 10:53:34.000000000 +0200
@@ -10,13 +10,6 @@
#ifndef LINUX_CB710_DRIVER_H
#define LINUX_CB710_DRIVER_H

-#ifdef CONFIG_CB710_DEBUG
-#define DEBUG
-#endif
-
-/* verify assumptions on platform_device framework */
-#define CONFIG_CB710_DEBUG_ASSUMPTIONS
-
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>


2009-06-05 09:26:45

by Michał Mirosław

[permalink] [raw]
Subject: Re: [PATCH 2.6.29.4] Driver for CB710/720 memory card reader (MMC part) - v5 fixed

cb710: Fix compilation warnings

Fix compilation warnings reported by Stephen Rothwell and change
the only dev_vdbg() to dev_dbg().

drivers/misc/cb710/debug.c: In function 'cb710_read_regs_8':
drivers/misc/cb710/debug.c:100: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'
drivers/misc/cb710/debug.c: In function 'cb710_read_regs_16':
drivers/misc/cb710/debug.c:101: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'
drivers/misc/cb710/debug.c: In function 'cb710_read_regs_32':
drivers/misc/cb710/debug.c:102: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'
drivers/mmc/host/cb710-mmc.c: In function 'cb710_mmc_set_transfer_size':
drivers/mmc/host/cb710-mmc.c:222: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
drivers/mmc/host/cb710-mmc.c:222: warning: format '%d' expects type 'int', but argument 6 has type 'size_t'

Signed-off-by: Micha? Miros?aw <[email protected]>

diff -urpN test2/drivers/misc/cb710/debug.c test3/drivers/misc/cb710/debug.c
--- test2/drivers/misc/cb710/debug.c 2009-06-04 10:53:34.000000000 +0200
+++ test3/drivers/misc/cb710/debug.c 2009-06-05 11:22:38.000000000 +0200
@@ -37,7 +37,7 @@ static void cb710_read_regs_##t(void __i
unsigned i, j; \
\
for (i = 0; i < ARRAY_SIZE(allow); ++i, reg += 16/(t/8)) { \
- if (!select & (1 << i)) \
+ if (!(select & (1 << i))) \
continue; \
\
for (j = 0; j < 0x10/(t/8); ++j) { \
diff -urpN test2/drivers/mmc/host/cb710-mmc.c test3/drivers/mmc/host/cb710-mmc.c
--- test2/drivers/mmc/host/cb710-mmc.c 2009-06-04 10:53:34.000000000 +0200
+++ test3/drivers/mmc/host/cb710-mmc.c 2009-06-05 11:22:39.000000000 +0200
@@ -219,7 +219,7 @@ static void cb710_mmc_set_transfer_size(
cb710_write_port_32(slot, CB710_MMC_TRANSFER_SIZE_PORT,
((count - 1) << 16)|(blocksize - 1));

- dev_vdbg(cb710_slot_dev(slot), "set up for %d block%s of %d bytes\n",
+ dev_dbg(cb710_slot_dev(slot), "set up for %Zu block%s of %Zu bytes\n",
count, count == 1 ? "" : "s", blocksize);
}

2009-06-13 10:39:17

by Pierre Ossman

[permalink] [raw]
Subject: Re: [PATCH 2.6.29.4] Driver for CB710/720 memory card reader (MMC part) - v5 fixed

On Thu, 4 Jun 2009 12:24:55 +0200
Michał Mirosław <[email protected]> wrote:

> On Wed, May 27, 2009 at 10:13:42PM +0200, Pierre Ossman wrote:
> > On Fri, 22 May 2009 20:33:59 +0200
> > Michał Mirosław <[email protected]> wrote:
> [cut: CB710 driver patch description]
> > Queued.
>
> One more fixup for the driver following.
>

I had already done some of this, but I've merged the rest of the
changes you had here.

Rgds
--
-- Pierre Ossman

WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.


Attachments:
signature.asc (198.00 B)