[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1427118292.27137.39.camel@nilsson.home.kraxel.org>
Date: Mon, 23 Mar 2015 14:44:52 +0100
From: Gerd Hoffmann <kraxel@...hat.com>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: virtio-dev@...ts.oasis-open.org,
virtualization@...ts.linux-foundation.org,
Rusty Russell <rusty@...tcorp.com.au>,
open list <linux-kernel@...r.kernel.org>,
"open list:ABI/API" <linux-api@...r.kernel.org>
Subject: Re: [PATCH 1/1] Add virtio-input driver.
Hi,
> > At least, this needs a comment explaining what the function does,
> > and maybe wrap it in a helper like virtio_input_bitmap_copy or
> > virtio_bitmap_or.
>
> Can do that, sure.
Well, the function where this is in already cares about the bitmap copy
only. Can add a comment though.
> > You are doing leXXX everywhere, that's VERSION_1 dependency.
> > virtio_cread will do byteswaps differently without VERSION_1.
> > Just don't go there.
>
> Changed that for v2, for the config space structs. They have normal u32
> in there now. virtio_cread() wants it this way.
I liked the __le32 in the config space structs more though, so I've
waded through the virtio_config.h header file.
To me it looks like we need separate virtio_cread() versions for
non-transitional drivers, which do __le32 -> u32 translation instead of
__virtio32 -> u32 translation, so I can have __le32 types in the config
space structs.
Or I could use vdev->config->get() directly instead of virtio_cread, but
I'll loose sparse checking that way.
Hmm. Recommendations? Better ideas?
cheers,
Gerd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists