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]
Date:	Thu, 30 Oct 2008 05:37:07 +0100
From:	Marcel Holtmann <marcel@...tmann.org>
To:	Harvey Harrison <harvey.harrison@...il.com>
Cc:	Kay Sievers <kay.sievers@...y.org>,
	Pierre Ossman <drzeus@...eus.cx>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Greg KH <greg@...ah.com>
Subject: Re: mmc: struct device - replace bus_id with dev_name(), dev_set_name()

Hi Harvey,

>> diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
>> index ee6e822..403aa50 100644
>> --- a/include/linux/mmc/card.h
>> +++ b/include/linux/mmc/card.h
>> @@ -130,7 +130,7 @@ struct mmc_card {
>> #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR)
>>
>> #define mmc_card_name(c)	((c)->cid.prod_name)
>> -#define mmc_card_id(c)		((c)->dev.bus_id)
>> +#define mmc_card_id(c)		(dev_name(&(c)->dev))
>>
>> #define mmc_list_to_card(l)	container_of(l, struct mmc_card, node)
>> #define mmc_get_drvdata(c)	dev_get_drvdata(&(c)->dev)
>> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
>> index bde891f..f842f23 100644
>> --- a/include/linux/mmc/host.h
>> +++ b/include/linux/mmc/host.h
>> @@ -176,7 +176,7 @@ static inline void *mmc_priv(struct mmc_host  
>> *host)
>>
>> #define mmc_dev(x)	((x)->parent)
>> #define mmc_classdev(x)	(&(x)->class_dev)
>> -#define mmc_hostname(x)	((x)->class_dev.bus_id)
>> +#define mmc_hostname(x)	(dev_name(&(x)->class_dev))
>>
>> extern int mmc_suspend_host(struct mmc_host *, pm_message_t);
>> extern int mmc_resume_host(struct mmc_host *);
>> diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/ 
>> sdio_func.h
>> index 07bee4a..451bdfc 100644
>> --- a/include/linux/mmc/sdio_func.h
>> +++ b/include/linux/mmc/sdio_func.h
>> @@ -63,7 +63,7 @@ struct sdio_func {
>>
>> #define sdio_func_set_present(f) ((f)->state |= SDIO_STATE_PRESENT)
>>
>> -#define sdio_func_id(f)		((f)->dev.bus_id)
>> +#define sdio_func_id(f)		(dev_name(&(f)->dev))
>>
>> #define sdio_get_drvdata(f)	dev_get_drvdata(&(f)->dev)
>> #define sdio_set_drvdata(f,d)	dev_set_drvdata(&(f)->dev, d)
>>
>
> A lot of these helpers don't seem to add that much, would you care for
> a patch removing them Pierre?
>
> Specifically sdio_func_id, sdio_get/set_drvdata don't have that many
> users.

I prefer if we keep them. Since they take the proper parameter.  
Otherwise the driver has to always got func->dev for everything. Most  
SDIO drivers care of the function and not about the struct device  
underneath it.

Regards

Marcel

--
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