All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Roger <rogerable@realtek.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	micky <micky_ching@realsil.com.cn>, Chris Ball <chris@printf.net>,
	Lee Jones <lee.jones@linaro.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	devel@linuxdriverproject.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Wei WANG <wei_wang@realsil.com.cn>
Subject: Re: [PATCH] mmc: rtsx: usb backend needs LED support
Date: Wed, 30 Apr 2014 09:00:33 +0200	[thread overview]
Message-ID: <5378270.XmQGrvIcFE@wuerfel> (raw)
In-Reply-To: <53606F49.1000401@realtek.com>

On Wednesday 30 April 2014 11:34:33 Roger wrote:
> I think Ulf's idea is to fix the bug by modifying the .c files.
> I really found the problem of my ifdef hackery and it should do 
> something similar in sdhci.c as:
> 
> From: Roger Tseng <rogerable@realtek.com>
> Date: Wed, 30 Apr 2014 11:11:25 +0800
> Subject: [PATCH] mmc: rtsx: fix possible linking error if built-in
> 
> rtsx_usb_sdmmc module uses the LED classdev if available, but the code 
> failed
> to consider the situation that it is built-in and the LED classdev is a 
> module,
> leading to following linking error:
> 
>    LD      init/built-in.o
> drivers/built-in.o: In function `rtsx_usb_sdmmc_drv_remove':
> rtsx_usb_sdmmc.c:(.text+0x2a018e): undefined reference to 
> `led_classdev_unregister'
> drivers/built-in.o: In function `rtsx_usb_sdmmc_drv_probe':
> rtsx_usb_sdmmc.c:(.text+0x2a197e): undefined reference to 
> `led_classdev_register'
> 
> Fix by excluding such condition when defining macro RTSX_USB_USE_LEDS_CLASS.
> 
> Signed-off-by: Roger Tseng <rogerable@realtek.com>

Yes, that should work, too.

Acked-by: Arnd Bergmann <arnd@arndb.de>


> ---
>   drivers/mmc/host/rtsx_usb_sdmmc.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c 
> b/drivers/mmc/host/rtsx_usb_sdmmc.c
> index e11fafa..38bdda5 100644
> --- a/drivers/mmc/host/rtsx_usb_sdmmc.c
> +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
> @@ -34,7 +34,8 @@
>   #include <linux/mfd/rtsx_usb.h>
>   #include <asm/unaligned.h>
> 
> -#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
> +#if defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \
> +       defined(CONFIG_MMC_REALTEK_USB_MODULE))
>   #include <linux/leds.h>
>   #include <linux/workqueue.h>
>   #define RTSX_USB_USE_LEDS_CLASS
> 


WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Roger <rogerable@realtek.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Chris Ball <chris@printf.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Wei WANG <wei_wang@realsil.com.cn>,
	devel@linuxdriverproject.org, Lee Jones <lee.jones@linaro.org>,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH] mmc: rtsx: usb backend needs LED support
Date: Wed, 30 Apr 2014 09:00:33 +0200	[thread overview]
Message-ID: <5378270.XmQGrvIcFE@wuerfel> (raw)
In-Reply-To: <53606F49.1000401@realtek.com>

On Wednesday 30 April 2014 11:34:33 Roger wrote:
> I think Ulf's idea is to fix the bug by modifying the .c files.
> I really found the problem of my ifdef hackery and it should do 
> something similar in sdhci.c as:
> 
> From: Roger Tseng <rogerable@realtek.com>
> Date: Wed, 30 Apr 2014 11:11:25 +0800
> Subject: [PATCH] mmc: rtsx: fix possible linking error if built-in
> 
> rtsx_usb_sdmmc module uses the LED classdev if available, but the code 
> failed
> to consider the situation that it is built-in and the LED classdev is a 
> module,
> leading to following linking error:
> 
>    LD      init/built-in.o
> drivers/built-in.o: In function `rtsx_usb_sdmmc_drv_remove':
> rtsx_usb_sdmmc.c:(.text+0x2a018e): undefined reference to 
> `led_classdev_unregister'
> drivers/built-in.o: In function `rtsx_usb_sdmmc_drv_probe':
> rtsx_usb_sdmmc.c:(.text+0x2a197e): undefined reference to 
> `led_classdev_register'
> 
> Fix by excluding such condition when defining macro RTSX_USB_USE_LEDS_CLASS.
> 
> Signed-off-by: Roger Tseng <rogerable@realtek.com>

