[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170430101714.56rob4s2qkzmc6wm@lonestar>
Date: Sun, 30 Apr 2017 15:47:14 +0530
From: Dhiru Kholia <dhiru.kholia@...il.com>
To: Joe Perches <joe@...ches.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Ian Abbott <abbotti@....co.uk>,
H Hartley Sweeten <hsweeten@...ionengravers.com>
Subject: Re: [PATCH 1/1] staging: comedi: use __func__ instead of hardcoded
function name
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
Powered by blists - more mailing lists