usb: core: hcd: merge repetitive strings in usb_hcd_request_irqs()
PATCH 1/1 usb: core: hcd: merge repetitive strings in usb_hcd_request_irqs()
Two dev_info() calls in usb_hcd_request_irqs() have the same "io " strings needlessly repeated. Merge these strings into the format strings of those dev_info() calls...
---
The patch is against the 'usb-next' branch of Greg KH's 'usb.git' repo...
drivers/usb/core/hcd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/usb/core/hcd.c +6 -6
@@ -2730,16 +2730,16 @@ static int usb_hcd_request_irqs(struct ureturn retval; } hcd->irq = irqnum; -dev_info (hcd->self.controller,"irq %d, %s 0x%08llx\n" , irqnum, - (hcd->driver->flags &HCD_MEMORY ) ? -"io mem" :"io base" , - (unsigned long long )hcd->rsrc_start); +dev_info (hcd->self.controller,"irq %d, io %s 0x%08llx\n" , + irqnum, (hcd->driver->flags &HCD_MEMORY ) ? +"mem" :"base" , + (unsigned long long )hcd->rsrc_start); }else { hcd->irq =0 ;if (hcd->rsrc_start) -dev_info (hcd->self.controller,"%s 0x%08llx\n" , +dev_info (hcd->self.controller,"io %s 0x%08llx\n" , (hcd->driver->flags &HCD_MEMORY ) ? -"io mem" :"io base" , +"mem" :"base" , (unsigned long long )hcd->rsrc_start); }return 0 ;
Greg Kroah-Hartman
maintainerQuoted 18 lines · Sergey Shtylyov
Two
dev_info()calls inusb_hcd_request_irqs()have the same "io " strings needlessly repeated. Merge these strings into the format strings of thosedev_info()calls...Signed-off-by Sergey Shtylyov <[email protected]>---
The patch is against the 'usb-next' branch of Greg KH's 'usb.git' repo...drivers/usb/core/hcd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)Index:
usb/drivers/usb/core/hcd.c
===================================================================drivers/usb/core/hcd.c +0
-0@@ -2730,16 +2730,16 @@ static int usb_hcd_request_irqs(struct ureturn retval;
drivers/usb/core/hcd.c static int usb_hcd_request_irqs(struct u · line 2736
Quoted 10 lines
drivers/usb/core/hcd.c +4
-4} hcd->irq = irqnum; -dev_info (hcd->self.controller,"irq %d, %s 0x%08llx\n" , irqnum, - (hcd->driver->flags &HCD_MEMORY ) ? -"io mem" :"io base" , - (unsigned long long )hcd->rsrc_start); +dev_info (hcd->self.controller,"irq %d, io %s 0x%08llx\n" , + irqnum, (hcd->driver->flags &HCD_MEMORY ) ? +"mem" :"base" , + (unsigned long long )hcd->rsrc_start);
This now makes it harder to grep for messages in the kernel source :(
As this saves almost no memory, I'll just ignore this patch.
thanks,
greg k-h
On 8/26/21 2:32 PM, Greg Kroah-Hartman wrote:
[...]
Quoted 22 lines
Quoted 22 lines
Two
dev_info()calls inusb_hcd_request_irqs()have the same "io " strings needlessly repeated. Merge these strings into the format strings of thosedev_info()calls...Signed-off-by Sergey Shtylyov <[email protected]>---
The patch is against the 'usb-next' branch of Greg KH's 'usb.git' repo...drivers/usb/core/hcd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)Index:
usb/drivers/usb/core/hcd.c
===================================================================drivers/usb/core/hcd.c +0
-2@@ -2730,16 +2730,16 @@ static int usb_hcd_request_irqs(struct ureturn retval; } hcd->irq = irqnum; - dev_info(hcd->self.controller, "irq %d, %s 0x%08llx\n", irqnum, - (hcd->driver->flags & HCD_MEMORY) ?
Quoted 8 lines
drivers/usb/core/hcd.c static int usb_hcd_request_irqs(struct u · line 2736
Quoted 6 lines
drivers/usb/core/hcd.c +4
-2- "io mem" : "io base", - (unsigned long long)hcd->rsrc_start); +dev_info (hcd->self.controller,"irq %d, io %s 0x%08llx\n" , + irqnum, (hcd->driver->flags &HCD_MEMORY ) ? +"mem" :"base" , + (unsigned long long )hcd->rsrc_start);This now makes it harder to grep for messages in the kernel source :(
Mhm, maybe...
Quoted 1 line
As this saves almost no memory, I'll just ignore this patch.
I also didn't find the current strings adequate -- I'd understand "io mem" vs "io port",
not what it is now...
Quoted 3 lines
thanks,
greg k-h
MBR, Sergey
On 26.08.2021 20:39, Sergey Shtylyov wrote:
[...]
Quoted 31 lines
Quoted 22 lines
Quoted 22 lines
Two
dev_info()calls inusb_hcd_request_irqs()have the same "io " strings needlessly repeated. Merge these strings into the format strings of thosedev_info()calls...Signed-off-by Sergey Shtylyov <[email protected]>---
The patch is against the 'usb-next' branch of Greg KH's 'usb.git' repo...drivers/usb/core/hcd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)Index:
usb/drivers/usb/core/hcd.c
===================================================================drivers/usb/core/hcd.c +0
-2@@ -2730,16 +2730,16 @@ static int usb_hcd_request_irqs(struct ureturn retval; } hcd->irq = irqnum; - dev_info(hcd->self.controller, "irq %d, %s 0x%08llx\n", irqnum, - (hcd->driver->flags & HCD_MEMORY) ?Quoted 8 lines
drivers/usb/core/hcd.c static int usb_hcd_request_irqs(struct u · line 2736
Quoted 6 lines
drivers/usb/core/hcd.c +4
-2- "io mem" : "io base", - (unsigned long long)hcd->rsrc_start); +dev_info (hcd->self.controller,"irq %d, io %s 0x%08llx\n" , + irqnum, (hcd->driver->flags &HCD_MEMORY ) ? +"mem" :"base" , + (unsigned long long )hcd->rsrc_start);This now makes it harder to grep for messages in the kernel source :(
Quoted 6 lines
Mhm, maybe...Quoted 1 line
As this saves almost no memory, I'll just ignore this patch.
I also didn't find the current strings adequate -- I'd understand "io mem" vs "io port",
not what it is now...
Indeed, HCD_MEMORY means MMIO, else means I/O ports. Would the patch
fixing this substring be acceptable instead of this one?
Quoted 3 lines
Quoted 3 lines
thanks,
greg k-h
MBR, Sergey