lkml.org 
[lkml]   [2020]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] staging: rtl8192u: Merge almost duplicate code
On Sun, 17 May 2020 at 17:58, Pascal Terjan <pterjan@google.com> wrote:
>
> This causes a change in behaviour:
> - stats also get updated when reordering, this seems like it should be
> the case but those lines were commented out.
> - sub_skb NULL check now happens early in both cases, previously it
> happened only after dereferencing it 12 times, so it may not actually
> be needed.
>

Hi,
I actually noticed the same duplicated code (and same late NULL check)
in drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8712/rtl8712_recv.c has only one copy of the code
but with the late NULL check
drivers/staging/rtl8188eu/core/rtw_recv.c has only one copy of the
code and doesn't do any NULL check

Now I wonder how to proceed. The code is not great so it would not
feel right to make it reusable.
Should I continue improving it on this driver only first (maybe trying
to reuse ieee80211_data_to_8023_exthdr from net/wireless/util.c for
example)?

\
 
 \ /
  Last update: 2020-05-17 22:26    [W:0.084 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site