mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxim Levitsky <maximlevitsky@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Alex Dubov <oakad@yahoo.com>,
	Linux-Next <linux-next@vger.kernel.org>,
	Jens Axboe <axboe@kernel.dk>,
	Maxim Levitsky <maximlevitsky@gmail.com>
Subject: [PATCH 2/2] memstick: ms_block: fix complile issue.
Date: Mon,  8 Oct 2012 17:36:22 +0200	[thread overview]
Message-ID: <1349710582-5410-3-git-send-email-maximlevitsky@gmail.com> (raw)
In-Reply-To: <1349710582-5410-1-git-send-email-maximlevitsky@gmail.com>

As suggested by Geert Uytterhoeven

http://kisskb.ellerman.id.au/kisskb/buildresult/7280352/
arch/m68k/include/asm/hardirq.h:23:20: error: expected ')' before 'DRIVER_NAME'
make[4]: *** [drivers/memstick/core/ms_block.o] Error 1

The reason for this is that pr_fmt() references DRIVER_NAME and is defined
before the first include, while DRIVER_NAME is only defined in ms_block.h,
which is the last included file. If any subsequent include file uses pr_fmt()
(e.g. the call to pr_crit() in arch/m68k/include/asm/hardirq.h), this
causes a build
failure.

I suggest moving the DRIVER_NAME define to ms_block.c.
Cfr. memstick.c and mspro_block.c, who already have their own definition.


CC: Geert Uytterhoeven <geert@linux-m68k.org>

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
---
 drivers/memstick/core/ms_block.c |    2 +-
 drivers/memstick/core/ms_block.h |    2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/memstick/core/ms_block.c b/drivers/memstick/core/ms_block.c
index c815fe5..71e5937 100644
--- a/drivers/memstick/core/ms_block.c
+++ b/drivers/memstick/core/ms_block.c
@@ -11,7 +11,7 @@
  * Copyright (C) 2007 Alex Dubov <oakad@yahoo.com>
  *
  */
-
+#define DRIVER_NAME "ms_block"
 #define pr_fmt(fmt) DRIVER_NAME ": " fmt
 
 #include <linux/module.h>
diff --git a/drivers/memstick/core/ms_block.h b/drivers/memstick/core/ms_block.h
index a2b2765..546b55e 100644
--- a/drivers/memstick/core/ms_block.h
+++ b/drivers/memstick/core/ms_block.h
@@ -277,8 +277,6 @@ static int msb_reset(struct msb_data *msb, bool full);
 static int h_msb_default_bad(struct memstick_dev *card,
 						struct memstick_request **mrq);
 
-#define DRIVER_NAME "ms_block"
-
 #define __dbg(level, format, ...) \
 	do { \
 		if (debug >= level) \
-- 
1.7.9.5


      parent reply	other threads:[~2012-10-08 15:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26  9:48 [PATCH v3 memstick: support for legacy sony memsticks Maxim Levitsky
2012-09-26  9:49 ` [PATCH 1/2] scatterlist: add sg_nents Maxim Levitsky
2012-09-26 16:38   ` Tejun Heo
2012-09-27 10:47     ` Jens Axboe
2012-09-27 14:28       ` [PATCH] scatterlist: refactor the sg_nents Maxim Levitsky
2012-09-28  8:37         ` Jens Axboe
2012-10-11 10:27   ` [PATCH 1/2] scatterlist: add sg_nents Geert Uytterhoeven
2012-10-11 10:28     ` Geert Uytterhoeven
2012-09-26  9:49 ` [PATCH 2/2] memstick: add support for legacy memorysticks Maxim Levitsky
2012-09-26 16:41   ` Tejun Heo
2012-09-29 17:20   ` Geert Uytterhoeven
2012-10-01 20:24     ` Maxim Levitsky
2012-10-08 15:36     ` Fixes for ms_block Maxim Levitsky
2012-10-08 15:36       ` [PATCH 1/2] memstick: remove unused field from state struct Maxim Levitsky
2012-10-08 15:36       ` Maxim Levitsky [this message]

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=1349710582-5410-3-git-send-email-maximlevitsky@gmail.com \
    --to=maximlevitsky@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=oakad@yahoo.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

Powered by JetHome