Is it ok to propose more complex code changes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

I just found a piece of code that I think can be improved somewhat (in
drivers/staging/vt6655/channel.c)

switch (priv->byRFType) {
case RF_AIROHA7230:
case RF_UW2452:
case RF_NOTHING:
default:
       ch = vnt_channels_5ghz;

       for (i = 0; i < ARRAY_SIZE(vnt_channels_5ghz); i++) {
               ch[i].max_power = 0x3f;
               ch[i].flags = IEEE80211_CHAN_NO_HT40;
       }

       priv->hw->wiphy->bands[NL80211_BAND_5GHZ] =
                                       &vnt_supported_5ghz_band;
       fallthrough;
case RF_RFMD2959:
case RF_AIROHA:
case RF_AL2230S:
case RF_UW2451:
case RF_VT3226:
       ch = vnt_channels_2ghz;

       for (i = 0; i < ARRAY_SIZE(vnt_channels_2ghz); i++) {
               ch[i].max_power = 0x3f;
               ch[i].flags = IEEE80211_CHAN_NO_HT40;
       }

       priv->hw->wiphy->bands[NL80211_BAND_2GHZ] =
                                       &vnt_supported_2ghz_band;
       break;
}

There are two sections of code that could be turned into a function or
macro so that duplication can be avoided. Is it within our "Scope of
Work" as janitors to make this kind of proposal or it's better if we
avoid it and start easy at first?

Thanks!



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux