Re: [Qemu-devel] [PATCH] usb: Remove magic constants from device bmAttributes

2014-01-28 Thread Gerd Hoffmann
On Mo, 2013-12-16 at 14:34 +0200, Pantelis Koukousoulas wrote: > How about the attached patch instead, I shortened the names > > by using CFG instead of CONFIG and broke the two lines > that were still longer than 80 columns, now checkpatch.pl > > seems happy :) Finally added to usb patch queue.

Re: [Qemu-devel] [PATCH] usb: Remove magic constants from device bmAttributes

2013-12-16 Thread Pantelis Koukousoulas
Either version is fine with me :) On Mon, Dec 16, 2013 at 4:27 PM, Gerd Hoffmann wrote: > Hi, > > > I thought that for lines that are just a logical or of constants > > it would be ok to go over 80 columns, since the alternatives > > > > (shortening the names of constants or breaking the line

Re: [Qemu-devel] [PATCH] usb: Remove magic constants from device bmAttributes

2013-12-16 Thread Gerd Hoffmann
Hi, > I thought that for lines that are just a logical or of constants > it would be ok to go over 80 columns, since the alternatives > > (shortening the names of constants or breaking the line) > > are a little less readable. I don't find the broken lines unreadable, especially if you align

Re: [Qemu-devel] [PATCH] usb: Remove magic constants from device bmAttributes

2013-12-16 Thread Pantelis Koukousoulas
I thought that for lines that are just a logical or of constants it would be ok to go over 80 columns, since the alternatives (shortening the names of constants or breaking the line) are a little less readable. How about the attached patch instead, I shortened the names by using CFG instead of CON

Re: [Qemu-devel] [PATCH] usb: Remove magic constants from device bmAttributes

2013-12-16 Thread Gerd Hoffmann
On Mo, 2013-12-16 at 11:36 +0200, Pantelis Koukousoulas wrote: > Replace magic constants in device bmAttributes with symbolic ones > from Linux kernel ch9.h > -.bmAttributes = 0xc0, > +.bmAttributes = USB_CONFIG_ATT_ONE | > USB_CONFIG_ATT_SELFPOWER, Look

[Qemu-devel] [PATCH] usb: Remove magic constants from device bmAttributes

2013-12-16 Thread Pantelis Koukousoulas
Replace magic constants in device bmAttributes with symbolic ones from Linux kernel ch9.h Signed-off-by: Pantelis Koukousoulas --- hw/usb/desc.c | 2 +- hw/usb/dev-audio.c| 2 +- hw/usb/dev-bluetooth.c| 2 +- hw/usb/dev-hid.c | 8 hw/usb/