lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5378270.XmQGrvIcFE@wuerfel>
Date:	Wed, 30 Apr 2014 09:00:33 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Roger <rogerable@...ltek.com>
Cc:	Ulf Hansson <ulf.hansson@...aro.org>,
	micky <micky_ching@...lsil.com.cn>,
	Chris Ball <chris@...ntf.net>,
	Lee Jones <lee.jones@...aro.org>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	devel@...uxdriverproject.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-mmc <linux-mmc@...r.kernel.org>,
	Wei WANG <wei_wang@...lsil.com.cn>
Subject: Re: [PATCH] mmc: rtsx: usb backend needs LED support

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@...ltek.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@...ltek.com>

Yes, that should work, too.

Acked-by: Arnd Bergmann <arnd@...db.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
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