linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dhiru Kholia <dhiru.kholia@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Ian Abbott <abbotti@mev.co.uk>,
	H Hartley Sweeten <hsweeten@visionengravers.com>
Subject: Re: [PATCH 1/1] staging: comedi: use __func__ instead of hardcoded function name
Date: Sun, 30 Apr 2017 15:47:14 +0530	[thread overview]
Message-ID: <20170430101714.56rob4s2qkzmc6wm@lonestar> (raw)
In-Reply-To: <1493486493.1874.2.camel@perches.com>

On Sat, Apr 29, 2017 at 10:21:33AM -0700, Joe Perches wrote:
> On Sat, 2017-04-29 at 22:17 +0530, Dhiru Kholia wrote:
> > This coding style issue was found by checkpatch.pl script. Using
> > __func__ instead of hardcoded function name should help in future
> > refactoring of this code.
> > 
> >  	if (loop_limit <= 0) {
> >  		dev_warn(dev->class_dev,
> > -			 "loop_limit reached in daqp_interrupt()\n");
> > +			 "loop_limit reached in %s()\n", __func__);
> 
> More common would be:
> 		dev_warn(dev->class_dev, "%s: loop limit reached\n", __func__);

Thanks for the feedback, Joe. I have sent out a v2 of this patch with
this suggestion applied.
 
> It also seems that the loop_limit test, a loop count,
> is sensitive on the cpu frequency and perhaps should
> be some timer based limit instead.

I am not familiar with this code at all. I am doing this patch as part
of "The Eudyptula Challenge" (http://eudyptula-challenge.org/).

Thanks,
Dhiru

      reply	other threads:[~2017-04-30 10:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-29 16:47 [PATCH 1/1] staging: comedi: use __func__ instead of hardcoded function name Dhiru Kholia
2017-04-29 17:21 ` Joe Perches
2017-04-30 10:17   ` Dhiru Kholia [this message]

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=20170430101714.56rob4s2qkzmc6wm@lonestar \
    --to=dhiru.kholia@gmail.com \
    --cc=abbotti@mev.co.uk \
    --cc=hsweeten@visionengravers.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).