linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: adc: bcm_iproc_adc: Use %s and __func__
@ 2021-04-01  6:25 Mugilraj Dhavachelvan
  2021-04-01  9:24 ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Mugilraj Dhavachelvan @ 2021-04-01  6:25 UTC (permalink / raw)
  Cc: Mugilraj Dhavachelvan, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, linux-iio,
	linux-arm-kernel, linux-kernel

Change function's name to %s and __func__ to fix checkpatch.pl errors.

Signed-off-by: Mugilraj Dhavachelvan <dmugil2000@gmail.com>
---
 drivers/iio/adc/bcm_iproc_adc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iio/adc/bcm_iproc_adc.c b/drivers/iio/adc/bcm_iproc_adc.c
index 5e396104ac86..6bffda1082a2 100644
--- a/drivers/iio/adc/bcm_iproc_adc.c
+++ b/drivers/iio/adc/bcm_iproc_adc.c
@@ -170,8 +170,7 @@ static irqreturn_t iproc_adc_interrupt_handler(int irq, void *data)
 	adc_priv = iio_priv(indio_dev);
 
 	regmap_read(adc_priv->regmap, IPROC_INTERRUPT_STATUS, &intr_status);
-	dev_dbg(&indio_dev->dev, "iproc_adc_interrupt_handler(),INTRPT_STS:%x\n",
-			intr_status);
+	dev_dbg(&indio_dev->dev, "%s,INTRPT_STS:%x\n", __func__, intr_status);
 
 	intr_channels = (intr_status & IPROC_ADC_INTR_MASK) >> IPROC_ADC_INTR;
 	if (intr_channels) {
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] iio: adc: bcm_iproc_adc: Use %s and __func__
  2021-04-01  6:25 [PATCH] iio: adc: bcm_iproc_adc: Use %s and __func__ Mugilraj Dhavachelvan
@ 2021-04-01  9:24 ` Andy Shevchenko
  2021-04-01 10:30   ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2021-04-01  9:24 UTC (permalink / raw)
  To: Mugilraj Dhavachelvan
  Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, linux-iio, linux-arm Mailing List,
	Linux Kernel Mailing List

On Thu, Apr 1, 2021 at 9:27 AM Mugilraj Dhavachelvan
<dmugil2000@gmail.com> wrote:
>
> Change function's name to %s and __func__ to fix checkpatch.pl errors.

No, just drop the __func__ completely. First of all, we have a device
name, and uniqueness of the messages in the driver should guarantee
easy findings. Second, specific to _dbg() variants, with enabled
Dynamic Debug it can be chosen at run time!

I recommend going through all drivers and drop __func__ near to
dev_dbg() and pr_debug().

-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iio: adc: bcm_iproc_adc: Use %s and __func__
  2021-04-01  9:24 ` Andy Shevchenko
@ 2021-04-01 10:30   ` Jonathan Cameron
  2021-04-01 14:52     ` Mugilraj D
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Cameron @ 2021-04-01 10:30 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Mugilraj Dhavachelvan, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, linux-iio,
	linux-arm Mailing List, Linux Kernel Mailing List

On Thu, 1 Apr 2021 12:24:50 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Thu, Apr 1, 2021 at 9:27 AM Mugilraj Dhavachelvan
> <dmugil2000@gmail.com> wrote:
> >
> > Change function's name to %s and __func__ to fix checkpatch.pl errors.  
> 
> No, just drop the __func__ completely. First of all, we have a device
> name, and uniqueness of the messages in the driver should guarantee
> easy findings. Second, specific to _dbg() variants, with enabled
> Dynamic Debug it can be chosen at run time!
> 
> I recommend going through all drivers and drop __func__ near to
> dev_dbg() and pr_debug().
> 

Agreed.  Though beware that some maintainers will count this
as noise and get grumpy.

I'm fine with such patches for IIO.

Jonathan

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iio: adc: bcm_iproc_adc: Use %s and __func__
  2021-04-01 10:30   ` Jonathan Cameron
@ 2021-04-01 14:52     ` Mugilraj D
  2021-04-01 15:05       ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Mugilraj D @ 2021-04-01 14:52 UTC (permalink / raw)
  To: Jonathan Cameron, Andy Shevchenko
  Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, linux-iio, linux-arm Mailing List,
	Linux Kernel Mailing List



