* [PATCH] drivers: core: Add more print info for bus remove and driver remove
@ 2024-08-27 12:52 Angus Chen
2024-08-27 13:18 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Angus Chen @ 2024-08-27 12:52 UTC (permalink / raw)
To: gregkh, rafael; +Cc: linux-kernel, Angus Chen
When enable initcall_debug,some devices call bus remove,
Some devices call driver remove.
Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com>
---
drivers/base/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 8c0733d3aad8..ff965cd51bcf 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -4833,11 +4833,11 @@ void device_shutdown(void)
}
if (dev->bus && dev->bus->shutdown) {
if (initcall_debug)
- dev_info(dev, "shutdown\n");
+ dev_info(dev, "call bus shutdown\n");
dev->bus->shutdown(dev);
} else if (dev->driver && dev->driver->shutdown) {
if (initcall_debug)
- dev_info(dev, "shutdown\n");
+ dev_info(dev, "call driver shutdown\n");
dev->driver->shutdown(dev);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers: core: Add more print info for bus remove and driver remove
2024-08-27 12:52 [PATCH] drivers: core: Add more print info for bus remove and driver remove Angus Chen
@ 2024-08-27 13:18 ` Greg KH
2024-08-28 2:11 ` Angus Chen
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2024-08-27 13:18 UTC (permalink / raw)
To: Angus Chen; +Cc: rafael, linux-kernel
On Tue, Aug 27, 2024 at 08:52:44PM +0800, Angus Chen wrote:
> When enable initcall_debug,some devices call bus remove,
> Some devices call driver remove.
>
> Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com>
> ---
> drivers/base/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 8c0733d3aad8..ff965cd51bcf 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -4833,11 +4833,11 @@ void device_shutdown(void)
> }
> if (dev->bus && dev->bus->shutdown) {
> if (initcall_debug)
> - dev_info(dev, "shutdown\n");
> + dev_info(dev, "call bus shutdown\n");
> dev->bus->shutdown(dev);
> } else if (dev->driver && dev->driver->shutdown) {
> if (initcall_debug)
> - dev_info(dev, "shutdown\n");
> + dev_info(dev, "call driver shutdown\n");
I do not understand, why is this needed? Who needs it and what is going
to rely on it?
Really, this should be moved to dev_dbg() instead, right?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] drivers: core: Add more print info for bus remove and driver remove
2024-08-27 13:18 ` Greg KH
@ 2024-08-28 2:11 ` Angus Chen
2024-09-03 11:04 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Angus Chen @ 2024-08-28 2:11 UTC (permalink / raw)
To: Greg KH; +Cc: rafael@kernel.org, linux-kernel@vger.kernel.org
Hi,gregkh.
> -----Original Message-----
> From: Greg KH <gregkh@linuxfoundation.org>
> Sent: Tuesday, August 27, 2024 9:19 PM
> To: Angus Chen <angus.chen@jaguarmicro.com>
> Cc: rafael@kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] drivers: core: Add more print info for bus remove and driver
> remove
>
> On Tue, Aug 27, 2024 at 08:52:44PM +0800, Angus Chen wrote:
> > When enable initcall_debug,some devices call bus remove,
> > Some devices call driver remove.
> >
> > Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com>
> > ---
> > drivers/base/core.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/base/core.c b/drivers/base/core.c
> > index 8c0733d3aad8..ff965cd51bcf 100644
> > --- a/drivers/base/core.c
> > +++ b/drivers/base/core.c
> > @@ -4833,11 +4833,11 @@ void device_shutdown(void)
> > }
> > if (dev->bus && dev->bus->shutdown) {
> > if (initcall_debug)
> > - dev_info(dev, "shutdown\n");
> > + dev_info(dev, "call bus shutdown\n");
> > dev->bus->shutdown(dev);
> > } else if (dev->driver && dev->driver->shutdown) {
> > if (initcall_debug)
> > - dev_info(dev, "shutdown\n");
> > + dev_info(dev, "call driver shutdown\n");
>
> I do not understand, why is this needed? Who needs it and what is going
> to rely on it?
Thank you for your reply.
While I'm troubleshooting the shutdown sequence of my own bus, I get the same print of the
Different devices. Because some bus->shutdown call the drv->shutdown first, so I want to
Make different print info to differentiate it.
>
> Really, this should be moved to dev_dbg() instead, right?
You are right, dev_dbg looks more better . should I take this patch together or just change it
To dev_dbg?
>
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers: core: Add more print info for bus remove and driver remove
2024-08-28 2:11 ` Angus Chen
@ 2024-09-03 11:04 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2024-09-03 11:04 UTC (permalink / raw)
To: Angus Chen; +Cc: rafael@kernel.org, linux-kernel@vger.kernel.org
On Wed, Aug 28, 2024 at 02:11:10AM +0000, Angus Chen wrote:
> Hi,gregkh.
>
> > -----Original Message-----
> > From: Greg KH <gregkh@linuxfoundation.org>
> > Sent: Tuesday, August 27, 2024 9:19 PM
> > To: Angus Chen <angus.chen@jaguarmicro.com>
> > Cc: rafael@kernel.org; linux-kernel@vger.kernel.org
> > Subject: Re: [PATCH] drivers: core: Add more print info for bus remove and driver
> > remove
> >
> > On Tue, Aug 27, 2024 at 08:52:44PM +0800, Angus Chen wrote:
> > > When enable initcall_debug,some devices call bus remove,
> > > Some devices call driver remove.
> > >
> > > Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com>
> > > ---
> > > drivers/base/core.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/base/core.c b/drivers/base/core.c
> > > index 8c0733d3aad8..ff965cd51bcf 100644
> > > --- a/drivers/base/core.c
> > > +++ b/drivers/base/core.c
> > > @@ -4833,11 +4833,11 @@ void device_shutdown(void)
> > > }
> > > if (dev->bus && dev->bus->shutdown) {
> > > if (initcall_debug)
> > > - dev_info(dev, "shutdown\n");
> > > + dev_info(dev, "call bus shutdown\n");
> > > dev->bus->shutdown(dev);
> > > } else if (dev->driver && dev->driver->shutdown) {
> > > if (initcall_debug)
> > > - dev_info(dev, "shutdown\n");
> > > + dev_info(dev, "call driver shutdown\n");
> >
> > I do not understand, why is this needed? Who needs it and what is going
> > to rely on it?
> Thank you for your reply.
> While I'm troubleshooting the shutdown sequence of my own bus, I get the same print of the
> Different devices. Because some bus->shutdown call the drv->shutdown first, so I want to
> Make different print info to differentiate it.
> >
> > Really, this should be moved to dev_dbg() instead, right?
> You are right, dev_dbg looks more better . should I take this patch together or just change it
> To dev_dbg?
Yes please.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-09-03 11:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27 12:52 [PATCH] drivers: core: Add more print info for bus remove and driver remove Angus Chen
2024-08-27 13:18 ` Greg KH
2024-08-28 2:11 ` Angus Chen
2024-09-03 11:04 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox