[haiku-gsoc] Re: [GSoC PATCH 1/2]xhci controller start operation

  • From: Jérôme Duval <jerome.duval@xxxxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Tue, 14 Jun 2011 00:14:31 +0200

Hi Jian,

2011/6/12 Jian Chiang <j.jian.chiang@xxxxxxxxx>:
> This patch add runtime registers operation and do the xHC start exclude
> cmd ring and event ring initialization.

Patch is OK except:
* typo:
    - "ontroller does not support 4K page size." (missing C)
    - "Invalid number of ports: %u\n." (dot after newline)
* style:
    - declare variable on first use, not at the beginning of the method
    - prefer if (x == 0) instead of if (!x) on the following line:
        if (!(ReadOpReg(XHCI_PAGESIZE) & (1 << 1))) {
    - prefer variable names which mean something: i is usually
reserved for loop.

Let me know when you have a corrected patch. Thanks!

Bye,
Jérôme

Other related posts: