Re: [PATCH 7/9] staging: vc04_services: Drop vchiq_log_warning() in favour of dev_dbg

Greg Kroah-Hartman
2023-11-23T13:15:50Z

On Tue, Nov 07, 2023 at 04:51:54AM -0500, Umang Jain wrote:
> Drop vchiq_log_warning() macro which wraps dev_dbg(). Introduce the usage
> of dev_dbg() directly.
>
> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
> ---
> .../interface/vchiq_arm/vchiq_arm.c | 35 ++++++++++---------
> .../interface/vchiq_arm/vchiq_core.c | 33 +++++++++--------
> .../interface/vchiq_arm/vchiq_core.h | 4 ---
> 3 files changed, 37 insertions(+), 35 deletions(-)
>
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> index 2cb2a6503058..bc0ee8b9d1c3 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> @@ -690,8 +690,8 @@ int vchiq_initialise(struct vchiq_instance **instance_out)
> pr_err("%s: videocore not initialized\n", __func__);
> return -ENOTCONN;
> } else if (i > 0) {
> - vchiq_log_warning(state->dev, VCHIQ_CORE,
> - "%s: videocore initialized after %d retries\n", __func__, i);
> + dev_dbg(state->dev, "%s: %s: %s: videocore initialized after %d retries\n",
> + log_cat(VCHIQ_CORE), log_type(WARN), __func__, i);

what is the log_type(WARN) stuff for? How does that work? You should
just use the normal dev_dbg() call and don't try to add new prefixes to
the message as that will just confuse the common parsing tools we have
for these types of things.

Also, as before, __func__ is redundant, and now you see it twice in the
output :(

thanks,

greg k-h