From mboxrd@z Thu Jan 1 00:00:00 1970 From: michael Date: Wed, 26 Nov 2008 12:23:24 +0100 Subject: [U-Boot] [RFC PATCH] USB style patch In-Reply-To: <3efb10970811260315y72417986uf4348dbb3cbd3028@mail.gmail.com> References: <20081126104540.GA28899@gandalf.sssup.it> <3efb10970811260315y72417986uf4348dbb3cbd3028@mail.gmail.com> Message-ID: <492D31AC.2070006@gandalf.sssup.it> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, Remy Bohmer wrote: > Hello Michael, > > Nice work, but I have a few small comments: > > >> + case USB_PROT_HID_MOUSE: >> + printf("Mouse"); >> + break; >> + default: >> + printf("reserved"); >> } >> break; >> > > I check it. > A default case without a break... > > >> + case US_SC_SCSI: >> + printf("Transp. SCSI"); >> break; >> default: >> - printf("%s",usb_get_class_desc(dclass)); >> + printf("reserved"); >> + break; >> > > And a default case with a break... > I see the 'break' keyword is not being used very consequent across all > these files/switch-statements. > > I check >> - printf(" NOTE: this command is obsolete and will be phased out\n"); >> - printf(" please use 'usb storage' for USB storage devices information\n\n"); >> + printf(" NOTE: this command is obsolete and will be" >> + " phased out\n"); >> + printf(" please use 'usb storage' for USB storage devices" >> + " information\n\n"); >> > > I believe it is good to keep line lengths below 80 characters in > general, but code should not become less readable by this. > In case of printf lines, it becomes more difficult to 'grep' for the > strings printed in the terminal to find them back in the code. > So, I am very curious about the point of view Wolfgang about this > rule. (How strict does this rule need to be applied?) > I prefer to break the line but I wait for Walfgang answer. > Kind Regards, > > Remy > > Regards Michael