<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/staging/comedi, branch v3.9-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>more file_inode() open-coded instances</title>
<updated>2013-02-27T21:59:05+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-02-27T21:59:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6131ffaa1f091415b7a24abb01f033d9c0a727f4'/>
<id>6131ffaa1f091415b7a24abb01f033d9c0a727f4</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: vmk80xx: wait for URBs to complete</title>
<updated>2013-02-18T18:53:50+00:00</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2013-02-18T11:15:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=951348b377385475aa256c27e1c9e2564c9ec160'/>
<id>951348b377385475aa256c27e1c9e2564c9ec160</id>
<content type='text'>
For Velleman K8055 (aka VM110), `vmk80xx_read_packet()` and
`vmk8055_write_packet()` send an URB asynchronously and do not wait for
it complete.  However, callers of `vmk80xx_read_packet()` are assuming
the contents of the data buffer `devpriv-&gt;usb_rx_buf` are valid
immediately after that function returns.

For Velleman K8061 (aka VM140), `vmk80xx_read_packet()` and
`vmk80xx_write_packet()` punt the requests to `vmk80xx_do_bulk_msg()`
which *does* wait for the URBs to complete (albeit with no error
checking!).

Change `vmk80xx_read_packet()` and `vmk80xx_write_packet()` to use
`usb_interrupt_msg()` for the K8055, so the callers of
`vmk80xx_read_packet()` can assume the data buffer contents are valid
(if no error occurred).  Remove all the code for checking for transfers
in progress and busy waiting, as it's no longer needed.  Pretty much all
the callers of `vmk80xx_read_packet()` and `vmk80xx_write_packet()` hold
the same semaphore anyway, and the only caller that doesn't
(`vmk80xx_reset_device()` called during initialization of the device)
doesn't really matter.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For Velleman K8055 (aka VM110), `vmk80xx_read_packet()` and
`vmk8055_write_packet()` send an URB asynchronously and do not wait for
it complete.  However, callers of `vmk80xx_read_packet()` are assuming
the contents of the data buffer `devpriv-&gt;usb_rx_buf` are valid
immediately after that function returns.

For Velleman K8061 (aka VM140), `vmk80xx_read_packet()` and
`vmk80xx_write_packet()` punt the requests to `vmk80xx_do_bulk_msg()`
which *does* wait for the URBs to complete (albeit with no error
checking!).

Change `vmk80xx_read_packet()` and `vmk80xx_write_packet()` to use
`usb_interrupt_msg()` for the K8055, so the callers of
`vmk80xx_read_packet()` can assume the data buffer contents are valid
(if no error occurred).  Remove all the code for checking for transfers
in progress and busy waiting, as it's no longer needed.  Pretty much all
the callers of `vmk80xx_read_packet()` and `vmk80xx_write_packet()` hold
the same semaphore anyway, and the only caller that doesn't
(`vmk80xx_reset_device()` called during initialization of the device)
doesn't really matter.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: drivers: addi-data: hwdrv_apci3200.c: Add a missing semicolon</title>
<updated>2013-02-18T18:53:50+00:00</updated>
<author>
<name>Kumar Amit Mehta</name>
<email>gmate.amit@gmail.com</email>
</author>
<published>2013-02-17T06:54:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6b07b30892ad972286871787079ed68d07779ba4'/>
<id>6b07b30892ad972286871787079ed68d07779ba4</id>
<content type='text'>
fix for missing end-of-statement by adding a semicolon

Signed-off-by: Kumar Amit Mehta &lt;gmate.amit@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix for missing end-of-statement by adding a semicolon

Signed-off-by: Kumar Amit Mehta &lt;gmate.amit@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging/comedi: Remove if(); statement without effect</title>
<updated>2013-02-15T18:20:14+00:00</updated>
<author>
<name>Peter Huewe</name>
<email>peterhuewe@gmx.de</email>
</author>
<published>2013-02-15T12:14:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a81875dd7a6e31e69ea1f6ed22209acb8f82bf36'/>
<id>a81875dd7a6e31e69ea1f6ed22209acb8f82bf36</id>
<content type='text'>
Smatch warns about:
staging/comedi/drivers/cb_pcidas64.c:3304 prep_ao_dma() warn: if();

So the check currently does nothing and can be removed, as indicated by
Ian.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Smatch warns about:
staging/comedi/drivers/cb_pcidas64.c:3304 prep_ao_dma() warn: if();

So the check currently does nothing and can be removed, as indicated by
Ian.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging/comedi: Use &amp;&amp; instead of &amp; for logical comparision</title>
<updated>2013-02-15T18:20:14+00:00</updated>
<author>
<name>Peter Huewe</name>
<email>peterhuewe@gmx.de</email>
</author>
<published>2013-02-14T21:27:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8289ad0578ad7e66b2052754746b4deb1a88cc4a'/>
<id>8289ad0578ad7e66b2052754746b4deb1a88cc4a</id>
<content type='text'>
sparse complains that:
drivers/staging/comedi/drivers/adl_pci9118.c:813 pci9118_calc_divisors()
warn: maybe use &amp;&amp; instead of &amp;

usessh is used as a boolean flag (0 and 1) and is compared to a boolean
value so we should use &amp;&amp; here.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sparse complains that:
drivers/staging/comedi/drivers/adl_pci9118.c:813 pci9118_calc_divisors()
warn: maybe use &amp;&amp; instead of &amp;

