From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Michael Thayer <michael.thayer@oracle.com>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
vbox-dev@virtualbox.org, David Airlie <airlied@linux.ie>,
dri-devel <dri-devel@lists.freedesktop.org>,
Hans de Goede <hdegoede@redhat.com>,
Sean Paul <seanpaul@chromium.org>,
Jani Nikula <jani.nikula@linux.intel.com>,
Daniel Vetter <daniel.vetter@intel.com>,
Dave Airlie <airlied@gmail.com>
Subject: Re: [PATCH v2] staging: vboxvideo: Add vboxvideo to drivers/staging
Date: Tue, 13 Jun 2017 17:41:07 +0200 [thread overview]
Message-ID: <20170613154107.GB23566@kroah.com> (raw)
In-Reply-To: <2c7720c7-a25c-e108-9a23-2615d3ff7202@oracle.com>
On Tue, Jun 13, 2017 at 05:00:15PM +0200, Michael Thayer wrote:
> 13.06.2017 15:59, Greg Kroah-Hartman wrote:
> > On Tue, Jun 13, 2017 at 03:45:14PM +0200, Michael Thayer wrote:
> >> 13.06.2017 14:48, Greg Kroah-Hartman wrote:
> >> [Discussion of vboxvideo coding style.]
> >>> Once your code is accepted into the main kernel tree, why would you
> >>> continue to work in an out-of-tree repo anyway? That's ripe for
> >>> disaster, what's keeping you from just working with the in-tree version?
> >>
> >> One of our use cases is customers running older operating systems,
> >> including legacy Linux distributions. However those customers would
> >> still like the most up-to-date guest drivers possible without updating
> >> the kernel. Updating drivers without updating the kernel is not a
> >> scenario of interest to upstream kernel developers, which is why we will
> >> continue to maintain the out-of-tree repository (which is actually the
> >> VirtualBox repository, where the OS-independent code is shared with
> >> drivers for other platforms). The end result is not unlike what Red Hat
> >> does when it does back-ports to its stable kernels.
> >
> > When Red Hat backports upstream drivers to older kernels, they do not do
> > so in a way that is a different coding style or anything like that.
> > They take the existing code, apply some rules and modifications to it,
> > and complete the backport. Some drivers can be done "automagically"
> > using some good transformation tools that people have developed.
> >
> > In fact, its even easier to do this if the code is upstream. Just keep
> > a local copy of the latest upstream version, with a "linux_backport.h"
> > type file to handle the api changes. Lots of people do that, and I
> > myself did it for many years while working on different driver
> > subsystems that had to ship in older kernels.
> >
> > Here's one example of this type of a file that I helped work on:
> > https://github.com/gregkh/greybus/blob/master/kernel_ver.h
> > that covered 5-6 different driver subsystems having to track all kernel
> > versions from 3.10 to the latest 4.9 release (at that point in time, the
> > code got merged upstream.)
> >
> > Feel free to copy the same idea for your code, if it's applicable, other
> > drivers do this for their "customers" as well.
> >
> > Note, none of this requires "os abstractions" on the upstream code at
> > all, nor does it require a different coding style at all, that would
> > just hinder development and cause massive problems when trying to
> > determine what changed upstream.
>
> The reason we have OS abstraction is that we share code between drivers
> for different platforms. There is always going to be code in a driver -
> mainly the actual programming of the hardware - which needs to work the
> same way on different platforms, but which is not likely to be shared
> with other drivers on the same platform. I personally think that this
> is a sensible thing to do, and a discussion that is worth having, in
> this case how to reap the benefits (for Linux too) of sharing among
> platforms without imposing significant costs on the Linux kernel; but I
> do agree that this driver is too small to be worth having a long
> argument about.
Yes, please look at the size, you have 7k lines total for the whole
thing, how many could you possibly be sharing?
7k is really a trivial number of lines for a driver, well under half of
the size of the 8250 UART driver[1], making your driver 1/2 as complex
and difficult to maintain as a serial port driver :)
It's really not that much code at all you are quibbling over here, it
could have all been converted already to the correct format by either
one of us with all of the time we have spent writing emails back and
forth...
And why is the closed vbox-devel list still on the cc: here, the bounces
from it are getting annoying.
thanks,
greg k-h
[1] My standard unit of measurement, I need a short name for it one of
these days as I use it all the time.
next prev parent reply other threads:[~2017-06-13 15:41 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-12 6:56 [PATCH v2] staging: vboxvideo: Add vboxvideo to drivers/staging Hans de Goede
2017-06-12 7:27 ` Dave Airlie
2017-06-12 10:07 ` Michael Thayer
2017-06-12 12:07 ` Dan Carpenter
2017-06-12 10:07 ` Hans de Goede
2017-06-12 11:44 ` Greg Kroah-Hartman
2017-06-12 11:47 ` Greg Kroah-Hartman
2017-06-12 12:46 ` Michael Thayer
2017-06-12 12:56 ` Greg Kroah-Hartman
2017-06-12 15:40 ` Hans de Goede
2017-06-12 16:03 ` Greg Kroah-Hartman
2017-06-12 16:23 ` Hans de Goede
2017-06-13 11:50 ` Michael Thayer
2017-06-13 12:48 ` Greg Kroah-Hartman
2017-06-13 13:45 ` Michael Thayer
2017-06-13 13:59 ` Greg Kroah-Hartman
2017-06-13 15:00 ` Michael Thayer
2017-06-13 15:41 ` Greg Kroah-Hartman [this message]
2017-06-14 9:07 ` Michael Thayer
2017-06-13 18:03 ` Sean Paul
2017-06-14 9:34 ` Michael Thayer
2017-06-14 13:30 ` Hans de Goede
2017-06-14 13:40 ` Michael Thayer
2017-06-14 15:03 ` Hans de Goede
2017-06-14 14:42 ` Sean Paul
2017-06-14 15:01 ` Michael Thayer
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=20170613154107.GB23566@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=airlied@gmail.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
--cc=jani.nikula@linux.intel.com \
--cc=michael.thayer@oracle.com \
--cc=seanpaul@chromium.org \
--cc=vbox-dev@virtualbox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.