* Re: staging: vt6656: device.h Remove typedef enum __device_init_type.
[not found] <20140121002130.38BFD660F3F@gitolite.kernel.org>
@ 2014-01-21 15:16 ` Dave Jones
2014-01-22 1:57 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Dave Jones @ 2014-01-21 15:16 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: tvboxspy, gregkh
On Tue, Jan 21, 2014 at 12:21:30AM +0000, Linux Kernel wrote:
> Gitweb: http://git.kernel.org/linus/;a=commit;h=302433daf47aeb7d21d66e55fb84d6a8fffd4aed
> Commit: 302433daf47aeb7d21d66e55fb84d6a8fffd4aed
> Parent: a72f8beeedc97b776799a1a80c04eb5312980c9b
> Author: Malcolm Priestley <tvboxspy@gmail.com>
> AuthorDate: Sun Nov 3 17:40:51 2013 +0000
> Committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> CommitDate: Mon Nov 11 16:31:00 2013 -0800
>
> staging: vt6656: device.h Remove typedef enum __device_init_type.
>
> Since typedef enum __device_init_type is 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.
...
> /* 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;
> + }
Wrong indentation of the pDevice->abyOFDMPwrTbl[ii] assignment.
Wrapping this to 80 columns has actually made this less readable imo.
Dave
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: staging: vt6656: device.h Remove typedef enum __device_init_type.
2014-01-21 15:16 ` staging: vt6656: device.h Remove typedef enum __device_init_type Dave Jones
@ 2014-01-22 1:57 ` Greg KH
2014-01-22 2:01 ` Joe Perches
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2014-01-22 1:57 UTC (permalink / raw)
To: Dave Jones, Linux Kernel Mailing List, tvboxspy
On Tue, Jan 21, 2014 at 10:16:43AM -0500, Dave Jones wrote:
> On Tue, Jan 21, 2014 at 12:21:30AM +0000, Linux Kernel wrote:
> > Gitweb: http://git.kernel.org/linus/;a=commit;h=302433daf47aeb7d21d66e55fb84d6a8fffd4aed
> > Commit: 302433daf47aeb7d21d66e55fb84d6a8fffd4aed
> > Parent: a72f8beeedc97b776799a1a80c04eb5312980c9b
> > Author: Malcolm Priestley <tvboxspy@gmail.com>
> > AuthorDate: Sun Nov 3 17:40:51 2013 +0000
> > Committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > CommitDate: Mon Nov 11 16:31:00 2013 -0800
> >
> > staging: vt6656: device.h Remove typedef enum __device_init_type.
> >
> > Since typedef enum __device_init_type is 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.
>
> ...
>
> > /* 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;
> > + }
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: staging: vt6656: device.h Remove typedef enum __device_init_type.
2014-01-22 1:57 ` Greg KH
@ 2014-01-22 2:01 ` Joe Perches
2014-01-22 19:15 ` Malcolm Priestley
0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2014-01-22 2:01 UTC (permalink / raw)
To: Greg KH; +Cc: Dave Jones, Linux Kernel Mailing List, tvboxspy
On Tue, 2014-01-21 at 17:57 -0800, Greg KH wrote:
> On Tue, Jan 21, 2014 at 10:16:43AM -0500, Dave Jones wrote:
> > On Tue, Jan 21, 2014 at 12:21:30AM +0000, Linux Kernel wrote:
> > > Gitweb: http://git.kernel.org/linus/;a=commit;h=302433daf47aeb7d21d66e55fb84d6a8fffd4aed
> > > Commit: 302433daf47aeb7d21d66e55fb84d6a8fffd4aed
> > > Parent: a72f8beeedc97b776799a1a80c04eb5312980c9b
> > > Author: Malcolm Priestley <tvboxspy@gmail.com>
> > > AuthorDate: Sun Nov 3 17:40:51 2013 +0000
> > > Committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > CommitDate: Mon Nov 11 16:31:00 2013 -0800
> > >
> > > staging: vt6656: device.h Remove typedef enum __device_init_type.
> > >
> > > Since typedef enum __device_init_type is 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.
> >
> > ...
> >
> > > /* 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;
> > > + }
> >
> > 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: staging: vt6656: device.h Remove typedef enum __device_init_type.
2014-01-22 2:01 ` Joe Perches
@ 2014-01-22 19:15 ` Malcolm Priestley
0 siblings, 0 replies; 4+ messages in thread
From: Malcolm Priestley @ 2014-01-22 19:15 UTC (permalink / raw)
To: Joe Perches; +Cc: Greg KH, Dave Jones, Linux Kernel Mailing List
On Tue, 2014-01-21 at 18:01 -0800, Joe Perches wrote:
> On Tue, 2014-01-21 at 17:57 -0800, Greg KH wrote:
> > On Tue, Jan 21, 2014 at 10:16:43AM -0500, Dave Jones wrote:
> > > On Tue, Jan 21, 2014 at 12:21:30AM +0000, Linux Kernel wrote:
> > > > Gitweb: http://git.kernel.org/linus/;a=commit;h=302433daf47aeb7d21d66e55fb84d6a8fffd4aed
> > > > Commit: 302433daf47aeb7d21d66e55fb84d6a8fffd4aed
> > > > Parent: a72f8beeedc97b776799a1a80c04eb5312980c9b
> > > > Author: Malcolm Priestley <tvboxspy@gmail.com>
> > > > AuthorDate: Sun Nov 3 17:40:51 2013 +0000
> > > > Committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > CommitDate: Mon Nov 11 16:31:00 2013 -0800
> > > >
> > > > staging: vt6656: device.h Remove typedef enum __device_init_type.
> > > >
> > > > Since typedef enum __device_init_type is 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.
> > >
> > > ...
> > >
> > > > /* 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;
> > > > + }
> > >
> > > Wrong indentation of the pDevice->abyOFDMPwrTbl[ii] assignment.
> > > Wrapping this to 80 columns has actually made this less readable imo.
Thanks Dave
> >
> > 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-22 19:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20140121002130.38BFD660F3F@gitolite.kernel.org>
2014-01-21 15:16 ` staging: vt6656: device.h Remove typedef enum __device_init_type Dave Jones
2014-01-22 1:57 ` Greg KH
2014-01-22 2:01 ` Joe Perches
2014-01-22 19:15 ` Malcolm Priestley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox