[PATCH 0/8] malloc: implement USE_DL_PREFIX using inline functions

Simon Goldschmidt simon.k.r.goldschmidt at gmail.com
Wed Feb 19 20:39:26 CET 2020


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(-)

-- 
2.20.1



More information about the U-Boot mailing list