[PATCH v1 0/5] driver core: fw_devlink: Clean up strings and mutex usages

Andy Shevchenko posted 5 patches 1 year, 5 months ago
drivers/base/core.c | 142 ++++++++++++++++++++------------------------
1 file changed, 64 insertions(+), 78 deletions(-)
[PATCH v1 0/5] driver core: fw_devlink: Clean up strings and mutex usages
Posted by Andy Shevchenko 1 year, 5 months ago
Replace strlen() + kmalloc() + snprintf() by kasprintf() ond other
string handling improvements.

Use guard() / scoped_guard() to handle fw_devlink mutex.

Andy Shevchenko (5):
  driver core: Sort headers
  driver core: Use kasprintf() instead of fixed buffer formatting
  driver core: Use guards for simple mutex locks
  driver core: Make use of returned value of dev_err_probe()
  driver core: Use 2-argument strscpy()

 drivers/base/core.c | 142 ++++++++++++++++++++------------------------
 1 file changed, 64 insertions(+), 78 deletions(-)

-- 
2.43.0.rc1.1336.g36b5255a03ac
Re: [PATCH v1 0/5] driver core: fw_devlink: Clean up strings and mutex usages
Posted by Greg Kroah-Hartman 1 year, 5 months ago
On Wed, Aug 21, 2024 at 06:48:18PM +0300, Andy Shevchenko wrote:
> Replace strlen() + kmalloc() + snprintf() by kasprintf() ond other
> string handling improvements.
> 
> Use guard() / scoped_guard() to handle fw_devlink mutex.

Nice clean ups, thanks!