Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: mtu3: print endpoint type as string

Print endpoint type as string instead of decimal value to make
the log more readable.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20220708071903.25752-2-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Chunfeng Yun and committed by
Greg Kroah-Hartman
3cb79822 7963d4d7

+6 -6
+4 -4
drivers/usb/mtu3/mtu3_debugfs.c
··· 101 101 for (i = 0; i < mtu->num_eps; i++) { 102 102 mep = mtu->in_eps + i; 103 103 if (mep->flags & MTU3_EP_ENABLED) { 104 - seq_printf(sf, "%s - type: %d\n", mep->name, mep->type); 104 + seq_printf(sf, "%s - type: %s\n", mep->name, usb_ep_type_string(mep->type)); 105 105 used++; 106 106 } 107 107 108 108 mep = mtu->out_eps + i; 109 109 if (mep->flags & MTU3_EP_ENABLED) { 110 - seq_printf(sf, "%s - type: %d\n", mep->name, mep->type); 110 + seq_printf(sf, "%s - type: %s\n", mep->name, usb_ep_type_string(mep->type)); 111 111 used++; 112 112 } 113 113 } ··· 177 177 unsigned long flags; 178 178 179 179 spin_lock_irqsave(&mtu->lock, flags); 180 - seq_printf(sf, "ep - type:%d, maxp:%d, slot:%d, flags:%x\n", 181 - mep->type, mep->maxp, mep->slot, mep->flags); 180 + seq_printf(sf, "ep - type:%s, maxp:%d, slot:%d, flags:%x\n", 181 + usb_ep_type_string(mep->type), mep->maxp, mep->slot, mep->flags); 182 182 spin_unlock_irqrestore(&mtu->lock, flags); 183 183 184 184 return 0;
+2 -2
drivers/usb/mtu3/mtu3_trace.h
··· 238 238 __entry->direction = mep->is_in; 239 239 __entry->gpd_ring = &mep->gpd_ring; 240 240 ), 241 - TP_printk("%s: type %d maxp %d slot %d mult %d burst %d ring %p/%pad flags %c:%c%c%c:%c", 242 - __get_str(name), __entry->type, 241 + TP_printk("%s: type %s maxp %d slot %d mult %d burst %d ring %p/%pad flags %c:%c%c%c:%c", 242 + __get_str(name), usb_ep_type_string(__entry->type), 243 243 __entry->maxp, __entry->slot, 244 244 __entry->mult, __entry->maxburst, 245 245 __entry->gpd_ring, &__entry->gpd_ring->dma,