usessh is used as a boolean flag (0 and 1) and is compared to a boolean
value so we should use &amp;&amp; here.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: vmk80xx: initialize K8055 outputs to known state</title>
<updated>2013-02-15T18:17:55+00:00</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2013-02-14T16:42:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f06a23c93b900c37ef14858868c00dc8f061fa22'/>
<id>f06a23c93b900c37ef14858868c00dc8f061fa22</id>
<content type='text'>
vmk8055_reset_device() is called during initialization of a Velleman
K8055 (aka VM110) to send a reset command to the hardware.  I don't know
what this does, but I know that it doesn't reset the digital outputs as
I've tried it.  Since the hardware does not have any way to query the
current output values and there is only the one command to update all
the analog and digital outputs simultaneously (VMK8055_CMD_WRT_AD), send
this command during initialization to set all the analog and digital
outputs to a known state.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vmk8055_reset_device() is called during initialization of a Velleman
K8055 (aka VM110) to send a reset command to the hardware.  I don't know
what this does, but I know that it doesn't reset the digital outputs as
I've tried it.  Since the hardware does not have any way to query the
current output values and there is only the one command to update all
the analog and digital outputs simultaneously (VMK8055_CMD_WRT_AD), send
this command during initialization to set all the analog and digital
outputs to a known state.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: vmk80xx: simplify vmk80xx_reset_device()</title>
<updated>2013-02-15T18:17:55+00:00</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2013-02-14T16:42:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e8f311a5b6b9163f6aeba2524eaab92dc3b0fb6f'/>
<id>e8f311a5b6b9163f6aeba2524eaab92dc3b0fb6f</id>
<content type='text'>
vmk80xx_reset_device() is called during initialization of a Velleman
K8055 (aka VM110) to send a reset command to the hardware.  The current
function is a bit long-winded and doesn't set the TRANS_OUT_BUSY flag to
prevent re-use of the transmit buffer while the URB is in progress.

Rewrite the function to use vmk80xx_write_packet() to send the command.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vmk80xx_reset_device() is called during initialization of a Velleman
K8055 (aka VM110) to send a reset command to the hardware.  The current
function is a bit long-winded and doesn't set the TRANS_OUT_BUSY flag to
prevent re-use of the transmit buffer while the URB is in progress.

Rewrite the function to use vmk80xx_write_packet() to send the command.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: vmk80xx: zero buffers on allocation</title>
<updated>2013-02-15T18:17:55+00:00</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2013-02-14T16:42:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0cbfc8269b980adafa7b529bb529a2fc316c5405'/>
<id>0cbfc8269b980adafa7b529bb529a2fc316c5405</id>
<content type='text'>
Zero out `devpriv-&gt;usb_tx_buf` and `devpriv-&gt;usb_rx_buf` on allocation.
When sending data to the USB device, this ensures any unused part of the
buffer will not contain random crap.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Zero out `devpriv-&gt;usb_tx_buf` and `devpriv-&gt;usb_rx_buf` on allocation.
When sending data to the USB device, this ensures any unused part of the
buffer will not contain random crap.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging/comedi: Fix undefined array subscript</title>
<updated>2013-02-13T17:33:38+00:00</updated>
<author>
<name>Peter Huewe</name>
<email>peterhuewe@gmx.de</email>
</author>
<published>2013-02-13T14:28:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fc9ca48eb60f4a516f59bbde1dc7685744ceb310'/>
<id>fc9ca48eb60f4a516f59bbde1dc7685744ceb310</id>
<content type='text'>
In vmk80xx_do_insn_bits the local variable reg, which is used as an
index to the tx_buf array, can be used uninitialized if
- data[0] == 0
and
- devpriv-&gt;model != VMK8061_MODEL
-&gt; we get into the else branch without having reg initialized.

Since the driver usually differentiates between VMK8061_MODEL and
VMK8055_MODEL it's safe to assume that VMK8055_DO_REG was meant as an
initial value.

And to avoid duplication we can move the assignments to the top.

Acked-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Acked-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In vmk80xx_do_insn_bits the local variable reg, which is used as an
index to the tx_buf array, can be used uninitialized if
- data[0] == 0
and
- devpriv-&gt;model != VMK8061_MODEL
-&gt; we get into the else branch without having reg initialized.

Since the driver usually differentiates between VMK8061_MODEL and
VMK8055_MODEL it's safe to assume that VMK8055_DO_REG was meant as an
initial value.

And to avoid duplication we can move the assignments to the top.

Acked-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Acked-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: Remove unnecessary OOM messages</title>
<updated>2013-02-11T18:10:33+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-02-11T17:41:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=78110bb8dc4a7ff331bfa3cfe7d4e287cfb3f22b'/>
<id>78110bb8dc4a7ff331bfa3cfe7d4e287cfb3f22b</id>
<content type='text'>
alloc failures already get standardized OOM
messages and a dump_stack.

For the affected mallocs around these OOM messages:

Converted kzallocs with multiplies to kcalloc.
Converted kmallocs with multiplies to kmalloc_array.
Converted a kmalloc/strlen/strncpy to kstrdup.
Moved a spin_lock below a removed OOM message and
removed a now unnecessary spin_unlock.
Neatened alignment and whitespace.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
alloc failures already get standardized OOM
messages and a dump_stack.

For the affected mallocs around these OOM messages:

Converted kzallocs with multiplies to kcalloc.
Converted kmallocs with multiplies to kmalloc_array.
Converted a kmalloc/strlen/strncpy to kstrdup.
Moved a spin_lock below a removed OOM message and
removed a now unnecessary spin_unlock.
Neatened alignment and whitespace.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
