From: Joe Perches <joe@perches.com>
To: Dhiru Kholia <dhiru.kholia@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Cc: 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: Sat, 29 Apr 2017 10:21:33 -0700 [thread overview]
Message-ID: <1493486493.1874.2.camel@perches.com> (raw)
In-Reply-To: <1493484468-25699-1-git-send-email-dhiru.kholia@gmail.com>
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.
>
> Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
> ---
> drivers/staging/comedi/drivers/quatech_daqp_cs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
> index 802f51e..ea194aa 100644
> --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c
> +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
> @@ -248,7 +248,7 @@ static irqreturn_t daqp_interrupt(int irq, void *dev_id)
>
> 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__);
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.
next prev parent reply other threads:[~2017-04-29 17:21 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 [this message]
2017-04-30 10:17 ` Dhiru Kholia
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=1493486493.1874.2.camel@perches.com \
--to=joe@perches.com \
--cc=abbotti@mev.co.uk \
--cc=dhiru.kholia@gmail.com \
--cc=hsweeten@visionengravers.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