Logging communication with devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Does Linux provide an elegant and/or standard way of logging
communication with devices that manage buffers and that can help me
improve code like:

$ cat drivers/usb/host/fotg210-hcd.c
...
                temp = snprintf(next, size,
                                "\n\t%p%c%s len=%d %08x urb %p",
                                td, mark, ({ char *tmp;
                                 switch ((scratch>>8)&0x03) {
                                 case 0:
                                        tmp = "out";
                                        break;
                                 case 1:
                                        tmp = "in";
                                        break;
                                 case 2:
                                        tmp = "setup";
                                        break;
                                 default:
                                        tmp = "?";
                                        break;
                                 } tmp; }),
                                (scratch >> 16) & 0x7fff,
                                scratch,
                                td->urb);


-- 
Peter

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux