Skip to contentSkip to conversation

i2c: designware-platdrv: simplify reset control and error handling

PATCH Superseded Artem Shimko 2 participants 6 messages Jan 23 I2C subsystem host drivers

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v5 cover i2c: designware-platdrv: simplify reset control and error handling

Hello maintainers and reviewers,

This series refactors the DesignWare platform I2C driver to simplify reset control management and improve error handling:

Patch 1 replaces the manual reset control acquisition and deassertion with devm_reset_control_get_optional_exclusive_deasserted(), which combines both operations in a single call and leverages automatic resource management.

Patch 2 follows up by refactoring the probe error handling to eliminate goto statements in favor of direct returns with dev_err_probe(), resulting in cleaner and more linear control flow.

Both patches maintain functional equivalence while improving code readability and maintainability.

Regards,
artem

Artem Shimko (2):
i2c: designware-platdrv: simplify reset control
i2c: designware-platdrv: refactor error handling and simplify cleanup

 drivers/i2c/busses/i2c-designware-platdrv.c | 41 +++++++--------------
 1 file changed, 13 insertions(+), 28 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw
Quoted 10 lines · Artem Shimko

Hello maintainers and reviewers,

This series refactors the DesignWare platform I2C driver to simplify reset control management and improve error handling:

Patch 1 replaces the manual reset control acquisition and deassertion with devm_reset_control_get_optional_exclusive_deasserted(), which combines both operations in a single call and leverages automatic resource management.

Quoted 6 lines

Patch 2 follows up by refactoring the probe error handling to eliminate goto statements in favor of direct returns with dev_err_probe(), resulting in cleaner and more linear control flow.

Both patches maintain functional equivalence while improving code readability and maintainability.

You send a series as _three_ detached emails. Forgot using

git format-patch --thread ...

?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
Quoted 15 lines · Andy Shevchenko
Quoted 14 lines · Artem Shimko

Hello maintainers and reviewers,

This series refactors the DesignWare platform I2C driver to simplify reset control management and improve error handling:

Patch 1 replaces the manual reset control acquisition and deassertion with devm_reset_control_get_optional_exclusive_deasserted(), which combines both operations in a single call and leverages automatic resource management.

Patch 2 follows up by refactoring the probe error handling to eliminate goto statements in favor of direct returns with dev_err_probe(), resulting in cleaner and more linear control flow.

Quoted 8 lines
Quoted 2 lines

Both patches maintain functional equivalence while improving code readability and maintainability.

You send a series as _three_ detached emails. Forgot using

git format-patch --thread ...

?

On top of that, this is marked as v5, where the changelog for all previous iterations?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 2 lines · Andy Shevchenko

On top of that, this is marked as v5, where the changelog for all previous iterations?

Hi Andy,

Got it, yeah... Thanks!

Could you please advise, should I send it again with changelog as v6?

Regards,
artem

#4 lore raw
Quoted 8 lines · Artem Shimko
Quoted 2 lines · Andy Shevchenko

On top of that, this is marked as v5, where the changelog for all previous iterations?

Got it, yeah... Thanks!

Could you please advise, should I send it again with changelog as v6?

Wait a bit (24h + ) for others to have a chance to comment.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#5 lore raw
Quoted 1 line · Andy Shevchenko

Wait a bit (24h + ) for others to have a chance to comment.

Got it, thanks. =)