public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Marcus Wolf <linux@wolf-entwicklungen.de>
Cc: dan.carpenter@oracle.com, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: pi433: rf69.c: Introduced define DEBUG_FUNC_ENTRY
Date: Sat, 2 Dec 2017 15:00:31 +0000	[thread overview]
Message-ID: <20171202150031.GD1242@kroah.com> (raw)
In-Reply-To: <1512215150-8401-1-git-send-email-linux@wolf-entwicklungen.de>

On Sat, Dec 02, 2017 at 01:45:50PM +0200, Marcus Wolf wrote:
> Since dev_dbg already depends on define DEBUG, there was no sense, to enclose
> dev_dbg lines with #ifdef DEBUG.
> Instead of removing #ifdef DEBUG, I introduced define DEBUG_FUNC_ENTRY. So now it is
> possible to switch of the function entry debug lines even while debug is switched on.

Ick ick ick.

No, these lines should just all be deleted.  Use ftrace if you want to
see what functions are being called, that's what it is there for.  Don't
create driver-specific defines and functionality for when we already
have that functionality for the whole of the kernel.  That's really
redundant and messy.

> Signed-off-by: Marcus Wolf <linux@wolf-entwicklungen.de>
> ---
>  drivers/staging/pi433/rf69.c |  118 +++++++++++++++++++++---------------------
>  1 file changed, 58 insertions(+), 60 deletions(-)
> 
> diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
> index 12c9df9..0df084e 100644
> --- a/drivers/staging/pi433/rf69.c
> +++ b/drivers/staging/pi433/rf69.c
> @@ -15,8 +15,10 @@
>   * GNU General Public License for more details.
>   */
>  
> -/* enable prosa debug info */
> +/* generic enable/disable dev_dbg */
>  #undef DEBUG
> +/* enable print function entry */
> +#undef DEBUG_FUNC_ENTRY
>  /* enable print of values on reg access */
>  #undef DEBUG_VALUES
>  /* enable print of values on fifo access */
> @@ -40,7 +42,7 @@
>  
>  int rf69_set_mode(struct spi_device *spi, enum mode mode)
>  {
> -	#ifdef DEBUG
> +	#ifdef DEBUG_FUNC_ENTRY
>  		dev_dbg(&spi->dev, "set: mode");
>  	#endif

So this whole #ifdef dev_dbg #endif should all be removed.

thanks,

greg k-h

  reply	other threads:[~2017-12-02 15:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-02 11:45 [PATCH] staging: pi433: rf69.c: Introduced define DEBUG_FUNC_ENTRY Marcus Wolf
2017-12-02 15:00 ` Greg KH [this message]
2017-12-02 17:00   ` Marcus Wolf
2017-12-06 14:56     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171202150031.GD1242@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@wolf-entwicklungen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox