* [PATCH] usb: core: hcd: merge repetitive strings in usb_hcd_request_irqs()
@ 2021-08-21 20:48 Sergey Shtylyov
2021-08-26 11:32 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Sergey Shtylyov @ 2021-08-21 20:48 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-usb
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...
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
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
===================================================================
--- usb.orig/drivers/usb/core/hcd.c
+++ usb/drivers/usb/core/hcd.c
@@ -2730,16 +2730,16 @@ static int usb_hcd_request_irqs(struct u
return 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;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: core: hcd: merge repetitive strings in usb_hcd_request_irqs()
2021-08-21 20:48 [PATCH] usb: core: hcd: merge repetitive strings in usb_hcd_request_irqs() Sergey Shtylyov
@ 2021-08-26 11:32 ` Greg Kroah-Hartman
2021-08-26 17:39 ` Sergey Shtylyov
0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2021-08-26 11:32 UTC (permalink / raw)
To: Sergey Shtylyov; +Cc: linux-usb
On Sat, Aug 21, 2021 at 11:48:38PM +0300, Sergey Shtylyov wrote:
> 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...
>
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
>
> ---
> 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
> ===================================================================
> --- usb.orig/drivers/usb/core/hcd.c
> +++ usb/drivers/usb/core/hcd.c
> @@ -2730,16 +2730,16 @@ static int usb_hcd_request_irqs(struct u
> return 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);
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: core: hcd: merge repetitive strings in usb_hcd_request_irqs()
2021-08-26 11:32 ` Greg Kroah-Hartman
@ 2021-08-26 17:39 ` Sergey Shtylyov
2021-08-27 15:56 ` Sergey Shtylyov
0 siblings, 1 reply; 4+ messages in thread
From: Sergey Shtylyov @ 2021-08-26 17:39 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-usb
On 8/26/21 2:32 PM, Greg Kroah-Hartman wrote:
[...]
>> 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...
>>
>> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
>>
>> ---
>> 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
>> ===================================================================
>> --- usb.orig/drivers/usb/core/hcd.c
>> +++ usb/drivers/usb/core/hcd.c
>> @@ -2730,16 +2730,16 @@ static int usb_hcd_request_irqs(struct u
>> return 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);
>
> This now makes it harder to grep for messages in the kernel source :(
Mhm, maybe...
> 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...
> thanks,
>
> greg k-h
MBR, Sergey
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: core: hcd: merge repetitive strings in usb_hcd_request_irqs()
2021-08-26 17:39 ` Sergey Shtylyov
@ 2021-08-27 15:56 ` Sergey Shtylyov
0 siblings, 0 replies; 4+ messages in thread
From: Sergey Shtylyov @ 2021-08-27 15:56 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-usb
On 26.08.2021 20:39, Sergey Shtylyov wrote:
[...]
>>> 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...
>>>
>>> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
>>>
>>> ---
>>> 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
>>> ===================================================================
>>> --- usb.orig/drivers/usb/core/hcd.c
>>> +++ usb/drivers/usb/core/hcd.c
>>> @@ -2730,16 +2730,16 @@ static int usb_hcd_request_irqs(struct u
>>> return 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);
>>
>> This now makes it harder to grep for messages in the kernel source :(
>
> Mhm, maybe...
>
>> 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?
>> thanks,
>>
>> greg k-h
MBR, Sergey
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-27 15:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-21 20:48 [PATCH] usb: core: hcd: merge repetitive strings in usb_hcd_request_irqs() Sergey Shtylyov
2021-08-26 11:32 ` Greg Kroah-Hartman
2021-08-26 17:39 ` Sergey Shtylyov
2021-08-27 15:56 ` Sergey Shtylyov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.