Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1396894
| From | Roger Quadros <rogerq@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v7 11/14] usb: otg: use dev_dbg() instead of VDBG() |
| Date | 2016-05-09 11:50 +0200 |
| Message-ID | <rwPZ8-2Mv-17@gated-at.bofh.it> (permalink) |
| References | <rukZs-3a6-21@gated-at.bofh.it> <rul98-3f2-17@gated-at.bofh.it> <rvK5r-2iM-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 06/05/16 12:04, Peter Chen wrote:
> On Mon, May 02, 2016 at 03:18:54PM +0300, Roger Quadros wrote:
>> Now that we have a device reference in struct usb_otg
>> let's use dev_dbg() for debug messages.
>>
>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>> ---
>> drivers/usb/common/usb-otg-fsm.c | 19 +++++++------------
>> 1 file changed, 7 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers/usb/common/usb-otg-fsm.c
>> index 2986b66..e6e58c2 100644
>> --- a/drivers/usb/common/usb-otg-fsm.c
>> +++ b/drivers/usb/common/usb-otg-fsm.c
>> @@ -30,13 +30,6 @@
>> #include <linux/usb/otg.h>
>> #include <linux/usb/otg-fsm.h>
>>
>> -#ifdef VERBOSE
>> -#define VDBG(fmt, args...) pr_debug("[%s] " fmt , \
>> - __func__, ## args)
>> -#else
>> -#define VDBG(stuff...) do {} while (0)
>> -#endif
>> -
>> /* Change USB protocol when there is a protocol change */
>> static int otg_set_protocol(struct otg_fsm *fsm, int protocol)
>> {
>> @@ -44,8 +37,9 @@ static int otg_set_protocol(struct otg_fsm *fsm, int protocol)
>> int ret = 0;
>>
>> if (fsm->protocol != protocol) {
>> - VDBG("Changing role fsm->protocol= %d; new protocol= %d\n",
>> - fsm->protocol, protocol);
>> + dev_vdbg(otg->dev,
>> + "Changing role fsm->protocol= %d; new protocol= %d\n",
>> + fsm->protocol, protocol);
>> /* stop old protocol */
>> if (fsm->protocol == PROTO_HOST)
>> ret = otg_start_host(otg, 0);
>> @@ -226,7 +220,7 @@ static int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state)
>>
>> if (otg->state == new_state)
>> return 0;
>> - VDBG("Set state: %s\n", usb_otg_state_string(new_state));
>> + dev_vdbg(otg->dev, "Set state: %s\n", usb_otg_state_string(new_state));
>> otg_leave_state(fsm, otg->state);
>> switch (new_state) {
>> case OTG_STATE_B_IDLE:
>> @@ -358,7 +352,7 @@ int otg_statemachine(struct usb_otg *otg)
>>
>> switch (state) {
>> case OTG_STATE_UNDEFINED:
>> - VDBG("fsm->id = %d\n", fsm->id);
>> + dev_vdbg(otg->dev, "fsm->id = %d\n", fsm->id);
>> if (fsm->id)
>> otg_set_state(fsm, OTG_STATE_B_IDLE);
>> else
>> @@ -466,7 +460,8 @@ int otg_statemachine(struct usb_otg *otg)
>> }
>> mutex_unlock(&fsm->lock);
>>
>> - VDBG("quit statemachine, changed = %d\n", fsm->state_changed);
>> + dev_vdbg(otg->dev, "quit statemachine, changed = %d\n",
>> + fsm->state_changed);
>> return fsm->state_changed;
>> }
>> EXPORT_SYMBOL_GPL(otg_statemachine);
>> --
>
> Could you squash patch 2 with this one?
>
We can't because at patch 2, otg->dev is not defined and we need patch 2
before patch 8 to prevent the build warning. This patch can come only
after patch 8 where we add otg->dev.
cheers,
-roger
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v7 00/14] USB OTG/dual-role framework Roger Quadros <rogerq@ti.com> - 2016-05-02 14:20 +0200
[PATCH v7 02/14] usb: otg-fsm: Prevent build warning "VDBG" redefined Roger Quadros <rogerq@ti.com> - 2016-05-02 14:20 +0200
Re: [PATCH v7 02/14] usb: otg-fsm: Prevent build warning "VDBG" redefined Peter Chen <hzpeterchen@gmail.com> - 2016-05-11 10:30 +0200
[PATCH v7 07/14] usb: otg: get rid of CONFIG_USB_OTG_FSM in favour of CONFIG_USB_OTG Roger Quadros <rogerq@ti.com> - 2016-05-02 14:30 +0200
Re: [PATCH v7 07/14] usb: otg: get rid of CONFIG_USB_OTG_FSM in favour of CONFIG_USB_OTG Peter Chen <hzpeterchen@gmail.com> - 2016-05-11 10:40 +0200
[PATCH v7 09/14] usb: of: add an API to get OTG device from USB controller node Roger Quadros <rogerq@ti.com> - 2016-05-02 14:30 +0200
Re: [PATCH v7 09/14] usb: of: add an API to get OTG device from USB controller node Rob Herring <robh@kernel.org> - 2016-05-04 15:20 +0200
Re: [PATCH v7 09/14] usb: of: add an API to get OTG device from USB controller node Peter Chen <hzpeterchen@gmail.com> - 2016-05-11 10:50 +0200
Re: [PATCH v7 09/14] usb: of: add an API to get OTG device from USB controller node Roger Quadros <rogerq@ti.com> - 2016-05-11 13:10 +0200
[PATCH v7 11/14] usb: otg: use dev_dbg() instead of VDBG() Roger Quadros <rogerq@ti.com> - 2016-05-02 14:30 +0200
Re: [PATCH v7 11/14] usb: otg: use dev_dbg() instead of VDBG() Peter Chen <hzpeterchen@gmail.com> - 2016-05-06 11:20 +0200
Re: [PATCH v7 11/14] usb: otg: use dev_dbg() instead of VDBG() Roger Quadros <rogerq@ti.com> - 2016-05-09 11:50 +0200
Re: [PATCH v7 11/14] usb: otg: use dev_dbg() instead of VDBG() Peter Chen <hzpeterchen@gmail.com> - 2016-05-11 11:00 +0200
[PATCH v7 14/14] usb: host: xhci-plat: Add otg device to platform data Roger Quadros <rogerq@ti.com> - 2016-05-02 14:30 +0200
Re: [PATCH v7 14/14] usb: host: xhci-plat: Add otg device to platform data Peter Chen <hzpeterchen@gmail.com> - 2016-05-11 11:10 +0200
[PATCH v7 03/14] usb: hcd.h: Add OTG to HCD interface Roger Quadros <rogerq@ti.com> - 2016-05-02 14:30 +0200
Re: [PATCH v7 03/14] usb: hcd.h: Add OTG to HCD interface Peter Chen <hzpeterchen@gmail.com> - 2016-05-06 11:50 +0200
Re: [PATCH v7 03/14] usb: hcd.h: Add OTG to HCD interface Roger Quadros <rogerq@ti.com> - 2016-05-09 11:50 +0200
Re: [PATCH v7 03/14] usb: hcd.h: Add OTG to HCD interface Peter Chen <hzpeterchen@gmail.com> - 2016-05-10 05:30 +0200
Re: [PATCH v7 03/14] usb: hcd.h: Add OTG to HCD interface Roger Quadros <rogerq@ti.com> - 2016-05-10 09:40 +0200
Re: [PATCH v7 03/14] usb: hcd.h: Add OTG to HCD interface Felipe Balbi <balbi@kernel.org> - 2016-05-10 10:20 +0200
Re: [PATCH v7 03/14] usb: hcd.h: Add OTG to HCD interface Roger Quadros <rogerq@ti.com> - 2016-05-10 11:20 +0200
RE: [PATCH v7 03/14] usb: hcd.h: Add OTG to HCD interface Jun Li <jun.li@nxp.com> - 2016-05-10 10:20 +0200
Re: [PATCH v7 03/14] usb: hcd.h: Add OTG to HCD interface Roger Quadros <rogerq@ti.com> - 2016-05-10 11:30 +0200
Re: [PATCH v7 03/14] usb: hcd.h: Add OTG to HCD interface Peter Chen <hzpeterchen@gmail.com> - 2016-05-11 08:30 +0200
[PATCH v7 12/14] usb: hcd: Adapt to OTG core Roger Quadros <rogerq@ti.com> - 2016-05-02 14:30 +0200
Re: [PATCH v7 12/14] usb: hcd: Adapt to OTG core Peter Chen <hzpeterchen@gmail.com> - 2016-05-11 11:10 +0200
[PATCH v7 01/14] usb: hcd: Initialize hcd->flags to 0 Roger Quadros <rogerq@ti.com> - 2016-05-02 14:30 +0200
Re: [PATCH v7 01/14] usb: hcd: Initialize hcd->flags to 0 Peter Chen <hzpeterchen@gmail.com> - 2016-05-06 11:20 +0200
[PATCH v7 06/14] usb: gadget.h: Add OTG to gadget interface Roger Quadros <rogerq@ti.com> - 2016-05-02 14:30 +0200
[PATCH v7 08/14] usb: otg: add OTG/dual-role core Roger Quadros <rogerq@ti.com> - 2016-05-02 14:30 +0200
Re: [PATCH v7 08/14] usb: otg: add OTG/dual-role core Peter Chen <hzpeterchen@gmail.com> - 2016-05-11 10:50 +0200
Re: [PATCH v7 08/14] usb: otg: add OTG/dual-role core Roger Quadros <rogerq@ti.com> - 2016-05-11 13:10 +0200
[PATCH v7 13/14] usb: gadget: udc: adapt to OTG core Roger Quadros <rogerq@ti.com> - 2016-05-02 14:30 +0200
[PATCH v7 05/14] usb: otg-fsm: move host controller operations into usb_otg->hcd_ops Roger Quadros <rogerq@ti.com> - 2016-05-02 14:30 +0200
Re: [PATCH v7 05/14] usb: otg-fsm: move host controller operations into usb_otg->hcd_ops Peter Chen <hzpeterchen@gmail.com> - 2016-05-11 08:20 +0200
Re: [PATCH v7 05/14] usb: otg-fsm: move host controller operations into usb_otg->hcd_ops Roger Quadros <rogerq@ti.com> - 2016-05-11 13:10 +0200
Re: [PATCH v7 05/14] usb: otg-fsm: move host controller operations into usb_otg->hcd_ops Roger Quadros <rogerq@ti.com> - 2016-05-11 14:40 +0200
Re: [PATCH v7 05/14] usb: otg-fsm: move host controller operations into usb_otg->hcd_ops Peter Chen <hzpeterchen@gmail.com> - 2016-05-12 10:30 +0200
Re: [PATCH v7 05/14] usb: otg-fsm: move host controller operations into usb_otg->hcd_ops Roger Quadros <rogerq@ti.com> - 2016-05-12 10:40 +0200
[PATCH v7 10/14] usb: otg: add hcd companion support Roger Quadros <rogerq@ti.com> - 2016-05-02 14:30 +0200
Re: [PATCH v7 10/14] usb: otg: add hcd companion support Rob Herring <robh@kernel.org> - 2016-05-04 15:20 +0200
Re: [PATCH v7 10/14] usb: otg: add hcd companion support Roger Quadros <rogerq@ti.com> - 2016-05-04 15:50 +0200
Re: [PATCH v7 10/14] usb: otg: add hcd companion support Rob Herring <robh@kernel.org> - 2016-05-11 16:00 +0200
Re: [PATCH v7 10/14] usb: otg: add hcd companion support Roger Quadros <rogerq@ti.com> - 2016-05-11 16:20 +0200
Re: [PATCH v7 10/14] usb: otg: add hcd companion support Alan Stern <stern@rowland.harvard.edu> - 2016-05-11 16:50 +0200
RE: [PATCH v7 10/14] usb: otg: add hcd companion support Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> - 2016-05-12 06:10 +0200
Re: [PATCH v7 10/14] usb: otg: add hcd companion support Roger Quadros <rogerq@ti.com> - 2016-05-12 10:40 +0200
Re: [PATCH v7 10/14] usb: otg: add hcd companion support Roger Quadros <rogerq@ti.com> - 2016-05-12 11:40 +0200
RE: [PATCH v7 10/14] usb: otg: add hcd companion support Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> - 2016-05-12 12:40 +0200
Re: [PATCH v7 10/14] usb: otg: add hcd companion support Roger Quadros <rogerq@ti.com> - 2016-05-12 14:20 +0200
Re: [PATCH v7 10/14] usb: otg: add hcd companion support Peter Chen <hzpeterchen@gmail.com> - 2016-05-11 11:00 +0200
Re: [PATCH v7 00/14] USB OTG/dual-role framework Peter Chen <hzpeterchen@gmail.com> - 2016-05-11 10:50 +0200
Re: [PATCH v7 00/14] USB OTG/dual-role framework Roger Quadros <rogerq@ti.com> - 2016-05-11 13:10 +0200
csiph-web