mbox series

[-next,0/4] mmc: remove unnecessary set_drvdata() function

Message ID 20230807141704.3486854-1-yangyingliang@huawei.com (mailing list archive)
Headers show
Series mmc: remove unnecessary set_drvdata() function | expand

Message

Yang Yingliang Aug. 7, 2023, 2:17 p.m. UTC
The driver data will be set to NULL in device_unbind_cleanup() in driver
core code. So the set_drvdata(..., NULL) called in remove and error path
in probe can be removed.

Yang Yingliang (4):
  mmc: via-sdmmc: remove unnecessary dev_set_drvdata()
  mmc: block: remove unnecessary dev_set_drvdata()
  mmc: moxart: remove unnecessary dev_set_drvdata()
  mmc: sunplus: remove unnecessary platform_set_drvdata()

 drivers/mmc/core/block.c       | 1 -
 drivers/mmc/host/moxart-mmc.c  | 2 --
 drivers/mmc/host/sunplus-mmc.c | 1 -
 drivers/mmc/host/via-sdmmc.c   | 2 --
 4 files changed, 6 deletions(-)

Comments

Ulf Hansson Aug. 8, 2023, 11:01 a.m. UTC | #1
On Mon, 7 Aug 2023 at 16:20, Yang Yingliang <yangyingliang@huawei.com> wrote:
>
> The driver data will be set to NULL in device_unbind_cleanup() in driver
> core code. So the set_drvdata(..., NULL) called in remove and error path
> in probe can be removed.
>
> Yang Yingliang (4):
>   mmc: via-sdmmc: remove unnecessary dev_set_drvdata()
>   mmc: block: remove unnecessary dev_set_drvdata()
>   mmc: moxart: remove unnecessary dev_set_drvdata()
>   mmc: sunplus: remove unnecessary platform_set_drvdata()
>
>  drivers/mmc/core/block.c       | 1 -
>  drivers/mmc/host/moxart-mmc.c  | 2 --
>  drivers/mmc/host/sunplus-mmc.c | 1 -
>  drivers/mmc/host/via-sdmmc.c   | 2 --
>  4 files changed, 6 deletions(-)

Can you please squash these trivial patches into one patch for mmc?

Kind regards
Uffe
Yang Yingliang Aug. 8, 2023, 11:09 a.m. UTC | #2
On 2023/8/8 19:01, Ulf Hansson wrote:
> On Mon, 7 Aug 2023 at 16:20, Yang Yingliang <yangyingliang@huawei.com> wrote:
>> The driver data will be set to NULL in device_unbind_cleanup() in driver
>> core code. So the set_drvdata(..., NULL) called in remove and error path
>> in probe can be removed.
>>
>> Yang Yingliang (4):
>>    mmc: via-sdmmc: remove unnecessary dev_set_drvdata()
>>    mmc: block: remove unnecessary dev_set_drvdata()
>>    mmc: moxart: remove unnecessary dev_set_drvdata()
>>    mmc: sunplus: remove unnecessary platform_set_drvdata()
>>
>>   drivers/mmc/core/block.c       | 1 -
>>   drivers/mmc/host/moxart-mmc.c  | 2 --
>>   drivers/mmc/host/sunplus-mmc.c | 1 -
>>   drivers/mmc/host/via-sdmmc.c   | 2 --
>>   4 files changed, 6 deletions(-)
> Can you please squash these trivial patches into one patch for mmc?
OK.

Thanks,
Yang
>
> Kind regards
> Uffe
> .