malloc: implement USE_DL_PREFIX using inline functions
Subsystems (22)
cover malloc: implement USE_DL_PREFIX using inline functions
Commit cfda60f99ae2 ("sandbox: Use a prefix for all allocation functions") introduced preprocessor macros for malloc/free etc.
This is bad practice as it essentially makes 'free' a reserved keyword and resulted in quite a bit of renaming to avoid that reserved keyword.
A better solution is to define the allocation functions as 'static inline'.
This should go in before the release, as it's a regression not seen before the last release.
A side-effect is that exports.h may not declare malloc/free. I'm not really sure if this is correct, but for sandbox, it should probably be ok?
Simon Goldschmidt (8):
malloc: implement USE_DL_PREFIX via inline functions Revert "mtd: Rename free() to rfree()" Revert "dma: Rename free() to rfree()" Revert "clk: Rename free() to rfree()" Revert "gpio: Rename free() to rfree()" Revert "reset: Rename free() to rfree()" Revert "power-domain: Rename free() to rfree()" Revert "mailbox: Rename free() to rfree()"
drivers/clk/clk-ti-sci.c | 2 +- drivers/clk/clk-uclass.c | 4 +- drivers/clk/clk_sandbox.c | 2 +- drivers/clk/tegra/tegra-car-clk.c | 2 +- drivers/dma/dma-uclass.c | 4 +- drivers/dma/sandbox-dma-test.c | 4 +- drivers/dma/ti/k3-udma.c | 4 +- drivers/gpio/gpio-rcar.c | 2 +- drivers/gpio/gpio-uclass.c | 8 ++-- drivers/mailbox/k3-sec-proxy.c | 2 +- drivers/mailbox/mailbox-uclass.c | 4 +- drivers/mailbox/sandbox-mbox.c | 2 +- drivers/mailbox/stm32-ipcc.c | 2 +- drivers/mailbox/tegra-hsp.c | 2 +- drivers/mtd/mtdcore.c | 4 +- drivers/mtd/nand/raw/denali.c | 2 +- drivers/mtd/nand/spi/core.c | 2 +- drivers/mtd/nand/spi/gigadevice.c | 2 +- drivers/mtd/nand/spi/macronix.c | 2 +- drivers/mtd/nand/spi/micron.c | 2 +- drivers/mtd/nand/spi/winbond.c | 2 +- drivers/power/domain/bcm6328-power-domain.c | 2 +- .../power/domain/imx8-power-domain-legacy.c | 2 +- drivers/power/domain/imx8-power-domain.c | 2 +- drivers/power/domain/imx8m-power-domain.c | 2 +- drivers/power/domain/meson-ee-pwrc.c | 2 +- drivers/power/domain/meson-gx-pwrc-vpu.c | 2 +- drivers/power/domain/mtk-power-domain.c | 2 +- drivers/power/domain/power-domain-uclass.c | 2 +- drivers/power/domain/sandbox-power-domain.c | 2 +- drivers/power/domain/tegra186-power-domain.c | 2 +- drivers/power/domain/ti-sci-power-domain.c | 2 +- drivers/reset/reset-bcm6345.c | 2 +- drivers/reset/reset-hisilicon.c | 2 +- drivers/reset/reset-hsdk.c | 2 +- drivers/reset/reset-imx7.c | 2 +- drivers/reset/reset-mediatek.c | 2 +- drivers/reset/reset-meson.c | 2 +- drivers/reset/reset-mtmips.c | 2 +- drivers/reset/reset-rockchip.c | 2 +- drivers/reset/reset-socfpga.c | 2 +- drivers/reset/reset-sunxi.c | 2 +- drivers/reset/reset-ti-sci.c | 2 +- drivers/reset/reset-uclass.c | 2 +- drivers/reset/reset-uniphier.c | 2 +- drivers/reset/sandbox-reset.c | 2 +- drivers/reset/sti-reset.c | 2 +- drivers/reset/stm32-reset.c | 2 +- drivers/reset/tegra-car-reset.c | 2 +- drivers/reset/tegra186-reset.c | 2 +- include/_exports.h | 2 + include/asm-generic/gpio.h | 2 +- include/clk-uclass.h | 4 +- include/dma-uclass.h | 4 +- include/exports.h | 2 + include/linux/mtd/mtd.h | 4 +- include/mailbox-uclass.h | 4 +- include/malloc.h | 44 ++++++++++++------- include/power-domain-uclass.h | 4 +- include/reset-uclass.h | 4 +- 60 files changed, 105 insertions(+), 87 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/8 malloc: implement USE_DL_PREFIX via inline functions
Commit cfda60f99ae2 ("sandbox: Use a prefix for all allocation functions") introduced preprocessor macros for malloc/free etc.
This is bad practice as it essentially makes 'free' a reserved keyword and resulted in quite a bit of renaming to avoid that reserved keyword.
A better solution is to define the allocation functions as 'static inline'.
As a side effect, exports.h must not export malloc/free for sandbox.
---
A side-effect is that exports.h may not declare malloc/free. I'm not really sure if this is correct, but for sandbox, it should probably be ok?
include/_exports.h | 2 ++ include/exports.h | 2 ++ include/malloc.h | 44 +++++++++++++++++++++++++++++--------------- 3 files changed, 33 insertions(+), 15 deletions(-)
include/_exports.h +2 -0
@@ -22,9 +22,11 @@ EXPORT_FUNC(dummy, void, install_hdlr, void) EXPORT_FUNC(dummy, void, free_hdlr, void)#endif +#ifndef CONFIG_SANDBOX EXPORT_FUNC(malloc, void *, malloc, size_t) #if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) EXPORT_FUNC(free, void, free, void *) +#endif #endif EXPORT_FUNC(udelay, void, udelay, unsigned long) EXPORT_FUNC(get_timer, unsigned long, get_timer, unsigned long)
include/exports.h +2 -0
@@ -25,10 +25,12 @@ void puts(const char*);int printf (const char * fmt, ...);void install_hdlr (int ,interrupt_handler_t ,void *);void free_hdlr (int ); +#ifndef CONFIG_SANDBOX void *malloc (size_t );#if !CONFIG_IS_ENABLED (SYS_MALLOC_SIMPLE )void free (void *);#endif +#endif void __udelay (unsigned long );unsigned long get_timer (unsigned long );int vprintf (const char *,va_list );
include/malloc.h +29 -15
56 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH 1/8 malloc: implement USE_DL_PREFIX via inline functions
Quoted 9 lines · Simon Goldschmidt
Commit
cfda60f99ae2("sandbox: Use a prefix for all allocation functions") introduced preprocessor macros for malloc/free etc.This is bad practice as it essentially makes 'free' a reserved keyword and resulted in quite a bit of renaming to avoid that reserved keyword.
A better solution is to define the allocation functions as 'static inline'.
Quoted 7 lines
As a side effect,
exports.hmust not export malloc/free for sandbox.Signed-off-by Simon Goldschmidt <[email protected]>---
A side-effect is that
exports.hmay not declare malloc/free. I'm not really sure if this is correct, but for sandbox, it should probably be ok?
Is it possible to fix this? E.g. don't use inline for these two functions on sandbox?
Quoted 5 lines
include/_exports.h | 2 ++ include/exports.h | 2 ++ include/malloc.h | 44 +++++++++++++++++++++++++++++--------------- 3 files changed, 33 insertions(+), 15 deletions(-)
PATCH 1/8 malloc: implement USE_DL_PREFIX via inline functions
Am 20.02.2020 um 04:05 schrieb Simon Glass:
Quoted 13 lines
Quoted 11 lines · Simon Goldschmidt
Commit
cfda60f99ae2("sandbox: Use a prefix for all allocation functions") introduced preprocessor macros for malloc/free etc.This is bad practice as it essentially makes 'free' a reserved keyword and resulted in quite a bit of renaming to avoid that reserved keyword.
A better solution is to define the allocation functions as 'static inline'.
As a side effect,
exports.hmust not export malloc/free for sandbox.
Quoted 8 lines
Quoted 5 lines
Signed-off-by Simon Goldschmidt <[email protected]>---
A side-effect is that
exports.hmay not declare malloc/free. I'm not really sure if this is correct, but for sandbox, it should probably be ok?Is it possible to fix this? E.g. don't use inline for these two functions on sandbox?
Not using inline for sandbox for these two is *not* an option as these two are exactly the ones offending globally known names.
I guess we have to know what we want here: what is exports.h meant for? To me it looks like it is meant for "U-Boot API" applications to link against. If so, why is it included in U-Boot sources (in over 20 files)?
I guess one solution would be to move (or copy) the DL prefix handling into exports.h and _exports.h so that applications linking with exports.h implicily call dlmalloc/dlfree, not malloc/free (which would be the OS versions for sandbox).
I'll try to prepare v2 in that direction, but I'm still not unsure since exports.h is included in internal U-Boot code.
Regards,
Simon
Quoted 9 lines
Quoted 6 lines
include/_exports.h | 2 ++ include/exports.h | 2 ++ include/malloc.h | 44 +++++++++++++++++++++++++++++--------------- 3 files changed, 33 insertions(+), 15 deletions(-)Reviewed-by Simon Glass <[email protected]>
PATCH 1/8 malloc: implement USE_DL_PREFIX via inline functions
Quoted 23 lines · Simon Goldschmidt
Am 20.02.2020 um 04:05 schrieb Simon Glass:
Quoted 13 lines
Quoted 11 lines · Simon Goldschmidt
Commit
cfda60f99ae2("sandbox: Use a prefix for all allocation functions") introduced preprocessor macros for malloc/free etc.This is bad practice as it essentially makes 'free' a reserved keyword and resulted in quite a bit of renaming to avoid that reserved keyword.
A better solution is to define the allocation functions as 'static inline'.
As a side effect,
exports.hmust not export malloc/free for sandbox.Quoted 8 lines
Quoted 5 lines
Signed-off-by Simon Goldschmidt <[email protected]>---
A side-effect is that
exports.hmay not declare malloc/free. I'm not really sure if this is correct, but for sandbox, it should probably be ok?Is it possible to fix this? E.g. don't use inline for these two functions on sandbox?
Quoted 6 lines
Not using inline for sandbox for these two is *not* an option as these two are exactly the ones offending globally known names.
I guess we have to know what we want here: what is
exports.hmeant for? To me it looks like it is meant for "U-Boot API" applications to link against. If so, why is it included in U-Boot sources (in over 20 files)?
Yes, it's for API users. But, we also need to be sure our exported functions have the right calling interface. So I suspect a whole lot less files should be including it, and we could have a single place to confirm our exported functions have the right ABI, but not also use this file in so many places?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200304/d946466e/attachment.sig>
PATCH 1/8 malloc: implement USE_DL_PREFIX via inline functions
In reply to Simon GoldschmidtHi Simon,
Quoted 31 lines · Simon Goldschmidt
Am 20.02.2020 um 04:05 schrieb Simon Glass:
Quoted 13 lines
Quoted 11 lines · Simon Goldschmidt
Commit
cfda60f99ae2("sandbox: Use a prefix for all allocation functions") introduced preprocessor macros for malloc/free etc.This is bad practice as it essentially makes 'free' a reserved keyword and resulted in quite a bit of renaming to avoid that reserved keyword.
A better solution is to define the allocation functions as 'static inline'.
As a side effect,
exports.hmust not export malloc/free for sandbox.Quoted 8 lines
Quoted 5 lines
Signed-off-by Simon Goldschmidt <[email protected]>---
A side-effect is that
exports.hmay not declare malloc/free. I'm not really sure if this is correct, but for sandbox, it should probably be ok?Is it possible to fix this? E.g. don't use inline for these two functions on sandbox?
Not using inline for sandbox for these two is *not* an option as these two are exactly the ones offending globally known names.
I guess we have to know what we want here: what is
exports.hmeant for? To me it looks like it is meant for "U-Boot API" applications to link against. If so, why is it included in U-Boot sources (in over 20 files)?
Quoted 7 lines
I guess one solution would be to move (or copy) the DL prefix handling into
exports.hand_exports.hso that applications linking withexports.himplicily call dlmalloc/dlfree, not malloc/free (which would be the OS versions for sandbox).I'll try to prepare v2 in that direction, but I'm still not unsure since
exports.his included in internal U-Boot code.
OK sounds good. I do wonder whether we should drop the exports.h inclusions as part of this? It does seem odd. OR perhaps they are there just to make sure that the functions match the API?
Regards,
Simon
PATCH 2/8 Revert "mtd: Rename free() to rfree()"
In reply to Simon GoldschmidtThis reverts commit 8d38a8459b0de45f5ff41f3e11c278a5cf395fd0.
---
drivers/mtd/mtdcore.c | 4 ++-- drivers/mtd/nand/raw/denali.c | 2 +- drivers/mtd/nand/spi/core.c | 2 +- drivers/mtd/nand/spi/gigadevice.c | 2 +- drivers/mtd/nand/spi/macronix.c | 2 +- drivers/mtd/nand/spi/micron.c | 2 +- drivers/mtd/nand/spi/winbond.c | 2 +- include/linux/mtd/mtd.h | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-)
drivers/mtd/mtdcore.c +2 -2
@@ -1180,10 +1180,10 @@ int mtd_ooblayout_free(struct mtd_info *mtd, int section,if (!mtd || section <0 )return -EINVAL ; -if (!mtd->ooblayout || !mtd->ooblayout->rfree) +if (!mtd->ooblayout || !mtd->ooblayout->free)return -ENOTSUPP ; -return mtd->ooblayout->rfree (mtd, section, oobfree); +return mtd->ooblayout->free (mtd, section, oobfree); }EXPORT_SYMBOL_GPL (mtd_ooblayout_free);
drivers/mtd/nand/raw/denali.c +1 -1
@@ -1160,7 +1160,7 @@ static int denali_ooblayout_free(struct mtd_info *mtd, int section,static const struct mtd_ooblayout_ops denali_ooblayout_ops = { .ecc = denali_ooblayout_ecc, - .rfree = denali_ooblayout_free, + .free = denali_ooblayout_free, };static int denali_multidev_fixup (struct denali_nand_info *denali)
drivers/mtd/nand/spi/core.c +1 -1
@@ -1023,7 +1023,7 @@ static int spinand_noecc_ooblayout_free(struct mtd_info *mtd, int section,static const struct mtd_ooblayout_ops spinand_noecc_ooblayout = { .ecc = spinand_noecc_ooblayout_ecc, - .rfree = spinand_noecc_ooblayout_free, + .free = spinand_noecc_ooblayout_free, };static int spinand_init (struct spinand_device *spinand)
drivers/mtd/nand/spi/gigadevice.c +1 -1
@@ -104,7 +104,7 @@ static int gd5fxgq4xexxg_ecc_get_status(struct spinand_device *spinand,static const struct mtd_ooblayout_ops gd5fxgq4xexxg_ooblayout = { .ecc = gd5fxgq4xexxg_ooblayout_ecc, - .rfree = gd5fxgq4xexxg_ooblayout_free, + .free = gd5fxgq4xexxg_ooblayout_free, };static const struct spinand_info gigadevice_spinand_table[] = {
drivers/mtd/nand/spi/macronix.c +1 -1
@@ -48,7 +48,7 @@ static int mx35lfxge4ab_ooblayout_free(struct mtd_info *mtd, int section,static const struct mtd_ooblayout_ops mx35lfxge4ab_ooblayout = { .ecc = mx35lfxge4ab_ooblayout_ecc, - .rfree = mx35lfxge4ab_ooblayout_free, + .free = mx35lfxge4ab_ooblayout_free, };static int mx35lf1ge4ab_get_eccsr (struct spinand_device *spinand,u8 *eccsr)
drivers/mtd/nand/spi/micron.c +1 -1
@@ -64,7 +64,7 @@ static int mt29f2g01abagd_ooblayout_free(struct mtd_info *mtd, int section,static const struct mtd_ooblayout_ops mt29f2g01abagd_ooblayout = { .ecc = mt29f2g01abagd_ooblayout_ecc, - .rfree = mt29f2g01abagd_ooblayout_free, + .free = mt29f2g01abagd_ooblayout_free, }; static int mt29f2g01abagd_ecc_get_status(struct spinand_device *spinand,
drivers/mtd/nand/spi/winbond.c +1 -1
@@ -60,7 +60,7 @@ static int w25m02gv_ooblayout_free(struct mtd_info *mtd, int section,static const struct mtd_ooblayout_ops w25m02gv_ooblayout = { .ecc = w25m02gv_ooblayout_ecc, - .rfree = w25m02gv_ooblayout_free, + .free = w25m02gv_ooblayout_free, }; static int w25m02gv_select_target(struct spinand_device *spinand,
include/linux/mtd/mtd.h +2 -2
@@ -129,8 +129,8 @@ struct mtd_oob_region {struct mtd_ooblayout_ops {int (*ecc)(struct mtd_info *mtd,int section,struct mtd_oob_region *oobecc); -int (*rfree)(struct mtd_info *mtd,int section, -struct mtd_oob_region *oobfree); +int (*free)(struct mtd_info *mtd,int section, +struct mtd_oob_region *oobfree); };/*
Signature · 1 line
2.20.1
Fabio Estevam
reviewerPATCH 2/8 Revert "mtd: Rename free() to rfree()"
Quoted 2 lines · Simon Goldschmidt
This reverts commit
8d38a8459b0de45f5ff41f3e11c278a5cf395fd0.
You missed to explain the reason for the revert.
PATCH 2/8 Revert "mtd: Rename free() to rfree()"
Am 19.02.2020 um 21:04 schrieb Fabio Estevam:
Quoted 6 lines
Quoted 2 lines · Simon Goldschmidt
This reverts commit
8d38a8459b0de45f5ff41f3e11c278a5cf395fd0.You missed to explain the reason for the revert.
Yes, I'll fix that in v2.
Regards,
Simon
PATCH 2/8 Revert "mtd: Rename free() to rfree()"
In reply to Simon GoldschmidtQuoted 6 lines · Simon Goldschmidt
This reverts commit
8d38a8459b0de45f5ff41f3e11c278a5cf395fd0.Signed-off-by Simon Goldschmidt <[email protected]>---
Quoted 9 lines
drivers/mtd/mtdcore.c | 4 ++-- drivers/mtd/nand/raw/denali.c | 2 +- drivers/mtd/nand/spi/core.c | 2 +- drivers/mtd/nand/spi/gigadevice.c | 2 +- drivers/mtd/nand/spi/macronix.c | 2 +- drivers/mtd/nand/spi/micron.c | 2 +- drivers/mtd/nand/spi/winbond.c | 2 +- include/linux/mtd/mtd.h | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-)
Please do add a commit message.
PATCH 3/8 Revert "dma: Rename free() to rfree()"
In reply to Simon GoldschmidtThis reverts commit aae95882232a24ee49c89d0356febf3685a87c8a.
---
drivers/dma/dma-uclass.c | 4 ++-- drivers/dma/sandbox-dma-test.c | 4 ++-- drivers/dma/ti/k3-udma.c | 4 ++-- include/dma-uclass.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
drivers/dma/dma-uclass.c +2 -2
@@ -123,10 +123,10 @@ int dma_free(struct dma *dma)debug ("%s(dma=%p)\n" , __func__, dma); -if (!ops->rfree) +if (!ops->free)return 0 ; -return ops->rfree (dma); +return ops->free (dma); }int dma_enable (struct dma *dma)
drivers/dma/sandbox-dma-test.c +2 -2
@@ -89,7 +89,7 @@ static int sandbox_dma_request(struct dma *dma)return 0 ; } -static int sandbox_dma_rfree (struct dma *dma) +static int sandbox_dma_free (struct dma *dma) {struct sandbox_dma_dev *ud =dev_get_priv (dma->dev);struct sandbox_dma_chan *uc;
@@ -230,7 +230,7 @@ static const struct dma_ops sandbox_dma_ops = { .transfer = sandbox_dma_transfer, .of_xlate = sandbox_dma_of_xlate, .request = sandbox_dma_request, - .rfree = sandbox_dma_rfree, + .free = sandbox_dma_free, .enable = sandbox_dma_enable, .disable = sandbox_dma_disable, .send = sandbox_dma_send,
drivers/dma/ti/k3-udma.c +2 -2
@@ -1553,7 +1553,7 @@ static int udma_request(struct dma *dma)return 0 ; } -static int udma_rfree (struct dma *dma) +static int udma_free (struct dma *dma) {struct udma_dev *ud =dev_get_priv (dma->dev);struct udma_chan *uc;
@@ -1848,7 +1848,7 @@ static const struct dma_ops udma_ops = { .transfer = udma_transfer, .of_xlate = udma_of_xlate, .request = udma_request, - .rfree = udma_rfree, + .free = udma_free, .enable = udma_enable, .disable = udma_disable, .send = udma_send,
include/dma-uclass.h +2 -2
@@ -58,14 +58,14 @@ struct dma_ops {*/ int (*request)(struct dma *dma);/** -* rfree - Free a previously requested dma. +* free - Free a previously requested dma. * * This is the implementation of the client dma_free() API. * * @dma: The DMA to free. * @return 0 if OK, or a negative error code. */ -int (*rfree)(struct dma *dma); +int (*free)(struct dma *dma);/** * enable() - Enable a DMA Channel. *
Signature · 1 line
2.20.1
PATCH 3/8 Revert "dma: Rename free() to rfree()"
Quoted 11 lines · Simon Goldschmidt
This reverts commit
aae95882232a24ee49c89d0356febf3685a87c8a.Signed-off-by Simon Goldschmidt <[email protected]>---
drivers/dma/dma-uclass.c | 4 ++-- drivers/dma/sandbox-dma-test.c | 4 ++-- drivers/dma/ti/k3-udma.c | 4 ++-- include/dma-uclass.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
But a commit message would be nice.
PATCH 4/8 Revert "clk: Rename free() to rfree()"
In reply to Simon GoldschmidtThis reverts commit fb8c0d595f1ad83bee5dd398b59b0ee16d8d15a9.
---
drivers/clk/clk-ti-sci.c | 2 +- drivers/clk/clk-uclass.c | 4 ++-- drivers/clk/clk_sandbox.c | 2 +- drivers/clk/tegra/tegra-car-clk.c | 2 +- include/clk-uclass.h | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-)
drivers/clk/clk-ti-sci.c +1 -1
@@ -206,7 +206,7 @@ static const struct udevice_id ti_sci_clk_of_match[] = {static struct clk_ops ti_sci_clk_ops = { .of_xlate = ti_sci_clk_of_xlate, .request = ti_sci_clk_request, - .rfree = ti_sci_clk_free, + .free = ti_sci_clk_free, .get_rate = ti_sci_clk_get_rate, .set_rate = ti_sci_clk_set_rate, .set_parent = ti_sci_clk_set_parent,
drivers/clk/clk-uclass.c +2 -2
@@ -426,10 +426,10 @@ int clk_free(struct clk *clk)return 0 ; ops =clk_dev_ops (clk->dev); -if (!ops->rfree) +if (!ops->free)return 0 ; -return ops->rfree (clk); +return ops->free (clk); }ulong clk_get_rate (struct clk *clk)
drivers/clk/clk_sandbox.c +1 -1
@@ -108,7 +108,7 @@ static struct clk_ops sandbox_clk_ops = { .enable = sandbox_clk_enable, .disable = sandbox_clk_disable, .request = sandbox_clk_request, - .rfree = sandbox_clk_free, + .free = sandbox_clk_free, };static int sandbox_clk_probe (struct udevice *dev)
drivers/clk/tegra/tegra-car-clk.c +1 -1
@@ -81,7 +81,7 @@ static int tegra_car_clk_disable(struct clk *clk)static struct clk_ops tegra_car_clk_ops = { .request = tegra_car_clk_request, - .rfree = tegra_car_clk_free, + .free = tegra_car_clk_free, .get_rate = tegra_car_clk_get_rate, .set_rate = tegra_car_clk_set_rate, .enable = tegra_car_clk_enable,
include/clk-uclass.h +2 -2
@@ -53,14 +53,14 @@ struct clk_ops {*/ int (*request)(struct clk *clock);/** -* rfree - Free a previously requested clock. +* free - Free a previously requested clock. * * This is the implementation of the client clk_free() API. * * @clock: The clock to free. * @return 0 if OK, or a negative error code. */ -int (*rfree)(struct clk *clock); +int (*free)(struct clk *clock);/** * get_rate() - Get current clock rate. *
Signature · 1 line
2.20.1
PATCH 4/8 Revert "clk: Rename free() to rfree()"
Quoted 4 lines · Simon Goldschmidt
This reverts commit
fb8c0d595f1ad83bee5dd398b59b0ee16d8d15a9.Signed-off-by Simon Goldschmidt <[email protected]>
Quoted 8 lines
---
drivers/clk/clk-ti-sci.c | 2 +- drivers/clk/clk-uclass.c | 4 ++-- drivers/clk/clk_sandbox.c | 2 +- drivers/clk/tegra/tegra-car-clk.c | 2 +- include/clk-uclass.h | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-)
PATCH 5/8 Revert "gpio: Rename free() to rfree()"
In reply to Simon GoldschmidtThis reverts commit 093152f275e036e54d48b3d9fc0adbc1ca4cc5b0.
---
drivers/gpio/gpio-rcar.c | 2 +- drivers/gpio/gpio-uclass.c | 8 ++++---- include/asm-generic/gpio.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/gpio/gpio-rcar.c +1 -1
@@ -130,7 +130,7 @@ static int rcar_gpio_free(struct udevice *dev, unsigned offset)static const struct dm_gpio_ops rcar_gpio_ops = { .request = rcar_gpio_request, - .rfree = rcar_gpio_free, + .free = rcar_gpio_free, .direction_input = rcar_gpio_direction_input, .direction_output = rcar_gpio_direction_output, .get_value = rcar_gpio_get_value,
drivers/gpio/gpio-uclass.c +4 -4
@@ -364,8 +364,8 @@ int _dm_gpio_free(struct udevice *dev, uint offset) uc_priv =dev_get_uclass_priv (dev);if (!uc_priv->name[offset])return -ENXIO ; -if (gpio_get_ops (dev)->rfree) { - ret =gpio_get_ops (dev)->rfree (dev, offset); +if (gpio_get_ops (dev)->free) { + ret =gpio_get_ops (dev)->free (dev, offset);if (ret)return ret; }
@@ -1043,8 +1043,8 @@ static int gpio_post_bind(struct udevice *dev)if (!reloc_done) {if (ops->request) ops->request += gd->reloc_off; -if (ops->rfree) - ops->rfree += gd->reloc_off; +if (ops->free) + ops->free += gd->reloc_off;if (ops->direction_input) ops->direction_input += gd->reloc_off;if (ops->direction_output)
include/asm-generic/gpio.h +1 -1
@@ -248,7 +248,7 @@ int gpio_xlate_offs_flags(struct udevice *dev, struct gpio_desc *desc,*/ struct dm_gpio_ops {int (*request)(struct udevice *dev,unsigned offset,const char *label); -int (*rfree)(struct udevice *dev,unsigned int offset); +int (*free)(struct udevice *dev,unsigned offset);int (*direction_input)(struct udevice *dev,unsigned offset);int (*direction_output)(struct udevice *dev,unsigned offset,int value);
Signature · 1 line
2.20.1
PATCH 5/8 Revert "gpio: Rename free() to rfree()"
Quoted 10 lines · Simon Goldschmidt
This reverts commit
093152f275e036e54d48b3d9fc0adbc1ca4cc5b0.Signed-off-by Simon Goldschmidt <[email protected]>---
drivers/gpio/gpio-rcar.c | 2 +- drivers/gpio/gpio-uclass.c | 8 ++++---- include/asm-generic/gpio.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)
PATCH 6/8 Revert "reset: Rename free() to rfree()"
In reply to Simon GoldschmidtThis reverts commit 94474b25c3a60a746bf641a975c3db239dae29b9.
---
drivers/reset/reset-bcm6345.c | 2 +- drivers/reset/reset-hisilicon.c | 2 +- drivers/reset/reset-hsdk.c | 2 +- drivers/reset/reset-imx7.c | 2 +- drivers/reset/reset-mediatek.c | 2 +- drivers/reset/reset-meson.c | 2 +- drivers/reset/reset-mtmips.c | 2 +- drivers/reset/reset-rockchip.c | 2 +- drivers/reset/reset-socfpga.c | 2 +- drivers/reset/reset-sunxi.c | 2 +- drivers/reset/reset-ti-sci.c | 2 +- drivers/reset/reset-uclass.c | 2 +- drivers/reset/reset-uniphier.c | 2 +- drivers/reset/sandbox-reset.c | 2 +- drivers/reset/sti-reset.c | 2 +- drivers/reset/stm32-reset.c | 2 +- drivers/reset/tegra-car-reset.c | 2 +- drivers/reset/tegra186-reset.c | 2 +- include/reset-uclass.h | 4 ++-- 19 files changed, 20 insertions(+), 20 deletions(-)
drivers/reset/reset-bcm6345.c +1 -1
@@ -53,7 +53,7 @@ static int bcm6345_reset_request(struct reset_ctl *rst) }struct reset_ops bcm6345_reset_reset_ops = { - .rfree = bcm6345_reset_free, + .free = bcm6345_reset_free, .request = bcm6345_reset_request, .rst_assert = bcm6345_reset_assert, .rst_deassert = bcm6345_reset_deassert,
drivers/reset/reset-hisilicon.c +1 -1
@@ -73,7 +73,7 @@ static int hisi_reset_of_xlate(struct reset_ctl *rst,static const struct reset_ops hisi_reset_reset_ops = { .of_xlate = hisi_reset_of_xlate, .request = hisi_reset_request, - .rfree = hisi_reset_free, + .free = hisi_reset_free, .rst_assert = hisi_reset_assert, .rst_deassert = hisi_reset_deassert, };
drivers/reset/reset-hsdk.c +1 -1
@@ -81,7 +81,7 @@ static int hsdk_reset_noop(struct reset_ctl *rst_ctl)static const struct reset_ops hsdk_reset_ops = { .request = hsdk_reset_noop, - .rfree = hsdk_reset_noop, + .free = hsdk_reset_noop, .rst_assert = hsdk_reset_noop, .rst_deassert = hsdk_reset_reset, };
drivers/reset/reset-imx7.c +1 -1
@@ -273,7 +273,7 @@ static int imx7_reset_request(struct reset_ctl *rst)static const struct reset_ops imx7_reset_reset_ops = { .request = imx7_reset_request, - .rfree = imx7_reset_free, + .free = imx7_reset_free, .rst_assert = imx7_reset_assert, .rst_deassert = imx7_reset_deassert, };
drivers/reset/reset-mediatek.c +1 -1
@@ -57,7 +57,7 @@ static int mediatek_reset_deassert(struct reset_ctl *reset_ctl)struct reset_ops mediatek_reset_ops = { .request = mediatek_reset_request, - .rfree = mediatek_reset_free, + .free = mediatek_reset_free, .rst_assert = mediatek_reset_assert, .rst_deassert = mediatek_reset_deassert, };
drivers/reset/reset-meson.c +1 -1
@@ -63,7 +63,7 @@ static int meson_reset_deassert(struct reset_ctl *reset_ctl)struct reset_ops meson_reset_ops = { .request = meson_reset_request, - .rfree = meson_reset_free, + .free = meson_reset_free, .rst_assert = meson_reset_assert, .rst_deassert = meson_reset_deassert, };
drivers/reset/reset-mtmips.c +1 -1
@@ -46,7 +46,7 @@ static int mtmips_reset_deassert(struct reset_ctl *reset_ctl)static const struct reset_ops mtmips_reset_ops = { .request = mtmips_reset_request, - .rfree = mtmips_reset_free, + .free = mtmips_reset_free, .rst_assert = mtmips_reset_assert, .rst_deassert = mtmips_reset_deassert, };
drivers/reset/reset-rockchip.c +1 -1
@@ -77,7 +77,7 @@ static int rockchip_reset_deassert(struct reset_ctl *reset_ctl)struct reset_ops rockchip_reset_ops = { .request = rockchip_reset_request, - .rfree = rockchip_reset_free, + .free = rockchip_reset_free, .rst_assert = rockchip_reset_assert, .rst_deassert = rockchip_reset_deassert, };
drivers/reset/reset-socfpga.c +1 -1
@@ -106,7 +106,7 @@ static int socfpga_reset_free(struct reset_ctl *reset_ctl)static const struct reset_ops socfpga_reset_ops = { .request = socfpga_reset_request, - .rfree = socfpga_reset_free, + .free = socfpga_reset_free, .rst_assert = socfpga_reset_assert, .rst_deassert = socfpga_reset_deassert, };
drivers/reset/reset-sunxi.c +1 -1
@@ -82,7 +82,7 @@ static int sunxi_reset_deassert(struct reset_ctl *reset_ctl)struct reset_ops sunxi_reset_ops = { .request = sunxi_reset_request, - .rfree = sunxi_reset_free, + .free = sunxi_reset_free, .rst_assert = sunxi_reset_assert, .rst_deassert = sunxi_reset_deassert, };
drivers/reset/reset-ti-sci.c +1 -1
@@ -193,7 +193,7 @@ static const struct udevice_id ti_sci_reset_of_match[] = {static struct reset_ops ti_sci_reset_ops = { .of_xlate = ti_sci_reset_of_xlate, .request = ti_sci_reset_request, - .rfree = ti_sci_reset_free, + .free = ti_sci_reset_free, .rst_assert = ti_sci_reset_assert, .rst_deassert = ti_sci_reset_deassert, .rst_status = ti_sci_reset_status,
drivers/reset/reset-uclass.c +1 -1
@@ -166,7 +166,7 @@ int reset_free(struct reset_ctl *reset_ctl)debug ("%s(reset_ctl=%p)\n" , __func__, reset_ctl); -return ops->rfree (reset_ctl); +return ops->free (reset_ctl); }int reset_assert (struct reset_ctl *reset_ctl)
drivers/reset/reset-uniphier.c +1 -1
@@ -236,7 +236,7 @@ static int uniphier_reset_deassert(struct reset_ctl *reset_ctl)static const struct reset_ops uniphier_reset_ops = { .request = uniphier_reset_request, - .rfree = uniphier_reset_free, + .free = uniphier_reset_free, .rst_assert = uniphier_reset_assert, .rst_deassert = uniphier_reset_deassert, };
drivers/reset/sandbox-reset.c +1 -1
@@ -80,7 +80,7 @@ static const struct udevice_id sandbox_reset_ids[] = {struct reset_ops sandbox_reset_reset_ops = { .request = sandbox_reset_request, - .rfree = sandbox_reset_free, + .free = sandbox_reset_free, .rst_assert = sandbox_reset_assert, .rst_deassert = sandbox_reset_deassert, };
drivers/reset/sti-reset.c +1 -1
@@ -299,7 +299,7 @@ static int sti_reset_deassert(struct reset_ctl *reset_ctl)struct reset_ops sti_reset_ops = { .request = sti_reset_request, - .rfree = sti_reset_free, + .free = sti_reset_free, .rst_assert = sti_reset_assert, .rst_deassert = sti_reset_deassert, };
drivers/reset/stm32-reset.c +1 -1
@@ -65,7 +65,7 @@ static int stm32_reset_deassert(struct reset_ctl *reset_ctl)static const struct reset_ops stm32_reset_ops = { .request = stm32_reset_request, - .rfree = stm32_reset_free, + .free = stm32_reset_free, .rst_assert = stm32_reset_assert, .rst_deassert = stm32_reset_deassert, };
drivers/reset/tegra-car-reset.c +1 -1
@@ -52,7 +52,7 @@ static int tegra_car_reset_deassert(struct reset_ctl *reset_ctl)struct reset_ops tegra_car_reset_ops = { .request = tegra_car_reset_request, - .rfree = tegra_car_reset_free, + .free = tegra_car_reset_free, .rst_assert = tegra_car_reset_assert, .rst_deassert = tegra_car_reset_deassert, };
drivers/reset/tegra186-reset.c +1 -1
@@ -61,7 +61,7 @@ static int tegra186_reset_deassert(struct reset_ctl *reset_ctl)struct reset_ops tegra186_reset_ops = { .request = tegra186_reset_request, - .rfree = tegra186_reset_free, + .free = tegra186_reset_free, .rst_assert = tegra186_reset_assert, .rst_deassert = tegra186_reset_deassert, };
include/reset-uclass.h +2 -2
@@ -51,14 +51,14 @@ struct reset_ops {*/ int (*request)(struct reset_ctl *reset_ctl);/** -* rfree - Free a previously requested reset control. +* free - Free a previously requested reset control. * * This is the implementation of the client reset_free() API. * * @reset_ctl: The reset control to free. * @return 0 if OK, or a negative error code. */ -int (*rfree)(struct reset_ctl *reset_ctl); +int (*free)(struct reset_ctl *reset_ctl);/** * rst_assert - Assert a reset signal. *
Signature · 1 line
2.20.1
PATCH 6/8 Revert "reset: Rename free() to rfree()"
Quoted 18 lines · Simon Goldschmidt
This reverts commit
94474b25c3a60a746bf641a975c3db239dae29b9.Signed-off-by Simon Goldschmidt <[email protected]>---
drivers/reset/reset-bcm6345.c | 2 +- drivers/reset/reset-hisilicon.c | 2 +- drivers/reset/reset-hsdk.c | 2 +- drivers/reset/reset-imx7.c | 2 +- drivers/reset/reset-mediatek.c | 2 +- drivers/reset/reset-meson.c | 2 +- drivers/reset/reset-mtmips.c | 2 +- drivers/reset/reset-rockchip.c | 2 +- drivers/reset/reset-socfpga.c | 2 +- drivers/reset/reset-sunxi.c | 2 +- drivers/reset/reset-ti-sci.c | 2 +- drivers/reset/reset-uclass.c | 2 +-
Quoted 9 lines
drivers/reset/reset-uniphier.c | 2 +- drivers/reset/sandbox-reset.c | 2 +- drivers/reset/sti-reset.c | 2 +- drivers/reset/stm32-reset.c | 2 +- drivers/reset/tegra-car-reset.c | 2 +- drivers/reset/tegra186-reset.c | 2 +- include/reset-uclass.h | 4 ++-- 19 files changed, 20 insertions(+), 20 deletions(-)
PATCH 7/8 Revert "power-domain: Rename free() to rfree()"
In reply to Simon GoldschmidtThis reverts commit 4f51188e47921b17e6b3ce9606c8e71234c9f2df.
---
drivers/power/domain/bcm6328-power-domain.c | 2 +- drivers/power/domain/imx8-power-domain-legacy.c | 2 +- drivers/power/domain/imx8-power-domain.c | 2 +- drivers/power/domain/imx8m-power-domain.c | 2 +- drivers/power/domain/meson-ee-pwrc.c | 2 +- drivers/power/domain/meson-gx-pwrc-vpu.c | 2 +- drivers/power/domain/mtk-power-domain.c | 2 +- drivers/power/domain/power-domain-uclass.c | 2 +- drivers/power/domain/sandbox-power-domain.c | 2 +- drivers/power/domain/tegra186-power-domain.c | 2 +- drivers/power/domain/ti-sci-power-domain.c | 2 +- include/power-domain-uclass.h | 4 ++-- 12 files changed, 13 insertions(+), 13 deletions(-)
drivers/power/domain/bcm6328-power-domain.c +1 -1
@@ -63,7 +63,7 @@ static const struct udevice_id bcm6328_power_domain_ids[] = { };struct power_domain_ops bcm6328_power_domain_ops = { - .rfree = bcm6328_power_domain_free, + .free = bcm6328_power_domain_free, .off = bcm6328_power_domain_off, .on = bcm6328_power_domain_on, .request = bcm6328_power_domain_request,
drivers/power/domain/imx8-power-domain-legacy.c +1 -1
@@ -297,7 +297,7 @@ static const struct udevice_id imx8_power_domain_ids[] = {struct power_domain_ops imx8_power_domain_ops = { .request = imx8_power_domain_request, - .rfree = imx8_power_domain_free, + .free = imx8_power_domain_free, .on = imx8_power_domain_on, .off = imx8_power_domain_off, .of_xlate = imx8_power_domain_of_xlate,
drivers/power/domain/imx8-power-domain.c +1 -1
@@ -74,7 +74,7 @@ static const struct udevice_id imx8_power_domain_ids[] = {struct power_domain_ops imx8_power_domain_ops_v2 = { .request = imx8_power_domain_request, - .rfree = imx8_power_domain_free, + .free = imx8_power_domain_free, .on = imx8_power_domain_on, .off = imx8_power_domain_off, };
drivers/power/domain/imx8m-power-domain.c +1 -1
@@ -122,7 +122,7 @@ static const struct udevice_id imx8m_power_domain_ids[] = {struct power_domain_ops imx8m_power_domain_ops = { .request = imx8m_power_domain_request, - .rfree = imx8m_power_domain_free, + .free = imx8m_power_domain_free, .on = imx8m_power_domain_on, .off = imx8m_power_domain_off, .of_xlate = imx8m_power_domain_of_xlate,
drivers/power/domain/meson-ee-pwrc.c +1 -1
@@ -354,7 +354,7 @@ static int meson_ee_pwrc_of_xlate(struct power_domain *power_domain, }struct power_domain_ops meson_ee_pwrc_ops = { - .rfree = meson_ee_pwrc_free, + .free = meson_ee_pwrc_free, .off = meson_ee_pwrc_off, .on = meson_ee_pwrc_on, .request = meson_ee_pwrc_request,
drivers/power/domain/meson-gx-pwrc-vpu.c +1 -1
@@ -271,7 +271,7 @@ static int meson_pwrc_vpu_of_xlate(struct power_domain *power_domain, }struct power_domain_ops meson_gx_pwrc_vpu_ops = { - .rfree = meson_pwrc_vpu_free, + .free = meson_pwrc_vpu_free, .off = meson_pwrc_vpu_off, .on = meson_pwrc_vpu_on, .request = meson_pwrc_vpu_request,
drivers/power/domain/mtk-power-domain.c +1 -1
@@ -398,7 +398,7 @@ static const struct udevice_id mtk_power_domain_ids[] = { };struct power_domain_ops mtk_power_domain_ops = { - .rfree = scpsys_power_free, + .free = scpsys_power_free, .off = scpsys_power_off, .on = scpsys_power_on, .request = scpsys_power_request,
drivers/power/domain/power-domain-uclass.c +1 -1
@@ -88,7 +88,7 @@ int power_domain_free(struct power_domain *power_domain)debug ("%s(power_domain=%p)\n" , __func__, power_domain); -return ops->rfree (power_domain); +return ops->free (power_domain); }int power_domain_on (struct power_domain *power_domain)
drivers/power/domain/sandbox-power-domain.c +1 -1
@@ -76,7 +76,7 @@ static const struct udevice_id sandbox_power_domain_ids[] = {struct power_domain_ops sandbox_power_domain_ops = { .request = sandbox_power_domain_request, - .rfree = sandbox_power_domain_free, + .free = sandbox_power_domain_free, .on = sandbox_power_domain_on, .off = sandbox_power_domain_off, };
drivers/power/domain/tegra186-power-domain.c +1 -1
@@ -72,7 +72,7 @@ static int tegra186_power_domain_off(struct power_domain *power_domain)struct power_domain_ops tegra186_power_domain_ops = { .request = tegra186_power_domain_request, - .rfree = tegra186_power_domain_free, + .free = tegra186_power_domain_free, .on = tegra186_power_domain_on, .off = tegra186_power_domain_off, };
drivers/power/domain/ti-sci-power-domain.c +1 -1
@@ -123,7 +123,7 @@ static const struct udevice_id ti_sci_power_domain_of_match[] = {static struct power_domain_ops ti_sci_power_domain_ops = { .request = ti_sci_power_domain_request, - .rfree = ti_sci_power_domain_free, + .free = ti_sci_power_domain_free, .on = ti_sci_power_domain_on, .off = ti_sci_power_domain_off, .of_xlate = ti_sci_power_domain_of_xlate,
include/power-domain-uclass.h +2 -2
@@ -54,14 +54,14 @@ struct power_domain_ops {*/ int (*request)(struct power_domain *power_domain);/** -* rfree - Free a previously requested power domain. +* free - Free a previously requested power domain. * * This is the implementation of the client power_domain_free() API. * * @power_domain: The power domain to free. * @return 0 if OK, or a negative error code. */ -int (*rfree)(struct power_domain *power_domain); +int (*free)(struct power_domain *power_domain);/** * on - Power on a power domain. *
Signature · 1 line
2.20.1
PATCH 7/8 Revert "power-domain: Rename free() to rfree()"
Quoted 6 lines · Simon Goldschmidt
This reverts commit
4f51188e47921b17e6b3ce9606c8e71234c9f2df.Signed-off-by Simon Goldschmidt <[email protected]>---
Quoted 13 lines
drivers/power/domain/bcm6328-power-domain.c | 2 +- drivers/power/domain/imx8-power-domain-legacy.c | 2 +- drivers/power/domain/imx8-power-domain.c | 2 +- drivers/power/domain/imx8m-power-domain.c | 2 +- drivers/power/domain/meson-ee-pwrc.c | 2 +- drivers/power/domain/meson-gx-pwrc-vpu.c | 2 +- drivers/power/domain/mtk-power-domain.c | 2 +- drivers/power/domain/power-domain-uclass.c | 2 +- drivers/power/domain/sandbox-power-domain.c | 2 +- drivers/power/domain/tegra186-power-domain.c | 2 +- drivers/power/domain/ti-sci-power-domain.c | 2 +- include/power-domain-uclass.h | 4 ++-- 12 files changed, 13 insertions(+), 13 deletions(-)
PATCH 8/8 Revert "mailbox: Rename free() to rfree()"
In reply to Simon GoldschmidtThis reverts commit cc92c3cc68a9053f53b2814e9233d86553cc998e.
---
drivers/mailbox/k3-sec-proxy.c | 2 +- drivers/mailbox/mailbox-uclass.c | 4 ++-- drivers/mailbox/sandbox-mbox.c | 2 +- drivers/mailbox/stm32-ipcc.c | 2 +- drivers/mailbox/tegra-hsp.c | 2 +- include/mailbox-uclass.h | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-)
drivers/mailbox/k3-sec-proxy.c +1 -1
@@ -293,7 +293,7 @@ static int k3_sec_proxy_recv(struct mbox_chan *chan, void *data)struct mbox_ops k3_sec_proxy_mbox_ops = { .of_xlate = k3_sec_proxy_of_xlate, .request = k3_sec_proxy_request, - .rfree = k3_sec_proxy_free, + .free = k3_sec_proxy_free, .send = k3_sec_proxy_send, .recv = k3_sec_proxy_recv, };
drivers/mailbox/mailbox-uclass.c +2 -2
@@ -106,8 +106,8 @@ int mbox_free(struct mbox_chan *chan)debug ("%s(chan=%p)\n" , __func__, chan); -if (ops->rfree) -return ops->rfree (chan); +if (ops->free) +return ops->free (chan);return 0 ; }
drivers/mailbox/sandbox-mbox.c +1 -1
@@ -88,7 +88,7 @@ static const struct udevice_id sandbox_mbox_ids[] = {struct mbox_ops sandbox_mbox_mbox_ops = { .request = sandbox_mbox_request, - .rfree = sandbox_mbox_free, + .free = sandbox_mbox_free, .send = sandbox_mbox_send, .recv = sandbox_mbox_recv, };
drivers/mailbox/stm32-ipcc.c +1 -1
@@ -154,7 +154,7 @@ static const struct udevice_id stm32_ipcc_ids[] = {struct mbox_ops stm32_ipcc_mbox_ops = { .request = stm32_ipcc_request, - .rfree = stm32_ipcc_free, + .free = stm32_ipcc_free, .send = stm32_ipcc_send, .recv = stm32_ipcc_recv, };
drivers/mailbox/tegra-hsp.c +1 -1
@@ -176,7 +176,7 @@ static const struct udevice_id tegra_hsp_ids[] = {struct mbox_ops tegra_hsp_mbox_ops = { .of_xlate = tegra_hsp_of_xlate, .request = tegra_hsp_request, - .rfree = tegra_hsp_free, + .free = tegra_hsp_free, .send = tegra_hsp_send, .recv = tegra_hsp_recv, };
include/mailbox-uclass.h +2 -2
@@ -49,14 +49,14 @@ struct mbox_ops {*/ int (*request)(struct mbox_chan *chan);/** -* rfree - Free a previously requested channel. +* free - Free a previously requested channel. * * This is the implementation of the client mbox_free() API. * * @chan: The channel to free. * @return 0 if OK, or a negative error code. */ -int (*rfree)(struct mbox_chan *chan); +int (*free)(struct mbox_chan *chan);/** * send - Send a message over a mailbox channel *
Signature · 1 line
2.20.1
PATCH 8/8 Revert "mailbox: Rename free() to rfree()"
Quoted 6 lines · Simon Goldschmidt
This reverts commit
cc92c3cc68a9053f53b2814e9233d86553cc998e.Signed-off-by Simon Goldschmidt <[email protected]>---
Quoted 7 lines
drivers/mailbox/k3-sec-proxy.c | 2 +- drivers/mailbox/mailbox-uclass.c | 4 ++-- drivers/mailbox/sandbox-mbox.c | 2 +- drivers/mailbox/stm32-ipcc.c | 2 +- drivers/mailbox/tegra-hsp.c | 2 +- include/mailbox-uclass.h | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-)
cover malloc: implement USE_DL_PREFIX using inline functions
In reply to Simon GoldschmidtHi Simon,
Quoted 7 lines · Simon Goldschmidt
Commit
cfda60f99ae2("sandbox: Use a prefix for all allocation functions") introduced preprocessor macros for malloc/free etc.This is bad practice as it essentially makes 'free' a reserved keyword and resulted in quite a bit of renaming to avoid that reserved keyword.
Quoted 7 lines
A better solution is to define the allocation functions as 'static inline'.
This should go in before the release, as it's a regression not seen before the last release.
A side-effect is that
exports.hmay not declare malloc/free. I'm not really sure if this is correct, but for sandbox, it should probably be ok?
Well it is OK for now, until we want to add tests for the API.
Tom may have a better idea on this.
Regards,
Simon