Skip to content

Cleanups and minor fixes to the ADI sc5xx icc driver - #3434

Open
ukleinek wants to merge 7 commits into
analogdevicesinc:adsp-6.18.31-yfrom
ukleinek:sc5xx-icc
Open

Cleanups and minor fixes to the ADI sc5xx icc driver#3434
ukleinek wants to merge 7 commits into
analogdevicesinc:adsp-6.18.31-yfrom
ukleinek:sc5xx-icc

Conversation

@ukleinek

@ukleinek ukleinek commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

PR Description

Similar to #3428 this is the result of reading through the sc5xx icc driver.

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have compiled my changes, including the documentation
  • I have tested the changes on the relevant hardware
  • I have updated the documentation outside this repo accordingly
  • I have provided links for the relevant upstream lore

ukleinek added 7 commits July 14, 2026 14:51
PTR_ERR(ptr) already returns a negative value if IS_ERR(ptr) is true.
An addtional - is wrong and yields a positive return value which is
unexpected by the driver core.

Fixes: c91c177 ("soc: adi: Add initial support for SC5xx SoCs")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
…source()

devm_platform_get_and_ioremap_resource() is just platform_get_resource()
+ devm_ioremap(). Use it to reduce boiler plate a bit. Also move *base
to a scope more narrow.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
A platform driver doesn't need a remove callback and having none is
equivalent to having one that does nothing; see platform_remove(). So
drop useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Instead of calling of_node_put() in every return path let the compiler
do this tedious job to take care of calling of_node_put() when a
device_node pointer gets out of scope.

While touching these pointers, restrict the scope as is sensible.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
EXPORT_SYMBOL() usually goes directly after the function, ditto for
MODULE_DEVICE_TABLE() and module_platform_driver. While improving coding
style, also fix spacing in the of match table and drop the trailing
comma after the array terminator and fix indention.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Since commit 5ab23c7 ("modpost: Create modalias for builtin
modules") MODULE_DEVICE_TABLE() is enough to reference a match table and
the data isn't discarded by the linker even when the driver is built-in
and CONFIG_OF is disabled. So there is no valid reason to not store the
address of that table in the driver struct.

Drop the of_match_ptr() accordingly.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Usage of dev_err_probe() is more compact; properly handles -ENOMEM
and -EPROBE_DEFER and also emits the error code in the emitted message.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants