From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969578AbdD2RVp (ORCPT ); Sat, 29 Apr 2017 13:21:45 -0400 Received: from smtprelay0251.hostedemail.com ([216.40.44.251]:42468 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S969421AbdD2RVj (ORCPT ); Sat, 29 Apr 2017 13:21:39 -0400 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 Message-ID: <1493486493.1874.2.camel@perches.com> Subject: Re: [PATCH 1/1] staging: comedi: use __func__ instead of hardcoded function name From: Joe Perches To: Dhiru Kholia , LKML Cc: Ian Abbott , H Hartley Sweeten Date: Sat, 29 Apr 2017 10:21:33 -0700 In-Reply-To: <1493484468-25699-1-git-send-email-dhiru.kholia@gmail.com> References: <1493484468-25699-1-git-send-email-dhiru.kholia@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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.