Yes, that should work, too.

Acked-by: Arnd Bergmann <arnd@arndb.de>


> ---
>   drivers/mmc/host/rtsx_usb_sdmmc.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c 
> b/drivers/mmc/host/rtsx_usb_sdmmc.c
> index e11fafa..38bdda5 100644
> --- a/drivers/mmc/host/rtsx_usb_sdmmc.c
> +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
> @@ -34,7 +34,8 @@
>   #include <linux/mfd/rtsx_usb.h>
>   #include <asm/unaligned.h>
> 
> -#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
> +#if defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \
> +       defined(CONFIG_MMC_REALTEK_USB_MODULE))
>   #include <linux/leds.h>
>   #include <linux/workqueue.h>
>   #define RTSX_USB_USE_LEDS_CLASS
> 

  reply	other threads:[~2014-04-30  7:00 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-29  1:54 [PATCH 0/2] mmc: rtsx: revert support for mmc async request micky_ching
2014-04-29  1:54 ` micky_ching
2014-04-29  1:54 ` [PATCH 1/2] mmc: rtsx: Revert "mmc: rtsx: modify error handle and remove smatch warnings" micky_ching
2014-04-29  1:54   ` micky_ching
2014-04-29  7:30   ` Ulf Hansson
2014-05-08  5:49     ` [PATCH 1/2] mmc: rtsx: Revert "mmc: rtsx: modify error handleandremove " micky
2014-05-08  5:49       ` micky
2014-05-08  7:55       ` Lee Jones
2014-05-08  8:22         ` Ulf Hansson
2014-05-09  1:09           ` [PATCH 1/2] mmc: rtsx: Revert "mmc: rtsx: modify errorhandleandremovesmatch warnings" micky
2014-05-09  1:09             ` micky
2014-04-29  1:54 ` [PATCH 2/2] mmc: rtsx: Revert "mmc: rtsx: add support for pre_req and post_req" micky_ching
2014-04-29  1:54   ` micky_ching
2014-04-29  7:36   ` Ulf Hansson
2014-05-05  9:31     ` Ulf Hansson
2014-05-08  7:53       ` Lee Jones
2014-05-08  5:54     ` [PATCH 2/2] mmc: rtsx: Revert "mmc: rtsx: add support for pre_reqandpost_req" micky
2014-05-08  5:54       ` micky
2014-04-29  8:02 ` [PATCH 0/2] mmc: rtsx: revert support for mmc async request Lee Jones
2014-04-30  1:32   ` micky
2014-04-30  1:32     ` micky
2014-04-29  9:45 ` [PATCH] mmc: rtsx: usb backend needs LED support Arnd Bergmann
2014-04-29 11:05   ` Ulf Hansson
2014-04-29 11:05     ` Ulf Hansson
2014-04-29 12:46     ` Arnd Bergmann
     [not found]     ` <201404300228.s3U2S7WA026782@rtits1.realtek.com>
2014-04-30  3:34       ` Roger
2014-04-30  3:34         ` Roger
2014-04-30  7:00         ` Arnd Bergmann [this message]
2014-04-30  7:00           ` Arnd Bergmann
2014-04-30  8:19         ` Ulf Hansson
2014-04-30  8:19           ` Ulf Hansson
2014-05-08  8:08           ` Roger
2014-05-08  8:08             ` Roger
2014-05-08  8:25             ` Arnd Bergmann
2014-05-08  8:29             ` Lee Jones
2014-05-08  8:29               ` Lee Jones
2014-05-08  8:29             ` Ulf Hansson

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=5378270.XmQGrvIcFE@wuerfel \
    --to=arnd@arndb.de \
    --cc=chris@printf.net \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=micky_ching@realsil.com.cn \
    --cc=rogerable@realtek.com \
    --cc=sameo@linux.intel.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wei_wang@realsil.com.cn \
    /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.