Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#10110 - USB stack code cosmetics

Attached to Project: Rockbox
Opened by Tomer Shalev (tomers) - Thursday, 09 April 2009, 02:43 GMT+2
Last edited by Frank Gevaerts (fg) - Saturday, 23 May 2009, 17:10 GMT+2
Task Type Patches
Category Drivers
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Version 3.2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This patch contaings the following code cosmetics changes (no functional changes)

- Remove white spaces at the end of lines
- Remove redundant empty lines
- Put curly braces in separate lines
- Put space after if/for/while keywords
- Space binary operands (+ - << >> |=) from both sides
- Enforce 80 characters per line

This patch is a preliminary work on the USB stack.
It is part of a GSoC suggested project, which I started working on lately.
   usbstack_cosmetics.diff (124 KiB)
 firmware/usbstack/usb_core.c          |  524 ++++++++++---------
 firmware/usbstack/usb_charging_only.c |   16 
 firmware/usbstack/usb_serial.c        |  100 +--
 firmware/usbstack/usb_storage.c       |  907 ++++++++++++++++++----------------
 firmware/export/usb_core.h            |    4 
 firmware/export/usb.h                 |   16 
 firmware/usbstack/usb_class_driver.h  |   19 
 apps/debug_menu.c                     |   31 -
 firmware/target/arm/usb-drv-arc.c     |  302 ++++++-----
 9 files changed, 1036 insertions(+), 883 deletions(-)

This task depends upon

Closed by  Frank Gevaerts (fg)
Saturday, 23 May 2009, 17:10 GMT+2
Reason for closing:  Rejected
Comment by Dominik Riebeling (bluebrother) - Friday, 10 April 2009, 10:44 GMT+2
I somewhat dislike this patch given the line in docs/CONTRIBUTING:

When changing code, follow the code style of the file you are editing.

As far as I can see from briefly skimming the touched files the bracing and spacing was consistend before, thus I disagree that it should be changed. I however do agree that removing trailing whitespace is a good thing, but that's the only item of the list of changes. As this patch changes code style it should get rejected IMO.

Loading...