On 01/04/21 4:00 pm, Jonathan Cameron wrote:
> On Thu, 1 Apr 2021 12:24:50 +0300
> Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> 
>> On Thu, Apr 1, 2021 at 9:27 AM Mugilraj Dhavachelvan
>> <dmugil2000@gmail.com> wrote:
>>>
>>> Change function's name to %s and __func__ to fix checkpatch.pl errors.  
>>
>> No, just drop the __func__ completely. First of all, we have a device
>> name, and uniqueness of the messages in the driver should guarantee
>> easy findings. Second, specific to _dbg() variants, with enabled
>> Dynamic Debug it can be chosen at run time!
>>
>> I recommend going through all drivers and drop __func__ near to
>> dev_dbg() and pr_debug().
>>
> 
> Agreed.  Though beware that some maintainers will count this
> as noise and get grumpy.
> 
> I'm fine with such patches for IIO.

Sorry for the noise. I just seen the docs about dynamic debug.
So, if we use dev_dbg("log_msg") it will print statement like
filename:lineno [module]func flag log_msg, If I get it correctly.
And no need of specifying __func__ in dev_dbg() and dp_dbg() right!!

Jonathan do you have any TODO's?

> 
> Jonathan
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iio: adc: bcm_iproc_adc: Use %s and __func__
  2021-04-01 14:52     ` Mugilraj D
@ 2021-04-01 15:05       ` Jonathan Cameron
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2021-04-01 15:05 UTC (permalink / raw)
  To: Mugilraj D
  Cc: Jonathan Cameron, Andy Shevchenko, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, linux-iio,
	linux-arm Mailing List, Linux Kernel Mailing List

On Thu, 1 Apr 2021 20:22:47 +0530
Mugilraj D <dmugil2000@gmail.com> wrote:

> On 01/04/21 4:00 pm, Jonathan Cameron wrote:
> > On Thu, 1 Apr 2021 12:24:50 +0300
> > Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> >   
> >> On Thu, Apr 1, 2021 at 9:27 AM Mugilraj Dhavachelvan
> >> <dmugil2000@gmail.com> wrote:  
> >>>
> >>> Change function's name to %s and __func__ to fix checkpatch.pl errors.    
> >>
> >> No, just drop the __func__ completely. First of all, we have a device
> >> name, and uniqueness of the messages in the driver should guarantee
> >> easy findings. Second, specific to _dbg() variants, with enabled
> >> Dynamic Debug it can be chosen at run time!
> >>
> >> I recommend going through all drivers and drop __func__ near to
> >> dev_dbg() and pr_debug().
> >>  
> > 
> > Agreed.  Though beware that some maintainers will count this
> > as noise and get grumpy.
> > 
> > I'm fine with such patches for IIO.  
> 
> Sorry for the noise. I just seen the docs about dynamic debug.
> So, if we use dev_dbg("log_msg") it will print statement like
> filename:lineno [module]func flag log_msg, If I get it correctly.
> And no need of specifying __func__ in dev_dbg() and dp_dbg() right!!
> 
> Jonathan do you have any TODO's?

I tend not to mind cleanup patches (within reason)in IIO so I'm absolutely
fine with a series removing any __func__ items like this.  One patch per
driver preferred because it avoids issues with this interfering with backports
etc. There will end up being about 18 patches from a quick grep.  Perhaps send
a small number first though to avoid having to put in too much effort as
any issues likely to affect the whole set.

Just be careful with other maintainers, they sometimes strike a different
balance for what they consider noise vs useful.  

Jonathan

> 
> > 
> > Jonathan
> >   


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-01 15:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01  6:25 [PATCH] iio: adc: bcm_iproc_adc: Use %s and __func__ Mugilraj Dhavachelvan
2021-04-01  9:24 ` Andy Shevchenko
2021-04-01 10:30   ` Jonathan Cameron
2021-04-01 14:52     ` Mugilraj D
2021-04-01 15:05       ` Jonathan Cameron

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).