All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	vbox-dev@virtualbox.org,
	Michael Thayer <michael.thayer@oracle.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH v2] staging: vboxvideo: Add vboxvideo to drivers/staging
Date: Mon, 12 Jun 2017 18:03:27 +0200	[thread overview]
Message-ID: <20170612160327.GA24926@kroah.com> (raw)
In-Reply-To: <70c82930-e65a-9b3d-ad5c-8ebb8f86b4b2@redhat.com>

On Mon, Jun 12, 2017 at 05:40:21PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 12-06-17 13:44, Greg Kroah-Hartman wrote:
> > On Mon, Jun 12, 2017 at 12:07:41PM +0200, Hans de Goede wrote:
> > > > The most important thing is for the driver to be atomic if it's KMS
> > > > only, and it would be good to have someone review that properly.
> > > 
> > > I believe it does not use the atomic APIs atm, so that would be one
> > > of the first things to fix then. Another question is if people
> > > (you and Daniel at least) can live with the non kernel-coding
> > > style shared files under the osindependent dir ?
> > 
> > Why not just spend a few days and fix up all of the kernel-style issues
> > so it can be a "real" driver?  It shouldn't take all that long,
> > especially for someone with Linux kernel experience (hint, hint...)
> 
> The intention of the stuff below the osindepedent dir is for it to
> be shared 1:1 between vboxvideo driver implementations for different
> operating-systems. IIRC during the AMD DAL discussion Daniel indicated
> that some OS independent code was fine (and would be exempt from coding
> style rules) as long as it had a reasonable clean interface and was not
> re-implementing anything we already have in the kernel.

In a quick glance at the code in there, there's lots of reimplementing
happening :(

Maybe keep the data structures around, but really, you write those once,
and then that's it, they should never change, so it shouldn't matter
what format they are in.

> If Daniel's verdict is that this needs to be cleaned up, then sure I
> can easily do that. As mentioned I already did a lot of cleanup,
> including moving all the other files to the kernel coding-style and
> removing about 43000 lines of portability cruft / abstraction layers,
> what is left under the osindependent directory is just C-structure
> definitions and a few small plain C helper functions, which VirtualBox
> upstream would like to keep as is...

wrappers for simple things should not be needed at all, come on, you
know that.  We don't like driver-specific malloc/free and in/out
functions, or asserts, or other crap like that.  This implies that this
driver is an island in itself and somehow more "important" than the 12+
million other lines of code that it lives within.  Which isn't true.

Just clean it up, that will make it even smaller, which in the end, is
what really matters, as that will make it easier to maintain, fix, port
to new apis, and everything else.

There's a good reason why we don't have "os abstraction" layers in
drivers in Linux, please don't ignore our history and knowledge here for
no good reason.

Remember, this code needs us, we don't need this code at all :)

good luck!

greg k-h
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-06-12 16:03 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 [this message]
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
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=20170612160327.GA24926@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=daniel.vetter@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hdegoede@redhat.com \
    --cc=michael.thayer@oracle.com \
    --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.