Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-21 Thread Nicolas Boichat
On Fri, Aug 21, 2020 at 8:18 PM David Laight wrote: > > From: Nicolas Boichat > > Sent: 21 August 2020 13:07 > ... > > > You might also want a #define that can set temporarily > > > to enable traces in a specific file/module even though > > > CONFIG_TRACE=n. > > > > I don't understand how traces a

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-21 Thread Nicolas Boichat
On Fri, Aug 21, 2020 at 11:01 AM Steven Rostedt wrote: > > On Fri, 21 Aug 2020 10:39:02 +0800 > Nicolas Boichat wrote: > > > I'm not sure how that helps? I mean, the use case you have in mind is > > somebody reusing a distro/random config and not being able to use > > trace_printk, right? If that

RE: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-21 Thread David Laight
From: Nicolas Boichat > Sent: 21 August 2020 13:07 ... > > You might also want a #define that can set temporarily > > to enable traces in a specific file/module even though > > CONFIG_TRACE=n. > > I don't understand how traces are supposed to work with CONFIG_TRACE=n? Probably because I meant som

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-21 Thread Nicolas Boichat
On Fri, Aug 21, 2020 at 7:32 PM David Laight wrote: > > From: Nicolas Boichat > > Sent: 21 August 2020 11:28 > > > > On Fri, Aug 21, 2020 at 4:48 PM David Laight > > wrote: > > > > > > From: Steven Rostedt > > > > Sent: 21 August 2020 01:36 > > > > On Fri, 21 Aug 2020 08:13:00 +0800 > > > > Nico

RE: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-21 Thread David Laight
From: Nicolas Boichat > Sent: 21 August 2020 11:28 > > On Fri, Aug 21, 2020 at 4:48 PM David Laight wrote: > > > > From: Steven Rostedt > > > Sent: 21 August 2020 01:36 > > > On Fri, 21 Aug 2020 08:13:00 +0800 > > > Nicolas Boichat wrote: > > > > > > > On Thu, Aug 20, 2020 at 10:23 PM Steven Ros

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-21 Thread Joe Perches
On Thu, 2020-08-20 at 21:57 -0400, Steven Rostedt wrote: > On Fri, 21 Aug 2020 09:39:19 +0800 > Nicolas Boichat wrote: [] > > Some other approaches/ideas: > > 1. Filter all lkml messages that contain trace_printk. Already found > > 1 instance, and I can easily reply to those with a semi-canned an

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-21 Thread Nicolas Boichat
On Fri, Aug 21, 2020 at 4:48 PM David Laight wrote: > > From: Steven Rostedt > > Sent: 21 August 2020 01:36 > > On Fri, 21 Aug 2020 08:13:00 +0800 > > Nicolas Boichat wrote: > > > > > On Thu, Aug 20, 2020 at 10:23 PM Steven Rostedt > > > wrote: > > > > > > > > On Thu, 20 Aug 2020 17:14:12 +0800

RE: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-21 Thread David Laight
From: Steven Rostedt > Sent: 21 August 2020 01:36 > On Fri, 21 Aug 2020 08:13:00 +0800 > Nicolas Boichat wrote: > > > On Thu, Aug 20, 2020 at 10:23 PM Steven Rostedt wrote: > > > > > > On Thu, 20 Aug 2020 17:14:12 +0800 > > > Nicolas Boichat wrote: > > > > > > > Technically, we could only initi

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-20 Thread Joe Perches
On Fri, 2020-08-21 at 10:42 +0800, Nicolas Boichat wrote: > On Fri, Aug 21, 2020 at 10:36 AM Joe Perches wrote: > > On Thu, 2020-08-20 at 21:57 -0400, Steven Rostedt wrote: > > > On Fri, 21 Aug 2020 09:39:19 +0800 > > > Nicolas Boichat wrote: > > [] > > > > Some other approaches/ideas: > > > > 1

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-20 Thread Steven Rostedt
On Thu, 20 Aug 2020 23:04:59 -0400 Steven Rostedt wrote: > On Thu, 20 Aug 2020 19:49:59 -0700 > Joe Perches wrote: > > > Perhaps make trace_printk dependent on #define DEBUG? > > This is basically what Nicolas's patch series does in this very patch! > > And no, I hate it. We are currently d

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-20 Thread Steven Rostedt
On Thu, 20 Aug 2020 19:49:59 -0700 Joe Perches wrote: > Perhaps make trace_printk dependent on #define DEBUG? This is basically what Nicolas's patch series does in this very patch! And no, I hate it. We are currently discussing ways of not having to modify the config in order to allow trace_pri

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-20 Thread Steven Rostedt
On Fri, 21 Aug 2020 10:39:02 +0800 Nicolas Boichat wrote: > I'm not sure how that helps? I mean, the use case you have in mind is > somebody reusing a distro/random config and not being able to use > trace_printk, right? If that config has CONFIG_DISABLE_TRACE_PRINTK=y, > then the developer will

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-20 Thread Steven Rostedt
On Thu, 20 Aug 2020 19:36:19 -0700 Joe Perches wrote: > On Thu, 2020-08-20 at 21:57 -0400, Steven Rostedt wrote: > > On Fri, 21 Aug 2020 09:39:19 +0800 > > Nicolas Boichat wrote: > [] > > > Some other approaches/ideas: > > > 1. Filter all lkml messages that contain trace_printk. Already found

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-20 Thread Nicolas Boichat
On Fri, Aug 21, 2020 at 10:36 AM Joe Perches wrote: > > On Thu, 2020-08-20 at 21:57 -0400, Steven Rostedt wrote: > > On Fri, 21 Aug 2020 09:39:19 +0800 > > Nicolas Boichat wrote: > [] > > > Some other approaches/ideas: > > > 1. Filter all lkml messages that contain trace_printk. Already found >

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-20 Thread Nicolas Boichat
On Fri, Aug 21, 2020 at 9:57 AM Steven Rostedt wrote: > > On Fri, 21 Aug 2020 09:39:19 +0800 > Nicolas Boichat wrote: > > > On Fri, Aug 21, 2020 at 8:36 AM Steven Rostedt wrote: > > > > > > On Fri, 21 Aug 2020 08:13:00 +0800 > > > Nicolas Boichat wrote: > > > > > > > On Thu, Aug 20, 2020 at 10:

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-20 Thread Steven Rostedt
On Fri, 21 Aug 2020 09:39:19 +0800 Nicolas Boichat wrote: > On Fri, Aug 21, 2020 at 8:36 AM Steven Rostedt wrote: > > > > On Fri, 21 Aug 2020 08:13:00 +0800 > > Nicolas Boichat wrote: > > > > > On Thu, Aug 20, 2020 at 10:23 PM Steven Rostedt > > > wrote: > > > > > > > > On Thu, 20 Aug 202

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-20 Thread Nicolas Boichat
On Fri, Aug 21, 2020 at 8:36 AM Steven Rostedt wrote: > > On Fri, 21 Aug 2020 08:13:00 +0800 > Nicolas Boichat wrote: > > > On Thu, Aug 20, 2020 at 10:23 PM Steven Rostedt wrote: > > > > > > On Thu, 20 Aug 2020 17:14:12 +0800 > > > Nicolas Boichat wrote: > > > > > > > Technically, we could only

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-20 Thread Steven Rostedt
On Fri, 21 Aug 2020 08:13:00 +0800 Nicolas Boichat wrote: > On Thu, Aug 20, 2020 at 10:23 PM Steven Rostedt wrote: > > > > On Thu, 20 Aug 2020 17:14:12 +0800 > > Nicolas Boichat wrote: > > > > > Technically, we could only initialize the trace_printk buffers > > > when the print env is switche

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-20 Thread Nicolas Boichat
On Thu, Aug 20, 2020 at 10:23 PM Steven Rostedt wrote: > > On Thu, 20 Aug 2020 17:14:12 +0800 > Nicolas Boichat wrote: > > > Technically, we could only initialize the trace_printk buffers > > when the print env is switched, to avoid the build error and > > unconditional boot-time warning, but I a

Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed

2020-08-20 Thread Steven Rostedt
On Thu, 20 Aug 2020 17:14:12 +0800 Nicolas Boichat wrote: > Technically, we could only initialize the trace_printk buffers > when the print env is switched, to avoid the build error and > unconditional boot-time warning, but I assume this printing > framework will eventually get removed when the