driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
From: Pascal Terjan <pterjan@google.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8192u: Merge almost duplicate code
Date: Sun, 17 May 2020 21:25:05 +0100	[thread overview]
Message-ID: <CAANdO=Li7FUbVQk6m+CksZBv1zy-F+-1tN9oYZ4niYJ0utRfXA@mail.gmail.com> (raw)
In-Reply-To: <20200517165819.136715-1-pterjan@google.com>

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)?
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2020-05-17 20:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-17 16:58 [PATCH] staging: rtl8192u: Merge almost duplicate code Pascal Terjan
2020-05-17 20:22 ` kbuild test robot
2020-05-17 20:40   ` [PATCH v2] " Pascal Terjan
2020-05-19 14:16     ` Greg Kroah-Hartman
2020-05-19 15:00       ` [PATCH v3] " Pascal Terjan
2020-05-17 20:22 ` [RFC PATCH] staging: rtl8192u: indicate_packets() can be static kbuild test robot
2020-05-17 20:49   ` Joe Perches
2020-05-18 12:16     ` Dan Carpenter
2020-05-17 20:25 ` Pascal Terjan [this message]
2020-05-18 13:25   ` [PATCH] staging: rtl8192u: Merge almost duplicate code Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAANdO=Li7FUbVQk6m+CksZBv1zy-F+-1tN9oYZ4niYJ0utRfXA@mail.gmail.com' \
    --to=pterjan@google.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).