| 48544eee | 25-Sep-2023 |
Uwe Kleine-König <[email protected]> |
soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible t
soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning void
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 ignored (apart from emitting a warning) 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. Eventually after all drivers are converted, .remove_new() will be renamed to .remove().
Trivially convert this driver from always returning zero in the remove callback to the void returning variant.
Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]>
show more ...
|
| a8eee863 | 03-Aug-2021 |
Arnd Bergmann <[email protected]> |
soc: ixp4xx/qmgr: fix invalid __iomem access
Sparse reports a compile time warning when dereferencing an __iomem pointer:
drivers/soc/ixp4xx/ixp4xx-qmgr.c:149:37: warning: dereference of noderef ex
soc: ixp4xx/qmgr: fix invalid __iomem access
Sparse reports a compile time warning when dereferencing an __iomem pointer:
drivers/soc/ixp4xx/ixp4xx-qmgr.c:149:37: warning: dereference of noderef expression drivers/soc/ixp4xx/ixp4xx-qmgr.c:153:40: warning: dereference of noderef expression drivers/soc/ixp4xx/ixp4xx-qmgr.c:154:40: warning: dereference of noderef expression drivers/soc/ixp4xx/ixp4xx-qmgr.c:174:38: warning: dereference of noderef expression drivers/soc/ixp4xx/ixp4xx-qmgr.c:174:44: warning: dereference of noderef expression
Use __raw_readl() here for consistency with the rest of the file. This should really get converted to some proper accessor, as the __raw functions are not meant to be used in drivers, but the driver has used these since the start, so for the moment, let's only fix the warning.
Reported-by: kernel test robot <[email protected]> Fixes: d4c9e9fc9751 ("IXP42x: Add QMgr support for IXP425 rev. A0 processors.") Signed-off-by: Arnd Bergmann <[email protected]>
show more ...
|
| 8861452b | 08-Nov-2019 |
Arnd Bergmann <[email protected]> |
soc: ixp4xx: fix printing resources
When compile-testing with 64-bit resource_size_t, gcc reports an invalid printk format string:
In file included from include/linux/dma-mapping.h:7,
soc: ixp4xx: fix printing resources
When compile-testing with 64-bit resource_size_t, gcc reports an invalid printk format string:
In file included from include/linux/dma-mapping.h:7, from drivers/soc/ixp4xx/ixp4xx-npe.c:15: drivers/soc/ixp4xx/ixp4xx-npe.c: In function 'ixp4xx_npe_probe': drivers/soc/ixp4xx/ixp4xx-npe.c:694:18: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=] dev_info(dev, "NPE%d at 0x%08x-0x%08x not available\n",
Use the special %pR format string to print the resources.
Fixes: 0b458d7b10f8 ("soc: ixp4xx: npe: Pass addresses as resources") Signed-off-by: Arnd Bergmann <[email protected]>
show more ...
|
| 9e01a009 | 10-Feb-2019 |
Linus Walleij <[email protected]> |
soc: ixp4xx: qmgr: Add DT probe code
This makes the queue manager driver able to probe from the device tree. It only needs to get a memory resource and two interrupts and the platform device provide
soc: ixp4xx: qmgr: Add DT probe code
This makes the queue manager driver able to probe from the device tree. It only needs to get a memory resource and two interrupts and the platform device provides these as resources, so all is pretty simple.
Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
| e00797f2 | 10-Feb-2019 |
Linus Walleij <[email protected]> |
soc: ixp4xx: npe: Add DT probe code
This makes the NPE driver able to probe from the device tree. It only needs to get three memory resources and the plaform device provide these, so all is pretty s
soc: ixp4xx: npe: Add DT probe code
This makes the NPE driver able to probe from the device tree. It only needs to get three memory resources and the plaform device provide these, so all is pretty simple.
Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
| ecc133c6 | 10-Feb-2019 |
Linus Walleij <[email protected]> |
soc: ixp4xx: qmgr: Pass resources
Instead of using hardcoded base address implicitly obtained through <linux/io.h>, pass the physical base for the QMGR block as a memory resource and remap it in the
soc: ixp4xx: qmgr: Pass resources
Instead of using hardcoded base address implicitly obtained through <linux/io.h>, pass the physical base for the QMGR block as a memory resource and remap it in the driver.
Also pass the two IRQs as resources and obtain them in the driver.
Use devm_* accessors and simplify the error path in the process. Drop memory region request as this is done by the devm_ioremap* functions.
Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
| 6b390319 | 10-Feb-2019 |
Linus Walleij <[email protected]> |
soc: ixp4xx: Remove unused functions
These former inlines turn out to be unused in the kernel. If they are needed in the future, they can be resurrected by reverting or studying this commit.
Signed
soc: ixp4xx: Remove unused functions
These former inlines turn out to be unused in the kernel. If they are needed in the future, they can be resurrected by reverting or studying this commit.
Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
| d08502f2 | 10-Feb-2019 |
Linus Walleij <[email protected]> |
soc: ixp4xx: Uninline several functions
These inline functions immediately exploit the static ioremaps for the queue manager memory region. This does not work with multiplatform where everything nee
soc: ixp4xx: Uninline several functions
These inline functions immediately exploit the static ioremaps for the queue manager memory region. This does not work with multiplatform where everything need to be dynamically remapped, so get rid of these inlines and create new exports for those used by other drivers.
Signed-off-by: Linus Walleij <[email protected]>
show more ...
|