linux/drivers/platform/surface/aggregator
Maximilian Luz 03ee318391 platform/surface: aggregator: Make SSAM_DEFINE_SYNC_REQUEST_x define static functions
The SSAM_DEFINE_SYNC_REQUEST_x() macros are intended to reduce
boiler-plate code for SSAM request definitions by defining a wrapper
function for the specified request. The client device variants of those
macros, i.e. SSAM_DEFINE_SYNC_REQUEST_CL_x() in particular rely on the
multi-device (MD) variants, e.g.:

    #define SSAM_DEFINE_SYNC_REQUEST_CL_R(name, rtype, spec...)   \
        SSAM_DEFINE_SYNC_REQUEST_MD_R(__raw_##name, rtype, spec)  \
        int name(struct ssam_device *sdev, rtype *ret)            \
        {                                                         \
            return __raw_##name(sdev->ctrl, sdev->uid.target,     \
                                sdev->uid.instance, ret);         \
        }

This now creates the problem that it is not possible to declare the
generated functions static via

    static SSAM_DEFINE_SYNC_REQUEST_CL_R(...)

as this will only apply to the function defined by the multi-device
macro, i.e. SSAM_DEFINE_SYNC_REQUEST_MD_R(). Thus compiling with
`-Wmissing-prototypes' rightfully complains that there is a 'static'
keyword missing.

To solve this, make all SSAM_DEFINE_SYNC_REQUEST_x() macros define
static functions. Non-client-device macros are also changed for
consistency. In general, we expect those functions to be only used
locally in the respective drivers for the corresponding interfaces, so
having to define a wrapper function to be able to export this should be
the odd case out.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: b78b4982d7 ("platform/surface: Add platform profile driver")
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20210304190524.1172197-1-luzmaximilian@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-03-08 11:33:28 +01:00
..
bus.c platform/surface: aggregator: Add dedicated bus and device type 2021-01-07 00:06:39 +01:00
bus.h platform/surface: aggregator: Add dedicated bus and device type 2021-01-07 00:06:39 +01:00
controller.c platform/surface: aggregator: Make SSAM_DEFINE_SYNC_REQUEST_x define static functions 2021-03-08 11:33:28 +01:00
controller.h platform/surface: aggregator: Add event item allocation caching 2021-01-06 23:45:34 +01:00
core.c platform/surface: aggregator: Add dedicated bus and device type 2021-01-07 00:06:39 +01:00
Kconfig platform/surface: aggregator: Add dedicated bus and device type 2021-01-07 00:06:39 +01:00
Makefile platform/surface: aggregator: Add dedicated bus and device type 2021-01-07 00:06:39 +01:00
ssh_msgb.h
ssh_packet_layer.c platform/surface: aggregator: Fix access of unaligned value 2021-02-11 16:47:50 +01:00
ssh_packet_layer.h
ssh_parser.c
ssh_parser.h
ssh_request_layer.c platform/surface: aggregator: Fix kernel-doc references 2021-01-18 19:22:08 +01:00
ssh_request_layer.h
trace.h platform/surface: aggregator: Add error injection capabilities 2021-01-07 00:06:22 +01:00