[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <58d834c0b0aeeb7e551e101a696ab8faf9d41b61.camel@perches.com>
Date: Thu, 07 Mar 2019 18:33:37 -0800
From: Joe Perches <joe@...ches.com>
To: Randy Li <randy.li@...k-chips.com>, linux-media@...r.kernel.org
Cc: Randy Li <ayaka@...lik.info>, hverkuil@...all.nl,
maxime.ripard@...tlin.com, joro@...tes.org,
linux-kernel@...r.kernel.org, jernej.skrabec@...il.com,
nicolas@...fresne.ca, paul.kocialkowski@...tlin.com,
linux-rockchip@...ts.infradead.org, thomas.petazzoni@...tlin.com,
mchehab@...nel.org, ezequiel@...labora.com,
linux-arm-kernel@...ts.infradead.org, posciak@...omium.org,
groeck@...omium.org
Subject: Re: [PATCH v2 2/6] staging: video: rockchip: add v4l2 decoder
On Thu, 2019-03-07 at 18:03 +0800, Randy Li wrote:
> It is based on the vendor driver sent to mail list before.
trivial notes:
> diff --git a/drivers/staging/rockchip-mpp/mpp_debug.h b/drivers/staging/rockchip-mpp/mpp_debug.h
[]
> +#define mpp_debug_func(type, fmt, args...) \
> + do { \
> + if (unlikely(debug & type)) { \
> + pr_info("%s:%d: " fmt, \
> + __func__, __LINE__, ##args); \
> + } \
> + } while (0)
> +#define mpp_debug(type, fmt, args...) \
> + do { \
> + if (unlikely(debug & type)) { \
> + pr_info(fmt, ##args); \
> + } \
> + } while (0)
> +
It's generally better to emit debug messages at KERN_DEBUG
> +#define mpp_debug_enter() \
> + do { \
> + if (unlikely(debug & DEBUG_FUNCTION)) { \
> + pr_info("%s:%d: enter\n", \
> + __func__, __LINE__); \
> + } \
> + } while (0)
> +
> +#define mpp_debug_leave() \
> + do { \
> + if (unlikely(debug & DEBUG_FUNCTION)) { \
> + pr_info("%s:%d: leave\n", \
> + __func__, __LINE__); \
> + } \
> + } while (0)
I suggest removal of these macros and uses.
There's not much value in enter/leave markings as
the generic ftrace facility does this already.
> +
> +#define mpp_err(fmt, args...) \
> + pr_err("%s:%d: " fmt, __func__, __LINE__, ##args)
__func__, __LINE__ markings generally have little value.
Powered by blists - more mailing lists