search for: virtio_bits

Displaying 18 results from an estimated 18 matches for "virtio_bits".

2015 Mar 24
2
[PATCH v3] Add virtio-input driver.
...p;size); > > + return size; > > +} > > + > > +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, > > + unsigned long *bits, unsigned int bitcount) > > +{ > > + unsigned int bit; > > + size_t bytes; > > + u8 *virtio_bits; > > + > > + bytes = virtinput_cfg_select(vi, select, subsel); > > + if (!bytes) > > + return; > > How about limiting bytes to sizeof struct virtio_input_config->u? > > > + if (bitcount > bytes*8) > > + bitcount = bytes*8; > > Space arou...
2015 Mar 24
2
[PATCH v3] Add virtio-input driver.
...p;size); > > + return size; > > +} > > + > > +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, > > + unsigned long *bits, unsigned int bitcount) > > +{ > > + unsigned int bit; > > + size_t bytes; > > + u8 *virtio_bits; > > + > > + bytes = virtinput_cfg_select(vi, select, subsel); > > + if (!bytes) > > + return; > > How about limiting bytes to sizeof struct virtio_input_config->u? > > > + if (bitcount > bytes*8) > > + bitcount = bytes*8; > > Space arou...
2015 Mar 24
6
[PATCH v3] Add virtio-input driver.
...g, subsel, &subsel); + virtio_cread(vi->vdev, struct virtio_input_config, size, &size); + return size; +} + +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, + unsigned long *bits, unsigned int bitcount) +{ + unsigned int bit; + size_t bytes; + u8 *virtio_bits; + + bytes = virtinput_cfg_select(vi, select, subsel); + if (!bytes) + return; + if (bitcount > bytes*8) + bitcount = bytes*8; + + /* + * Bitmap in virtio config space is a simple stream of bytes, + * with the first byte carrying bits 0-7, second bits 8-15 and + * so on. + */ + virtio_bits...
2015 Mar 24
6
[PATCH v3] Add virtio-input driver.
...g, subsel, &subsel); + virtio_cread(vi->vdev, struct virtio_input_config, size, &size); + return size; +} + +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, + unsigned long *bits, unsigned int bitcount) +{ + unsigned int bit; + size_t bytes; + u8 *virtio_bits; + + bytes = virtinput_cfg_select(vi, select, subsel); + if (!bytes) + return; + if (bitcount > bytes*8) + bitcount = bytes*8; + + /* + * Bitmap in virtio config space is a simple stream of bytes, + * with the first byte carrying bits 0-7, second bits 8-15 and + * so on. + */ + virtio_bits...
2015 Mar 24
3
[PATCH v4] Add virtio-input driver.
...g, subsel, &subsel); + virtio_cread(vi->vdev, struct virtio_input_config, size, &size); + return size; +} + +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, + unsigned long *bits, unsigned int bitcount) +{ + unsigned int bit; + size_t bytes; + u8 *virtio_bits; + + bytes = virtinput_cfg_select(vi, select, subsel); + if (!bytes) + return; + if (bitcount > bytes * 8) + bitcount = bytes * 8; + + /* + * Bitmap in virtio config space is a simple stream of bytes, + * with the first byte carrying bits 0-7, second bits 8-15 and + * so on. + */ + virtio_...
2015 Mar 24
3
[PATCH v4] Add virtio-input driver.
...g, subsel, &subsel); + virtio_cread(vi->vdev, struct virtio_input_config, size, &size); + return size; +} + +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, + unsigned long *bits, unsigned int bitcount) +{ + unsigned int bit; + size_t bytes; + u8 *virtio_bits; + + bytes = virtinput_cfg_select(vi, select, subsel); + if (!bytes) + return; + if (bitcount > bytes * 8) + bitcount = bytes * 8; + + /* + * Bitmap in virtio config space is a simple stream of bytes, + * with the first byte carrying bits 0-7, second bits 8-15 and + * so on. + */ + virtio_...
2015 Mar 24
1
[PATCH v3] Add virtio-input driver.
...gt; > > > +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, > > > > + unsigned long *bits, unsigned int bitcount) > > > > +{ > > > > + unsigned int bit; > > > > + size_t bytes; > > > > + u8 *virtio_bits; > > > > + > > > > + bytes = virtinput_cfg_select(vi, select, subsel); > > > > + if (!bytes) > > > > + return; > > > > > > How about limiting bytes to sizeof struct virtio_input_config->u? > > > > > > > + i...
2015 Mar 24
1
[PATCH v3] Add virtio-input driver.
...gt; > > > +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, > > > > + unsigned long *bits, unsigned int bitcount) > > > > +{ > > > > + unsigned int bit; > > > > + size_t bytes; > > > > + u8 *virtio_bits; > > > > + > > > > + bytes = virtinput_cfg_select(vi, select, subsel); > > > > + if (!bytes) > > > > + return; > > > > > > How about limiting bytes to sizeof struct virtio_input_config->u? > > > > > > > + i...
2015 Mar 24
0
[PATCH v3] Add virtio-input driver.
...t;vdev, struct virtio_input_config, size, &size); > + return size; > +} > + > +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, > + unsigned long *bits, unsigned int bitcount) > +{ > + unsigned int bit; > + size_t bytes; > + u8 *virtio_bits; > + > + bytes = virtinput_cfg_select(vi, select, subsel); > + if (!bytes) > + return; How about limiting bytes to sizeof struct virtio_input_config->u? > + if (bitcount > bytes*8) > + bitcount = bytes*8; Space around * pls. > + > + /* > + * Bitmap in virtio...
2015 Mar 24
0
[PATCH v3] Add virtio-input driver.
...t;vdev, struct virtio_input_config, size, &size); > + return size; > +} > + > +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, > + unsigned long *bits, unsigned int bitcount) > +{ > + unsigned int bit; > + size_t bytes; > + u8 *virtio_bits; > + > + bytes = virtinput_cfg_select(vi, select, subsel); > + if (!bytes) > + return; How about limiting bytes to sizeof struct virtio_input_config->u? > + if (bitcount > bytes*8) > + bitcount = bytes*8; Space around * pls. > + > + /* > + * Bitmap in virtio...
2015 Mar 24
0
[PATCH v3] Add virtio-input driver.
...gt; > +} > > > + > > > +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, > > > + unsigned long *bits, unsigned int bitcount) > > > +{ > > > + unsigned int bit; > > > + size_t bytes; > > > + u8 *virtio_bits; > > > + > > > + bytes = virtinput_cfg_select(vi, select, subsel); > > > + if (!bytes) > > > + return; > > > > How about limiting bytes to sizeof struct virtio_input_config->u? > > > > > + if (bitcount > bytes*8) > > >...
2015 Mar 24
0
[PATCH v3] Add virtio-input driver.
...gt; > +} > > > + > > > +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, > > > + unsigned long *bits, unsigned int bitcount) > > > +{ > > > + unsigned int bit; > > > + size_t bytes; > > > + u8 *virtio_bits; > > > + > > > + bytes = virtinput_cfg_select(vi, select, subsel); > > > + if (!bytes) > > > + return; > > > > How about limiting bytes to sizeof struct virtio_input_config->u? > > > > > + if (bitcount > bytes*8) > > >...
2015 Mar 26
3
[PATCH v5] Add virtio-input driver.
...rtio_input_config, subsel, &subsel); + virtio_cread(vi->vdev, struct virtio_input_config, size, &size); + return size; +} + +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, + unsigned long *bits, unsigned int bitcount) +{ + unsigned int bit; + u8 *virtio_bits; + u8 bytes; + + bytes = virtinput_cfg_select(vi, select, subsel); + if (!bytes) + return; + if (bitcount > bytes * 8) + bitcount = bytes * 8; + + /* + * Bitmap in virtio config space is a simple stream of bytes, + * with the first byte carrying bits 0-7, second bits 8-15 and + * so on. +...
2015 Mar 26
3
[PATCH v5] Add virtio-input driver.
...rtio_input_config, subsel, &subsel); + virtio_cread(vi->vdev, struct virtio_input_config, size, &size); + return size; +} + +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, + unsigned long *bits, unsigned int bitcount) +{ + unsigned int bit; + u8 *virtio_bits; + u8 bytes; + + bytes = virtinput_cfg_select(vi, select, subsel); + if (!bytes) + return; + if (bitcount > bytes * 8) + bitcount = bytes * 8; + + /* + * Bitmap in virtio config space is a simple stream of bytes, + * with the first byte carrying bits 0-7, second bits 8-15 and + * so on. +...
2015 Mar 24
2
[virtio-dev] Re: [PATCH v3] Add virtio-input driver.
...ctually happens you likely have bigger problems anyway ;) > > +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, > > + unsigned long *bits, unsigned int bitcount) > > +{ > > + unsigned int bit; > > + size_t bytes; > > + u8 *virtio_bits; > > + > > + bytes = virtinput_cfg_select(vi, select, subsel); > > + if (!bytes) > > + return; > > How about limiting bytes to sizeof struct virtio_input_config->u? It's limited to 256 anyway because size is u8 in config space. > > + size = virtinput_c...
2015 Mar 24
2
[virtio-dev] Re: [PATCH v3] Add virtio-input driver.
...ctually happens you likely have bigger problems anyway ;) > > +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, > > + unsigned long *bits, unsigned int bitcount) > > +{ > > + unsigned int bit; > > + size_t bytes; > > + u8 *virtio_bits; > > + > > + bytes = virtinput_cfg_select(vi, select, subsel); > > + if (!bytes) > > + return; > > How about limiting bytes to sizeof struct virtio_input_config->u? It's limited to 256 anyway because size is u8 in config space. > > + size = virtinput_c...
2015 Mar 24
0
[virtio-dev] Re: [PATCH v3] Add virtio-input driver.
...) OK but pls add a comment. > > > +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, > > > + unsigned long *bits, unsigned int bitcount) > > > +{ > > > + unsigned int bit; > > > + size_t bytes; > > > + u8 *virtio_bits; > > > + > > > + bytes = virtinput_cfg_select(vi, select, subsel); > > > + if (!bytes) > > > + return; > > > > How about limiting bytes to sizeof struct virtio_input_config->u? > > It's limited to 256 anyway because size is u8 in confi...
2015 Mar 24
0
[virtio-dev] Re: [PATCH v3] Add virtio-input driver.
...) OK but pls add a comment. > > > +static void virtinput_cfg_bits(struct virtio_input *vi, int select, int subsel, > > > + unsigned long *bits, unsigned int bitcount) > > > +{ > > > + unsigned int bit; > > > + size_t bytes; > > > + u8 *virtio_bits; > > > + > > > + bytes = virtinput_cfg_select(vi, select, subsel); > > > + if (!bytes) > > > + return; > > > > How about limiting bytes to sizeof struct virtio_input_config->u? > > It's limited to 256 anyway because size is u8 in confi...