From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752335AbbCXK04 (ORCPT ); Tue, 24 Mar 2015 06:26:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47111 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752096AbbCXK0y (ORCPT ); Tue, 24 Mar 2015 06:26:54 -0400 Message-ID: <1427192810.18768.4.camel@nilsson.home.kraxel.org> Subject: Re: [PATCH v3] Add virtio-input driver. From: Gerd Hoffmann To: virtio-dev@lists.oasis-open.org Cc: virtualization@lists.linux-foundation.org, mst@redhat.com, David Herrmann , Dmitry Torokhov , Rusty Russell , open list , "open list:ABI/API" Date: Tue, 24 Mar 2015 11:26:50 +0100 In-Reply-To: <1427182321-19451-1-git-send-email-kraxel@redhat.com> References: <1427182321-19451-1-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > +static void virtinput_cfg_abs(struct virtio_input *vi, int abs) > +{ > + u32 mi, ma, re, fu, fl; > + > + virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ABS_INFO, abs); > + virtio_cread(vi->vdev, struct virtio_input_config, u.abs.min, &mi); > + virtio_cread(vi->vdev, struct virtio_input_config, u.abs.max, &ma); > + virtio_cread(vi->vdev, struct virtio_input_config, u.abs.res, &re); > + virtio_cread(vi->vdev, struct virtio_input_config, u.abs.fuzz, &fu); > + virtio_cread(vi->vdev, struct virtio_input_config, u.abs.flat, &fl); > + input_set_abs_params(vi->idev, abs, mi, ma, fu, fl); > + input_abs_set_res(vi->idev, abs, re); > +} > +struct virtio_input_absinfo { > + __virtio32 min; > + __virtio32 max; > + __virtio32 fuzz; > + __virtio32 flat; > + __virtio32 res; > +}; Damn, had sparse disabled for the test builds. [ Too bad there are way too many warnings on a full kernel build so having sparse enabled all the time doesn't fly. ] So this doesn't work either. Hmm, back to using "u32" in the virtio config structs? cheers, Gerd From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [PATCH v3] Add virtio-input driver. Date: Tue, 24 Mar 2015 11:26:50 +0100 Message-ID: <1427192810.18768.4.camel@nilsson.home.kraxel.org> References: <1427182321-19451-1-git-send-email-kraxel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1427182321-19451-1-git-send-email-kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: virtio-dev-sDuHXQ4OtrM4h7I2RyI4rWD2FQJk+8+b@public.gmane.org Cc: virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, David Herrmann , Dmitry Torokhov , Rusty Russell , open list , "open list:ABI/API" List-Id: linux-api@vger.kernel.org Hi, > +static void virtinput_cfg_abs(struct virtio_input *vi, int abs) > +{ > + u32 mi, ma, re, fu, fl; > + > + virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ABS_INFO, abs); > + virtio_cread(vi->vdev, struct virtio_input_config, u.abs.min, &mi); > + virtio_cread(vi->vdev, struct virtio_input_config, u.abs.max, &ma); > + virtio_cread(vi->vdev, struct virtio_input_config, u.abs.res, &re); > + virtio_cread(vi->vdev, struct virtio_input_config, u.abs.fuzz, &fu); > + virtio_cread(vi->vdev, struct virtio_input_config, u.abs.flat, &fl); > + input_set_abs_params(vi->idev, abs, mi, ma, fu, fl); > + input_abs_set_res(vi->idev, abs, re); > +} > +struct virtio_input_absinfo { > + __virtio32 min; > + __virtio32 max; > + __virtio32 fuzz; > + __virtio32 flat; > + __virtio32 res; > +}; Damn, had sparse disabled for the test builds. [ Too bad there are way too many warnings on a full kernel build so having sparse enabled all the time doesn't fly. ] So this doesn't work either. Hmm, back to using "u32" in the virtio config structs? cheers, Gerd