[U-Boot] [PATCH v7] Export redesign

Simon Glass sjg at chromium.org
Wed Jan 28 21:08:16 CET 2015


On 26 January 2015 at 15:22, Simon Glass <sjg at chromium.org> wrote:
> From: Martin Dorwig <dorwig at tetronik.com>
>
> this is an atempt to make the export of functions typesafe.
> I replaced the jumptable void ** by a struct (jt_funcs) with function pointers.
> The EXPORT_FUNC macro now has 3 fixed parameters and one
> variadic parameter
> The first is the name of the exported function,
> the rest of the parameters are used to format a functionpointer
> in the jumptable,
>
> the EXPORT_FUNC macros are expanded three times,
> 1. to declare the members of the struct
> 2. to initialize the structmember pointers
> 3. to call the functions in stubs.c
>
> Signed-off-by: Martin Dorwig <dorwig at tetronik.com>
> Acked-by: Simon Glass <sjg at chromium.org>
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> (resending to the list since my tweaks are not quite trivial)

Applied to u-boot-dm, on top of the patches it depends on.

Thanks!

>
> ---
>
> Changes in v7:
> - Really increase the API version number (sorry)
>
> Changes in v6:
> - Increase the API version number
>
> Changes in v5:
> - Update to deal with I2C moving to driver model
>
>  arch/blackfin/cpu/cpu.c           |  3 +-
>  board/BuS/eb_cpux9k2/cpux9k2.c    |  2 +-
>  common/cmd_load.c                 |  2 +-
>  common/console.c                  | 20 ++++----
>  common/exports.c                  | 29 ++----------
>  doc/README.standalone             | 41 +++++++++++-----
>  examples/standalone/stubs.c       | 64 +++++++++++++------------
>  include/_exports.h                | 99 +++++++++++++++++++++++++++------------
>  include/asm-generic/global_data.h |  2 +-
>  include/exports.h                 | 22 +++++----
>  10 files changed, 163 insertions(+), 121 deletions(-)


More information about the U-Boot mailing list