Message ID | 20200813062532.829720-11-balbi@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/11] dwc3: meson: fix coccinelle WARNING | expand |
Hi Felipe, balbi@kernel.org wrote: > From: Felipe Balbi <balbi@kernel.org> > > no functional changes > > Signed-off-by: Felipe Balbi <balbi@kernel.org> > --- > drivers/usb/dwc3/debugfs.c | 56 ++++++++++++++++++-------------------- > 1 file changed, 26 insertions(+), 30 deletions(-) > These checkpatch fixes will create many conflicts to the patches I submitted. Did you get a chance to take a look at them yet before I revise them to be able to rebase on your testing/next branch? Thanks, Thinh
Thinh Nguyen <Thinh.Nguyen@synopsys.com> writes: > Hi Felipe, > > balbi@kernel.org wrote: >> From: Felipe Balbi <balbi@kernel.org> >> >> no functional changes >> >> Signed-off-by: Felipe Balbi <balbi@kernel.org> >> --- >> drivers/usb/dwc3/debugfs.c | 56 ++++++++++++++++++-------------------- >> 1 file changed, 26 insertions(+), 30 deletions(-) >> > > These checkpatch fixes will create many conflicts to the patches I > submitted. > > Did you get a chance to take a look at them yet before I revise them to > be able to rebase on your testing/next branch? Which patches specifically do you have in mind? I can rebase my patches on top of yours, shouldn't be a big issue.
Felipe Balbi wrote: > Thinh Nguyen <Thinh.Nguyen@synopsys.com> writes: > >> Hi Felipe, >> >> balbi@kernel.org wrote: >>> From: Felipe Balbi <balbi@kernel.org> >>> >>> no functional changes >>> >>> Signed-off-by: Felipe Balbi <balbi@kernel.org> >>> --- >>> drivers/usb/dwc3/debugfs.c | 56 ++++++++++++++++++-------------------- >>> 1 file changed, 26 insertions(+), 30 deletions(-) >>> >> These checkpatch fixes will create many conflicts to the patches I >> submitted. >> >> Did you get a chance to take a look at them yet before I revise them to >> be able to rebase on your testing/next branch? > Which patches specifically do you have in mind? I can rebase my patches > on top of yours, shouldn't be a big issue. > If possible, can you rebase on top of these 2 series of fixes: Series 1: [PATCH v2 0/7] usb: dwc3: gadget: Fix TRB preparation https://lore.kernel.org/linux-usb/cover.1596767991.git.thinhn@synopsys.com/T/#t Series 2: [PATCH 0/3] usb: dwc3: gadget: Fix halt/clear_stall handling https://lore.kernel.org/linux-usb/cover.1596767991.git.thinhn@synopsys.com/T/#t If they look ok to you, you can rebase on top of them. That'd help me a bunch. I'll let the series updating USB 3.2 soak for a little longer to for any comment. I can rebase and resend that series later. Thanks! Thinh
Thinh Nguyen wrote: > Felipe Balbi wrote: >> Thinh Nguyen <Thinh.Nguyen@synopsys.com> writes: >> >>> Hi Felipe, >>> >>> balbi@kernel.org wrote: >>>> From: Felipe Balbi <balbi@kernel.org> >>>> >>>> no functional changes >>>> >>>> Signed-off-by: Felipe Balbi <balbi@kernel.org> >>>> --- >>>> drivers/usb/dwc3/debugfs.c | 56 ++++++++++++++++++-------------------- >>>> 1 file changed, 26 insertions(+), 30 deletions(-) >>>> >>> These checkpatch fixes will create many conflicts to the patches I >>> submitted. >>> >>> Did you get a chance to take a look at them yet before I revise them to >>> be able to rebase on your testing/next branch? >> Which patches specifically do you have in mind? I can rebase my patches >> on top of yours, shouldn't be a big issue. >> > If possible, can you rebase on top of these 2 series of fixes: > > Series 1: [PATCH v2 0/7] usb: dwc3: gadget: Fix TRB preparation > https://lore.kernel.org/linux-usb/cover.1596767991.git.thinhn@synopsys.com/T/#t > > Series 2: [PATCH 0/3] usb: dwc3: gadget: Fix halt/clear_stall handling Correct link for series 2: https://lore.kernel.org/linux-usb/cover.1596151437.git.thinhn@synopsys.com/T/#t > If they look ok to you, you can rebase on top of them. That'd help me a > bunch. > > I'll let the series updating USB 3.2 soak for a little longer to for any > comment. I can rebase and resend that series later. > Thanks, Thinh
diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c index 2c7b6dd79cdf..608639a0dea7 100644 --- a/drivers/usb/dwc3/debugfs.c +++ b/drivers/usb/dwc3/debugfs.c @@ -397,13 +397,13 @@ static int dwc3_mode_show(struct seq_file *s, void *unused) switch (DWC3_GCTL_PRTCAP(reg)) { case DWC3_GCTL_PRTCAP_HOST: - seq_printf(s, "host\n"); + seq_puts(s, "host\n"); break; case DWC3_GCTL_PRTCAP_DEVICE: - seq_printf(s, "device\n"); + seq_puts(s, "device\n"); break; case DWC3_GCTL_PRTCAP_OTG: - seq_printf(s, "otg\n"); + seq_puts(s, "otg\n"); break; default: seq_printf(s, "UNKNOWN %08x\n", DWC3_GCTL_PRTCAP(reg)); @@ -464,22 +464,22 @@ static int dwc3_testmode_show(struct seq_file *s, void *unused) switch (reg) { case 0: - seq_printf(s, "no test\n"); + seq_puts(s, "no test\n"); break; case USB_TEST_J: - seq_printf(s, "test_j\n"); + seq_puts(s, "test_j\n"); break; case USB_TEST_K: - seq_printf(s, "test_k\n"); + seq_puts(s, "test_k\n"); break; case USB_TEST_SE0_NAK: - seq_printf(s, "test_se0_nak\n"); + seq_puts(s, "test_se0_nak\n"); break; case USB_TEST_PACKET: - seq_printf(s, "test_packet\n"); + seq_puts(s, "test_packet\n"); break; case USB_TEST_FORCE_ENABLE: - seq_printf(s, "test_force_enable\n"); + seq_puts(s, "test_force_enable\n"); break; default: seq_printf(s, "UNKNOWN %d\n", reg); @@ -760,27 +760,26 @@ static int dwc3_transfer_type_show(struct seq_file *s, void *unused) unsigned long flags; spin_lock_irqsave(&dwc->lock, flags); - if (!(dep->flags & DWC3_EP_ENABLED) || - !dep->endpoint.desc) { - seq_printf(s, "--\n"); + if (!(dep->flags & DWC3_EP_ENABLED) || !dep->endpoint.desc) { + seq_puts(s, "--\n"); goto out; } switch (usb_endpoint_type(dep->endpoint.desc)) { case USB_ENDPOINT_XFER_CONTROL: - seq_printf(s, "control\n"); + seq_puts(s, "control\n"); break; case USB_ENDPOINT_XFER_ISOC: - seq_printf(s, "isochronous\n"); + seq_puts(s, "isochronous\n"); break; case USB_ENDPOINT_XFER_BULK: - seq_printf(s, "bulk\n"); + seq_puts(s, "bulk\n"); break; case USB_ENDPOINT_XFER_INT: - seq_printf(s, "interrupt\n"); + seq_puts(s, "interrupt\n"); break; default: - seq_printf(s, "--\n"); + seq_puts(s, "--\n"); } out: @@ -798,11 +797,11 @@ static int dwc3_trb_ring_show(struct seq_file *s, void *unused) spin_lock_irqsave(&dwc->lock, flags); if (dep->number <= 1) { - seq_printf(s, "--\n"); + seq_puts(s, "--\n"); goto out; } - seq_printf(s, "buffer_addr,size,type,ioc,isp_imi,csp,chn,lst,hwo\n"); + seq_puts(s, "buffer_addr,size,type,ioc,isp_imi,csp,chn,lst,hwo\n"); for (i = 0; i < DWC3_TRB_NUM; i++) { struct dwc3_trb *trb = &dep->trb_pool[i]; @@ -884,7 +883,7 @@ static void dwc3_debugfs_create_endpoint_files(struct dwc3_ep *dep, const struct file_operations *fops = dwc3_ep_file_map[i].fops; const char *name = dwc3_ep_file_map[i].name; - debugfs_create_file(name, S_IRUGO, parent, dep, fops); + debugfs_create_file(name, 0444, parent, dep, fops); } } @@ -929,21 +928,18 @@ void dwc3_debugfs_init(struct dwc3 *dwc) root = debugfs_create_dir(dev_name(dwc->dev), usb_debug_root); dwc->root = root; - debugfs_create_regset32("regdump", S_IRUGO, root, dwc->regset); + debugfs_create_regset32("regdump", 0444, root, dwc->regset); + debugfs_create_file("lsp_dump", 0644, root, dwc, &dwc3_lsp_fops); - debugfs_create_file("lsp_dump", S_IRUGO | S_IWUSR, root, dwc, - &dwc3_lsp_fops); - - if (IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE)) { - debugfs_create_file("mode", S_IRUGO | S_IWUSR, root, dwc, + if (IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE)) + debugfs_create_file("mode", 0644, root, dwc, &dwc3_mode_fops); - } if (IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE) || IS_ENABLED(CONFIG_USB_DWC3_GADGET)) { - debugfs_create_file("testmode", S_IRUGO | S_IWUSR, root, dwc, - &dwc3_testmode_fops); - debugfs_create_file("link_state", S_IRUGO | S_IWUSR, root, dwc, + debugfs_create_file("testmode", 0644, root, dwc, + &dwc3_testmode_fops); + debugfs_create_file("link_state", 0644, root, dwc, &dwc3_link_state_fops); dwc3_debugfs_create_endpoint_dirs(dwc, root); }