<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/mmc/host/sunplus-mmc.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-08-15T10:48:20Z</updated>
<entry>
<title>mmc: sunplus-mmc: Convert to platform remove callback returning void</title>
<updated>2023-08-15T10:48:20Z</updated>
<author>
<name>Yangtao Li</name>
<email>frank.li@vivo.com</email>
</author>
<published>2023-07-27T07:00:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3ed9c648eacdaff791c429b75d121a20f15e6967'/>
<id>urn:sha1:3ed9c648eacdaff791c429b75d121a20f15e6967</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Link: https://lore.kernel.org/r/20230727070051.17778-49-frank.li@vivo.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: remove unnecessary set_drvdata() function</title>
<updated>2023-08-09T13:44:17Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2023-08-08T12:15:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=283cf357b02848a48eb544e3cde993254fc2c19e'/>
<id>urn:sha1:283cf357b02848a48eb544e3cde993254fc2c19e</id>
<content type='text'>
The driver data will be cleared in device_unbind_cleanup() in driver
core code. So the set_drvdata(..., NULL) called in remove and error
path in probe can be removed.

Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Link: https://lore.kernel.org/r/20230808121513.553143-1-yangyingliang@huawei.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: sunplus: Fix platform_get_irq() error checking</title>
<updated>2023-08-09T13:40:52Z</updated>
<author>
<name>Harshit Mogalapalli</name>
<email>harshit.m.mogalapalli@oracle.com</email>
</author>
<published>2023-08-09T07:18:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=117d73b18441638b85b3963256c846509c6138f1'/>
<id>urn:sha1:117d73b18441638b85b3963256c846509c6138f1</id>
<content type='text'>
The platform_get_irq() function returns negative error codes on failure.

Signed-off-by: Harshit Mogalapalli &lt;harshit.m.mogalapalli@oracle.com&gt;
Reviewed-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Link: https://lore.kernel.org/r/20230809071812.547229-2-harshit.m.mogalapalli@oracle.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: sunplus: Fix error handling in spmmc_drv_probe()</title>
<updated>2023-08-09T11:14:53Z</updated>
<author>
<name>Harshit Mogalapalli</name>
<email>harshit.m.mogalapalli@oracle.com</email>
</author>
<published>2023-08-09T07:18:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cf3f15b8c6601c1dc70f85949788ee993dd9a439'/>
<id>urn:sha1:cf3f15b8c6601c1dc70f85949788ee993dd9a439</id>
<content type='text'>
When mmc allocation succeeds, the error paths are not freeing mmc.

Fix the above issue by changing mmc_alloc_host() to devm_mmc_alloc_host()
to simplify the error handling. Remove label 'probe_free_host' as devm_*
api takes care of freeing, also remove mmc_free_host() from remove
function as devm_* takes care of freeing.

Fixes: 4e268fed8b18 ("mmc: Add mmc driver for Sunplus SP7021")
Reported-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Closes: https://lore.kernel.org/all/a3829ed3-d827-4b9d-827e-9cc24a3ec3bc@moroto.mountain/
Signed-off-by: Harshit Mogalapalli &lt;harshit.m.mogalapalli@oracle.com&gt;
Reviewed-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230809071812.547229-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: sunplus: fix return value check of mmc_add_host()</title>
<updated>2023-08-09T11:12:53Z</updated>
<author>
<name>Wei Chen</name>
<email>harperchen1110@gmail.com</email>
</author>
<published>2023-06-22T09:02:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dce6d8f985fa1ef5c2af47f4f86ea65511b78656'/>
<id>urn:sha1:dce6d8f985fa1ef5c2af47f4f86ea65511b78656</id>
<content type='text'>
mmc_add_host() may return error, if we ignore its return value,
1. the memory allocated in mmc_alloc_host() will be leaked
2. null-ptr-deref will happen when calling mmc_remove_host()
in remove function spmmc_drv_remove() because deleting not
added device.

Fix this by checking the return value of mmc_add_host(). Moreover,
I fixed the error handling path of spmmc_drv_probe() to clean up.

Fixes: 4e268fed8b18 ("mmc: Add mmc driver for Sunplus SP7021")
Cc: stable@vger.kernel.org
Signed-off-by: Wei Chen &lt;harperchen1110@gmail.com&gt;
Link: https://lore.kernel.org/r/20230622090233.188539-1-harperchen1110@gmail.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: Remove unneeded semicolon</title>
<updated>2022-12-07T12:29:13Z</updated>
<author>
<name>Yang Li</name>
<email>yang.lee@linux.alibaba.com</email>
</author>
<published>2022-11-23T02:12:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1e8cb505f3d4a3e9c31238a45509a17e688525a0'/>
<id>urn:sha1:1e8cb505f3d4a3e9c31238a45509a17e688525a0</id>
<content type='text'>
./drivers/mmc/host/sunplus-mmc.c:321:2-3: Unneeded semicolon

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3238
Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Yang Li &lt;yang.lee@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20221123021221.9646-1-yang.lee@linux.alibaba.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: Add mmc driver for Sunplus SP7021</title>
<updated>2022-12-07T12:22:37Z</updated>
<author>
<name>Tony Huang</name>
<email>tonyhuang.sunplus@gmail.com</email>
</author>
<published>2022-11-21T10:06:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4e268fed8b1861616af28f9cfb4eed8ca5d7af6c'/>
<id>urn:sha1:4e268fed8b1861616af28f9cfb4eed8ca5d7af6c</id>
<content type='text'>
This is a patch for mmc driver for Sunplus SP7021 SOC.
Supports eMMC 4.41 DDR 104MB/s speed mode.

Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Tony Huang &lt;tonyhuang.sunplus@gmail.com&gt;
Link: https://lore.kernel.org/r/c92d67596f3cc10d41585b9ab82be7da2cc4c9d8.1669023361.git.tonyhuang.sunplus@gmail.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
</feed>
