platform/mellanox: mlxbf-pmc: mlxbf_pmc_event_list(): make size ptr optional
authorLuiz Capitulino <luizcap@redhat.com>
Thu, 22 Feb 2024 20:57:29 +0000 (15:57 -0500)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 27 Feb 2024 12:45:32 +0000 (14:45 +0200)
commit0d46439bda37e2e13f14d6a9e211c4f645c6336a
tree1db6d8f03f055efa2301cd40fcdef298291b3336
parentf9ccdb4285a61a24db7dee61f19c4252fdd153c2
platform/mellanox: mlxbf-pmc: mlxbf_pmc_event_list(): make size ptr optional

The mlxbf_pmc_event_list() function returns a pointer to an array of
supported events and the array size. The array size is returned via
a pointer passed as an argument, which is mandatory.

However, we want to be able to use mlxbf_pmc_event_list() just to check
if a block name is implemented/supported. For this usage passing the size
argument is not necessary so let's make it optional.

Signed-off-by: Luiz Capitulino <luizcap@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/182de8ec6b9c33152f2ba6b248c35b0311abf5e4.1708635408.git.luizcap@redhat.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/mellanox/mlxbf-pmc.c