From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Arnd Bergmann <arnd@arndb.de>,
Michael Thayer <michael.thayer@oracle.com>,
"Knut St . Osmundsen" <knut.osmundsen@oracle.com>,
Larry Finger <Larry.Finger@lwfinger.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] virt: Add vboxguest driver for Virtual Box Guest integration
Date: Tue, 3 Oct 2017 14:40:28 +0200 [thread overview]
Message-ID: <20171003124028.GA4739@kroah.com> (raw)
In-Reply-To: <f462e363-328b-df74-56bb-c8731eae16ea@redhat.com>
On Tue, Oct 03, 2017 at 01:41:46PM +0200, Hans de Goede wrote:
> Hi,
>
> On 03-10-17 12:04, Christoph Hellwig wrote:
> > Looks like you forgot to CC previous revierers.
> >
> > > +#define CHECK_IOCTL_IN(req) \
> > > +do { \
> > > + if ((req)->Hdr.cbIn != (sizeof((req)->Hdr) + sizeof((req)->u.In)) || \
> > > + (req)->Hdr.cbOut != sizeof((req)->Hdr)) \
> > > + return -EINVAL; \
> > > +} while (0)
> >
> > It seems like you ignored the comments on the last version.
> >
> > Get rid of the weird struct capilization.
>
> The only capitalized structs are all from headers under include/uapi,
> I can remove the capitalization without breaking the ABI, but if I
> do that the VirtualBox Guest Additions userspace will no longer be
> able to actually be compiled against the in kernel version of the
> headers which seems undesirable.
>
> Arnd, Greg KH, what is your opinion about this? I would like to
> be able to actually compile the userspace consumer of this API
> against the in kernel headers, I can change the struct names
> (and drop the typedefs) if that is considered something which I
> MUST fix to get this in mainline, but I would rather keep things
> so that the userspace tools can be compiled against the in kernel
> uapi headers.
My opinion is that kernel code, including headers, needs to look like
kernel code. None of this "but this single, tiny, driver is special and
unique and gets to keep its bizarre coding style" stuff. The longevity
of the developer community and codebase precludes that kind of "special
treatment".
And if userspace _really_ likes typedefs, then it's trivial for them to
just have something like a list of:
typedef struct virtual_box_check_ballon VBGLIOCCHECKBALLOON, *PVBGLIOCCHECKBALLOON;
in their .h file that they use after they include these uapi headers.
Remember, our coding style rules are there for a good reason, you want
others to fix, maintain, and understand the code, for a long time. It's
not just there because we like to be mean. It's your brain we care
about :)
So it should be fixed up.
> This patch adds a single driver, so there is no sensible way to split
> it up.
It's 6k lines, split it at least by the file level, can you read this
all in one sitting?
try something like:
- uapi header files
- util functions
- "linux" core
- rest
or something like that. Be considerate of those who have to read this
stuff, you _want_ us to be happy to do so...
As it is, I'm not even going to look at it, it's too big, sorry.
thanks,
greg k-h
next prev parent reply other threads:[~2017-10-03 12:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 9:21 [PATCH 0/1] virt: Add vboxguest driver for Virtual Box Guest integration Hans de Goede
2017-10-03 9:21 ` [PATCH] " Hans de Goede
2017-10-03 10:04 ` Christoph Hellwig
2017-10-03 11:41 ` Hans de Goede
2017-10-03 12:40 ` Greg Kroah-Hartman [this message]
2017-10-04 9:32 ` Hans de Goede
2017-10-04 9:32 ` Hans de Goede
2017-10-04 10:11 ` Greg Kroah-Hartman
2017-10-04 10:23 ` Arnd Bergmann
2017-10-04 10:30 ` Greg Kroah-Hartman
2017-10-04 10:40 ` Hans de Goede
2017-10-04 14:34 ` Greg Kroah-Hartman
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=20171003124028.GA4739@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Larry.Finger@lwfinger.net \
--cc=arnd@arndb.de \
--cc=hch@infradead.org \
--cc=hdegoede@redhat.com \
--cc=knut.osmundsen@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.thayer@oracle.com \
/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