linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Albert Zhou <albert.zhou.50@gmail.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] Update R8152 module to v2 obtained from the Realtek website, included in a comment in r8152.c. The only other modification to r8152.c is amending netif_napi_add, see comment for explanation.
Date: Sat, 5 Nov 2022 11:28:35 +0100	[thread overview]
Message-ID: <Y2Y606QMyZRErKA4@kroah.com> (raw)
In-Reply-To: <98df4ca9-082c-ca31-a72a-5fbd62f26d9a@gmail.com>

On Sat, Nov 05, 2022 at 08:46:25PM +1100, Albert Zhou wrote:
> Hi Greg,

Hi!

Some meta-comments, please don't top-post and try line-wrapping your
emails at 72 columns to make it easier to respond properly.  See the
mailing list archives for examples.

> I realised several things. Firstly, when I initially contacted you, it was simply based on looking up who maintained drivers/net/usb in the MAINTAINERS file, however when running scripts/get_maintainer.pl, I realise that there are many other people who maintain drivers/net/usb/r8152.c. Should I include them in future submissions? Or should I just stick to you for now?

Yes, include everyone that get_maintainer.pl tells you to, that's what
it is there for.

> Secondly, running scripts/checkpatch.pl on Realtek's code gives many warnings and errors. E.g. the code is written to be compatible
> for old versions of the kernel, whereas checkpatch.pl insists that each kernel version should have dedicated code for itself.

And that's not needed for in-kernel drivers at all, which is why it is
complaining.  You should remove all of that compatibility cruft as it
just clutters up the code and is not needed for obvious reasons.

> I am hesitant to edit the original code more than I already have, but if necessary, I can make another patch when I resubmit to iron out all the trivial style issues. However I may need some guidance, e.g. on the use of the volatile keyword; since I am not the original developer, it will be difficult for met to judge whether its usage is critical for the code.

Look at how it is being used and see if it is required.  For a USB
driver, volitile should never be used as it makes no sense at all,
right?

> Thirdly, if I do remove all of the macros for backwards compatibility, (# if LINUX_VERSION_CODE >= KERNEL_VERSION(a,b,c)), it will be difficult for distros like Ubuntu to incorporate the updated module into their older kernels.  How can the version-two module also be included in the other stable/longerm kernels?

We do kernel development for the latest release only.  If distros want
to backport things, that's up to them to do on their own.  For
stable/long term kernels, see the stable documentation for what is a
valid acceptable change (hint, bug fixes and quirks and device ids only,
not new features or new drivers.)

So all of that code for old kernels needs to be removed.  Do that and
you will end up with a much smaller and actually maintable codebase, so
that's a good thing to do.

hope this helps,

greg k-h

      reply	other threads:[~2022-11-05 10:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04 13:25 [PATCH net-next 0/2] Update R8152 module to version 2 Albert Zhou
2022-11-04 13:25 ` [PATCH net-next 1/2] Reverse 744d49daf8bd3b17b345c836f2e6f97d49fa6ae8 so that the v2 r8152 driver can use netif_set_gso_max_* Albert Zhou
2022-11-04 14:39   ` Greg KH
     [not found] ` <20221104132526.64530-3-albert.zhou.50@gmail.com>
2022-11-04 14:40   ` [PATCH net-next 2/2] Update R8152 module to v2 obtained from the Realtek website, included in a comment in r8152.c. The only other modification to r8152.c is amending netif_napi_add, see comment for explanation Greg KH
2022-11-05  9:46     ` Albert Zhou
2022-11-05 10:28       ` Greg KH [this message]

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=Y2Y606QMyZRErKA4@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=albert.zhou.50@gmail.com \
    --cc=linux-usb@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).