Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1633314

Re: [PATCH 1/1] staging: comedi: use __func__ instead of hardcoded function name

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] staging: comedi: use __func__ instead of hardcoded function name
Date Sat, 29 Apr 2017 19:30:01 +0200
Message-ID <tBElX-DO-3@gated-at.bofh.it> (permalink)
References <tBDJf-c0-9@gated-at.bofh.it>
X-Session-Marker 6A6F6540706572636865732E636F6D
X-Spam-Summary 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:599:800:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3868:3870:3871:3872:3874:4321:5007:7514:7903:10004:10400:10848:11026:11232:11657:11658:11914:12043:12296:12555:12679:12740:12760:12895:13069:13149:13230:13255:13311:13357:13439:14181:14659:14721:21080:30012:30029:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:3,LUA_SUMMARY:none
X-He-Tag pies02_47f45bd4acc59
X-Filterd-Recvd-Size 2014
Content-Type text/plain; charset="ISO-8859-1"
X-Mailer Evolution 3.22.6-1ubuntu1
MIME-Version 1.0
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 27
Organization linux.* mail to news gateway
X-Original-Cc Ian Abbott <abbotti@mev.co.uk>, H Hartley Sweeten <hsweeten@visionengravers.com>
X-Original-Date Sat, 29 Apr 2017 10:21:33 -0700
X-Original-Message-ID <1493486493.1874.2.camel@perches.com>
X-Original-References <1493484468-25699-1-git-send-email-dhiru.kholia@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1633314

Show key headers only | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/1] staging: comedi: use __func__ instead of hardcoded function name Dhiru Kholia <dhiru.kholia@gmail.com> - 2017-04-29 18:50 +0200
  Re: [PATCH 1/1] staging: comedi: use __func__ instead of hardcoded  function name Joe Perches <joe@perches.com> - 2017-04-29 19:30 +0200
    Re: [PATCH 1/1] staging: comedi: use __func__ instead of hardcoded  function name Dhiru Kholia <dhiru.kholia@gmail.com> - 2017-04-30 12:20 +0200

csiph-web