lkml.org 
[lkml]   [2014]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 net-next] r8169:add support for RTL8168EP
Hau <hau@realtek.com> :
[...]
> Do you mean I should collect similar hardware parameters setting into one
> function ? or I should set hardware parameters according to hardware
> feature support version?

static void r8168dp_ocp_write(...)
[...]

static void r8168ep_ocp_write(...)
[...]

static void ocp_write(...)
{
switch (...
case ...
r8168dp_ocp_write

case ...
r8168ep_ocp_write
[...]

static void rtl8168dp_driver_start(...)
[...]

static void rtl8168ep_driver_start(...)
[...]

etc.

Nothing more. At some point the helpers themselves may turn into data
struct members. Things don't need to be immediately right - if ever.
However you really want to avoid unrelated changes in your patches:
shuffling code and changing features at the same time hurts reviews,
late regression hunts, backports, etc.

--
Ueimor


\
 
 \ /
  Last update: 2014-10-07 00:41    [W:0.043 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site