* watchdog pdev id set to -1 @ 2011-02-18 10:41 Koyamangalath, Abhilash 2011-02-18 10:56 ` Felipe Balbi 0 siblings, 1 reply; 6+ messages in thread From: Koyamangalath, Abhilash @ 2011-02-18 10:41 UTC (permalink / raw) To: linux-omap@vger.kernel.org There this boot-time message (on both omap3 and am3517 evms atleast): [ 1.904418] omap_device: omap_wdt.-1: new worst case activate latency 0: 6105 omap_init_wdt() initializes the id to -1 and then omap_device_build() is called with this value; this eventually calls platform_device_register() with a pdev having id as -1. I don't see any code that checks for this -1 and changes it to a non-erroneous value. Perhaps there is a reason I've failed to notice? Please comment. Else I'm planning to submit a patch which fixes this. - Abhilash ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: watchdog pdev id set to -1 2011-02-18 10:41 watchdog pdev id set to -1 Koyamangalath, Abhilash @ 2011-02-18 10:56 ` Felipe Balbi 2011-02-18 11:09 ` Koyamangalath, Abhilash 0 siblings, 1 reply; 6+ messages in thread From: Felipe Balbi @ 2011-02-18 10:56 UTC (permalink / raw) To: Koyamangalath, Abhilash; +Cc: linux-omap@vger.kernel.org Hi, (your lines are over 80-characters, fix it) On Fri, Feb 18, 2011 at 04:11:11PM +0530, Koyamangalath, Abhilash wrote: > There this boot-time message (on both omap3 and am3517 evms atleast): > [ 1.904418] omap_device: omap_wdt.-1: new worst case activate > latency 0: 6105 > > omap_init_wdt() initializes the id to -1 and then omap_device_build() > is called with this value; this eventually calls > platform_device_register() with a pdev having id as -1. I don't see > any code that checks for this -1 and changes it to a non-erroneous > value. > > Perhaps there is a reason I've failed to notice? Please comment. > Else I'm planning to submit a patch which fixes this. That's not an error value. If you have a -1 ID, you're only telling the kernel "this is only omap_wdt platform_device I have", which means that it will look in sysfs as: /sys/devices/platform/omap_wdt/ if you have an ID >= 0, it will look as: /sys/devices/platform/omap_wdt.0/ /sys/devices/platform/omap_wdt.1/ /sys/devices/platform/omap_wdt.2/ etc, that's all. -- balbi ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: watchdog pdev id set to -1 2011-02-18 10:56 ` Felipe Balbi @ 2011-02-18 11:09 ` Koyamangalath, Abhilash 2011-02-18 11:12 ` Felipe Balbi 0 siblings, 1 reply; 6+ messages in thread From: Koyamangalath, Abhilash @ 2011-02-18 11:09 UTC (permalink / raw) To: Balbi, Felipe; +Cc: linux-omap@vger.kernel.org I understand, but is there a subtle reason why are starting from an erroneous-looking -1 rather than a more natural 0 (or 1 ?). > -----Original Message----- > From: Balbi, Felipe > Sent: Friday, February 18, 2011 4:27 PM > To: Koyamangalath, Abhilash > Cc: linux-omap@vger.kernel.org > Subject: Re: watchdog pdev id set to -1 > > Hi, > > (your lines are over 80-characters, fix it) > > On Fri, Feb 18, 2011 at 04:11:11PM +0530, Koyamangalath, Abhilash wrote: > > There this boot-time message (on both omap3 and am3517 evms atleast): > > [ 1.904418] omap_device: omap_wdt.-1: new worst case activate > > latency 0: 6105 > > > > omap_init_wdt() initializes the id to -1 and then omap_device_build() > > is called with this value; this eventually calls > > platform_device_register() with a pdev having id as -1. I don't see > > any code that checks for this -1 and changes it to a non-erroneous > > value. > > > > Perhaps there is a reason I've failed to notice? Please comment. > > Else I'm planning to submit a patch which fixes this. > > That's not an error value. If you have a -1 ID, you're only telling the > kernel "this is only omap_wdt platform_device I have", which means that > it will look in sysfs as: > > /sys/devices/platform/omap_wdt/ > > if you have an ID >= 0, it will look as: > > /sys/devices/platform/omap_wdt.0/ > /sys/devices/platform/omap_wdt.1/ > /sys/devices/platform/omap_wdt.2/ > > etc, that's all. > > -- > balbi ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: watchdog pdev id set to -1 2011-02-18 11:09 ` Koyamangalath, Abhilash @ 2011-02-18 11:12 ` Felipe Balbi 2011-02-22 21:59 ` Mark Brown 0 siblings, 1 reply; 6+ messages in thread From: Felipe Balbi @ 2011-02-18 11:12 UTC (permalink / raw) To: Koyamangalath, Abhilash; +Cc: Balbi, Felipe, linux-omap@vger.kernel.org Hi, (don't top-post) On Fri, Feb 18, 2011 at 04:39:48PM +0530, Koyamangalath, Abhilash wrote: > I understand, but is there a subtle reason why are starting from > an erroneous-looking -1 rather than a more natural 0 (or 1 ?). -1 means no ID. The IDs are zero-based, so we can't use zero. Just change that value and see how things change on sysfs and dmesg then you will know what I'm talking about. That's just an implementation decision of using -1 to signify "no ID needed". -- balbi ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: watchdog pdev id set to -1 2011-02-18 11:12 ` Felipe Balbi @ 2011-02-22 21:59 ` Mark Brown 2011-03-01 0:35 ` Kevin Hilman 0 siblings, 1 reply; 6+ messages in thread From: Mark Brown @ 2011-02-22 21:59 UTC (permalink / raw) To: Felipe Balbi; +Cc: Koyamangalath, Abhilash, linux-omap@vger.kernel.org On Fri, Feb 18, 2011 at 01:12:37PM +0200, Felipe Balbi wrote: > On Fri, Feb 18, 2011 at 04:39:48PM +0530, Koyamangalath, Abhilash wrote: > > I understand, but is there a subtle reason why are starting from > > an erroneous-looking -1 rather than a more natural 0 (or 1 ?). > -1 means no ID. The IDs are zero-based, so we can't use zero. Just > change that value and see how things change on sysfs and dmesg then you > will know what I'm talking about. That's just an implementation decision > of using -1 to signify "no ID needed". Though looking at the report it looks like the omap_device print that's done during boot is doing the wrong thing here and displaying the -1 instead of masking it from the print which is what's expected. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: watchdog pdev id set to -1 2011-02-22 21:59 ` Mark Brown @ 2011-03-01 0:35 ` Kevin Hilman 0 siblings, 0 replies; 6+ messages in thread From: Kevin Hilman @ 2011-03-01 0:35 UTC (permalink / raw) To: Mark Brown Cc: Felipe Balbi, Koyamangalath, Abhilash, linux-omap@vger.kernel.org Mark Brown <broonie@opensource.wolfsonmicro.com> writes: > On Fri, Feb 18, 2011 at 01:12:37PM +0200, Felipe Balbi wrote: > >> On Fri, Feb 18, 2011 at 04:39:48PM +0530, Koyamangalath, Abhilash wrote: >> > I understand, but is there a subtle reason why are starting from >> > an erroneous-looking -1 rather than a more natural 0 (or 1 ?). > >> -1 means no ID. The IDs are zero-based, so we can't use zero. Just >> change that value and see how things change on sysfs and dmesg then you >> will know what I'm talking about. That's just an implementation decision >> of using -1 to signify "no ID needed". > > Though looking at the report it looks like the omap_device print that's > done during boot is doing the wrong thing here and displaying the -1 > instead of masking it from the print which is what's expected. Agreed. Abhilash, Just send a patch to fix the omap_device printk which is the confusing part. Kevin ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-03-01 0:35 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-02-18 10:41 watchdog pdev id set to -1 Koyamangalath, Abhilash 2011-02-18 10:56 ` Felipe Balbi 2011-02-18 11:09 ` Koyamangalath, Abhilash 2011-02-18 11:12 ` Felipe Balbi 2011-02-22 21:59 ` Mark Brown 2011-03-01 0:35 ` Kevin Hilman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox