staging: vt6656: device.h Remove typedef enum __device_init_type.
Quoted 19 lines · Linux Kernel
Gitweb: http://git.kernel.org/linus/;a=commit;h=302433daf47aeb7d21d66e55fb84d6a8fffd4aed Commit: 302433daf47aeb7d21d66e55fb84d6a8fffd4aed Parent: a72f8beeedc97b776799a1a80c04eb5312980c9b Author: Malcolm Priestley <[email protected]> AuthorDate: Sun Nov 3 17:40:51 2013 +0000 Committer: Greg Kroah-Hartman <[email protected]> CommitDate: Mon Nov 11 16:31:00 2013 -0800staging: vt6656:
device.hRemove typedef enum__device_init_type.Since typedef enum
__device_init_typeis only ever called in one state.Remove the typedef from main_usb.c:device_init_registers and replace with macro values. The other values may be needed later.
Apply cold value to sInitCmd.byInitClass.
Remove if braces and correct formatting within.
...
Quoted 9 lines
(quoted diff) +0
-7/* load power table */ for (ii = 0; ii < 14; ii++) { - pDevice->abyCCKPwrTbl[ii] = pDevice->abyEEPROM[ii + EEP_OFS_CCK_PWR_TBL]; - if (pDevice->abyCCKPwrTbl[ii] == 0) - pDevice->abyCCKPwrTbl[ii] = pDevice->byCCKPwr; - pDevice->abyOFDMPwrTbl[ii] = pDevice->abyEEPROM[ii + EEP_OFS_OFDM_PWR_TBL]; - if (pDevice->abyOFDMPwrTbl[ii] == 0) - pDevice->abyOFDMPwrTbl[ii] = pDevice->byOFDMPwrG; - }
Review
Quoted 10 lines
(quoted diff) +10
-0+ pDevice->abyCCKPwrTbl[ii] = + pDevice->abyEEPROM[ii + EEP_OFS_CCK_PWR_TBL]; + + if (pDevice->abyCCKPwrTbl[ii] == 0) + pDevice->abyCCKPwrTbl[ii] = pDevice->byCCKPwr; + pDevice->abyOFDMPwrTbl[ii] = + pDevice->abyEEPROM[ii + EEP_OFS_OFDM_PWR_TBL]; + if (pDevice->abyOFDMPwrTbl[ii] == 0) + pDevice->abyOFDMPwrTbl[ii] = pDevice->byOFDMPwrG; + }
Wrong indentation of the pDevice->abyOFDMPwrTbl[ii] assignment. Wrapping this to 80 columns has actually made this less readable imo.
Dave
Quoted 37 lines · Dave Jones
Quoted 19 lines · Linux Kernel
Gitweb: http://git.kernel.org/linus/;a=commit;h=302433daf47aeb7d21d66e55fb84d6a8fffd4aed Commit: 302433daf47aeb7d21d66e55fb84d6a8fffd4aed Parent: a72f8beeedc97b776799a1a80c04eb5312980c9b Author: Malcolm Priestley <[email protected]> AuthorDate: Sun Nov 3 17:40:51 2013 +0000 Committer: Greg Kroah-Hartman <[email protected]> CommitDate: Mon Nov 11 16:31:00 2013 -0800staging: vt6656:
device.hRemove typedef enum__device_init_type.Since typedef enum
__device_init_typeis only ever called in one state.Remove the typedef from main_usb.c:device_init_registers and replace with macro values. The other values may be needed later.
Apply cold value to sInitCmd.byInitClass.
Remove if braces and correct formatting within.
...
Quoted 14 lines
(quoted diff) +5
-7/* load power table */ for (ii = 0; ii < 14; ii++) { - pDevice->abyCCKPwrTbl[ii] = pDevice->abyEEPROM[ii + EEP_OFS_CCK_PWR_TBL]; - if (pDevice->abyCCKPwrTbl[ii] == 0) - pDevice->abyCCKPwrTbl[ii] = pDevice->byCCKPwr; - pDevice->abyOFDMPwrTbl[ii] = pDevice->abyEEPROM[ii + EEP_OFS_OFDM_PWR_TBL]; - if (pDevice->abyOFDMPwrTbl[ii] == 0) - pDevice->abyOFDMPwrTbl[ii] = pDevice->byOFDMPwrG; - } + pDevice->abyCCKPwrTbl[ii] = + pDevice->abyEEPROM[ii + EEP_OFS_CCK_PWR_TBL]; + + if (pDevice->abyCCKPwrTbl[ii] == 0) + pDevice->abyCCKPwrTbl[ii] = pDevice->byCCKPwr;
Quoted 8 lines
Review
Quoted 5 lines
(quoted diff) +5
-0+ pDevice->abyOFDMPwrTbl[ii] = + pDevice->abyEEPROM[ii + EEP_OFS_OFDM_PWR_TBL]; + if (pDevice->abyOFDMPwrTbl[ii] == 0) + pDevice->abyOFDMPwrTbl[ii] = pDevice->byOFDMPwrG; + }Wrong indentation of the pDevice->abyOFDMPwrTbl[ii] assignment. Wrapping this to 80 columns has actually made this less readable imo.
Good catch, I'll fix that up after 3.14-rc1 is out, thanks for finding it.
greg k-h
Quoted 44 lines · Greg KH
Quoted 43 lines · Dave Jones
Quoted 19 lines · Linux Kernel
Gitweb: http://git.kernel.org/linus/;a=commit;h=302433daf47aeb7d21d66e55fb84d6a8fffd4aed Commit: 302433daf47aeb7d21d66e55fb84d6a8fffd4aed Parent: a72f8beeedc97b776799a1a80c04eb5312980c9b Author: Malcolm Priestley <[email protected]> AuthorDate: Sun Nov 3 17:40:51 2013 +0000 Committer: Greg Kroah-Hartman <[email protected]> CommitDate: Mon Nov 11 16:31:00 2013 -0800staging: vt6656:
device.hRemove typedef enum__device_init_type.Since typedef enum
__device_init_typeis only ever called in one state.Remove the typedef from main_usb.c:device_init_registers and replace with macro values. The other values may be needed later.
Apply cold value to sInitCmd.byInitClass.
Remove if braces and correct formatting within.
...
Quoted 19 lines
(quoted diff) +10
-7/* load power table */ for (ii = 0; ii < 14; ii++) { - pDevice->abyCCKPwrTbl[ii] = pDevice->abyEEPROM[ii + EEP_OFS_CCK_PWR_TBL]; - if (pDevice->abyCCKPwrTbl[ii] == 0) - pDevice->abyCCKPwrTbl[ii] = pDevice->byCCKPwr; - pDevice->abyOFDMPwrTbl[ii] = pDevice->abyEEPROM[ii + EEP_OFS_OFDM_PWR_TBL]; - if (pDevice->abyOFDMPwrTbl[ii] == 0) - pDevice->abyOFDMPwrTbl[ii] = pDevice->byOFDMPwrG; - } + pDevice->abyCCKPwrTbl[ii] = + pDevice->abyEEPROM[ii + EEP_OFS_CCK_PWR_TBL]; + + if (pDevice->abyCCKPwrTbl[ii] == 0) + pDevice->abyCCKPwrTbl[ii] = pDevice->byCCKPwr; + pDevice->abyOFDMPwrTbl[ii] = + pDevice->abyEEPROM[ii + EEP_OFS_OFDM_PWR_TBL]; + if (pDevice->abyOFDMPwrTbl[ii] == 0) + pDevice->abyOFDMPwrTbl[ii] = pDevice->byOFDMPwrG; + }
Quoted 5 lines
Quoted 2 lines
Wrong indentation of the pDevice->abyOFDMPwrTbl[ii] assignment. Wrapping this to 80 columns has actually made this less readable imo.
Good catch, I'll fix that up after 3.14-rc1 is out, thanks for finding it.
It'd also be nice to eventually do away with the
semi-Hungarian notation aby, p, by, etc prefixes
and camelcase naming.
Quoted 45 lines · Joe Perches
Quoted 44 lines · Greg KH
Quoted 43 lines · Dave Jones
Quoted 19 lines · Linux Kernel
Gitweb: http://git.kernel.org/linus/;a=commit;h=302433daf47aeb7d21d66e55fb84d6a8fffd4aed Commit: 302433daf47aeb7d21d66e55fb84d6a8fffd4aed Parent: a72f8beeedc97b776799a1a80c04eb5312980c9b Author: Malcolm Priestley <[email protected]> AuthorDate: Sun Nov 3 17:40:51 2013 +0000 Committer: Greg Kroah-Hartman <[email protected]> CommitDate: Mon Nov 11 16:31:00 2013 -0800staging: vt6656:
device.hRemove typedef enum__device_init_type.Since typedef enum
__device_init_typeis only ever called in one state.Remove the typedef from main_usb.c:device_init_registers and replace with macro values. The other values may be needed later.
Apply cold value to sInitCmd.byInitClass.
Remove if braces and correct formatting within.
...
Quoted 19 lines
(quoted diff) +10
-7/* load power table */ for (ii = 0; ii < 14; ii++) { - pDevice->abyCCKPwrTbl[ii] = pDevice->abyEEPROM[ii + EEP_OFS_CCK_PWR_TBL]; - if (pDevice->abyCCKPwrTbl[ii] == 0) - pDevice->abyCCKPwrTbl[ii] = pDevice->byCCKPwr; - pDevice->abyOFDMPwrTbl[ii] = pDevice->abyEEPROM[ii + EEP_OFS_OFDM_PWR_TBL]; - if (pDevice->abyOFDMPwrTbl[ii] == 0) - pDevice->abyOFDMPwrTbl[ii] = pDevice->byOFDMPwrG; - } + pDevice->abyCCKPwrTbl[ii] = + pDevice->abyEEPROM[ii + EEP_OFS_CCK_PWR_TBL]; + + if (pDevice->abyCCKPwrTbl[ii] == 0) + pDevice->abyCCKPwrTbl[ii] = pDevice->byCCKPwr; + pDevice->abyOFDMPwrTbl[ii] = + pDevice->abyEEPROM[ii + EEP_OFS_OFDM_PWR_TBL]; + if (pDevice->abyOFDMPwrTbl[ii] == 0) + pDevice->abyOFDMPwrTbl[ii] = pDevice->byOFDMPwrG; + }
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Wrong indentation of the pDevice->abyOFDMPwrTbl[ii] assignment. Wrapping this to 80 columns has actually made this less readable imo.
Thanks Dave
Quoted 8 lines
Quoted 3 lines
Good catch, I'll fix that up after 3.14-rc1 is out, thanks for finding it.
It'd also be nice to eventually do away with the
semi-Hungarian notation aby, p, by, etc prefixes
and camelcase naming.
I am slowly working through it by function.
There is still a lot of dead code.