<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/staging/gpib/pc2, branch v6.16</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>staging: gpib: Add return value to request_control</title>
<updated>2025-04-18T14:49:00+00:00</updated>
<author>
<name>Dave Penkler</name>
<email>dpenkler@gmail.com</email>
</author>
<published>2025-04-18T13:35:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4960bce324fedb1966eaf737bcb5eb1cef8865c9'/>
<id>4960bce324fedb1966eaf737bcb5eb1cef8865c9</id>
<content type='text'>
A number of drivers are unable to release control due to hardware or
software limitations. As request_system_control was defined as void,
no error could be signalled.

This patch changes the prototype of request_system_control to int and
adds the appropriate checking and returns. In the case that a board
cannot release control EINVAL is returned.  If a driver does not
implement request_system_control EPERM is returned.

Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250418133537.22491-1-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A number of drivers are unable to release control due to hardware or
software limitations. As request_system_control was defined as void,
no error could be signalled.

This patch changes the prototype of request_system_control to int and
adds the appropriate checking and returns. In the case that a board
cannot release control EINVAL is returned.  If a driver does not
implement request_system_control EPERM is returned.

Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250418133537.22491-1-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: pc2: struct gpib_interface</title>
<updated>2025-04-17T09:12:55+00:00</updated>
<author>
<name>Michael Rubin</name>
<email>matchstick@neverthere.org</email>
</author>
<published>2025-04-17T00:32:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=575fb9c3fa03ee4c1de2e7a48d8ac90d633dc29f'/>
<id>575fb9c3fa03ee4c1de2e7a48d8ac90d633dc29f</id>
<content type='text'>
Using Linux code style for struct gpib_interface.

Adhering to Linux code style.

Reported by checkpatch.pl

In general, a pointer, or a struct that has elements that can reasonably be
directly accessed should never be a typedef.

Signed-off-by: Michael Rubin &lt;matchstick@neverthere.org&gt;
Link: https://lore.kernel.org/r/20250417003246.84445-17-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using Linux code style for struct gpib_interface.

Adhering to Linux code style.

Reported by checkpatch.pl

In general, a pointer, or a struct that has elements that can reasonably be
directly accessed should never be a typedef.

Signed-off-by: Michael Rubin &lt;matchstick@neverthere.org&gt;
Link: https://lore.kernel.org/r/20250417003246.84445-17-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: pc2: u8 over uint8_t</title>
<updated>2025-04-17T09:11:36+00:00</updated>
<author>
<name>Michael Rubin</name>
<email>matchstick@neverthere.org</email>
</author>
<published>2025-04-17T00:45:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6b0bf6f2edd2c0f0f2517664ba22b2c5d6406a8c'/>
<id>6b0bf6f2edd2c0f0f2517664ba22b2c5d6406a8c</id>
<content type='text'>
Reported by checkpatch.pl.

CHECK: Prefer kernel type 'u8' over 'uint8_t'
Signed-off-by: Michael Rubin &lt;matchstick@neverthere.org&gt;
Link: https://lore.kernel.org/r/20250417004533.86765-12-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported by checkpatch.pl.

CHECK: Prefer kernel type 'u8' over 'uint8_t'
Signed-off-by: Michael Rubin &lt;matchstick@neverthere.org&gt;
Link: https://lore.kernel.org/r/20250417004533.86765-12-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: pc2: fixes multiline comments style</title>
<updated>2025-04-15T14:49:29+00:00</updated>
<author>
<name>Paul Retourné</name>
<email>paul.retourne@orange.fr</email>
</author>
<published>2025-04-12T07:48:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9c95c9d1fac80ede2d3d45eeafd16a658c514b61'/>
<id>9c95c9d1fac80ede2d3d45eeafd16a658c514b61</id>
<content type='text'>
Fixes the style of multiline comments to comply with the linux kernel
coding style.

Signed-off-by: Paul Retourné &lt;paul.retourne@orange.fr&gt;
Link: https://lore.kernel.org/r/77eb5fc5050298503009fa212600f00514eeb713.1744438358.git.paul.retourne@orange.fr
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes the style of multiline comments to comply with the linux kernel
coding style.

Signed-off-by: Paul Retourné &lt;paul.retourne@orange.fr&gt;
Link: https://lore.kernel.org/r/77eb5fc5050298503009fa212600f00514eeb713.1744438358.git.paul.retourne@orange.fr
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: pc2: struct gpib_board_config</title>
<updated>2025-04-15T14:36:55+00:00</updated>
<author>
<name>Michael Rubin</name>
<email>matchstick@neverthere.org</email>
</author>
<published>2025-04-08T22:36:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ef93e89b7be611c7dd28e3a9c37017b4da2f9fac'/>
<id>ef93e89b7be611c7dd28e3a9c37017b4da2f9fac</id>
<content type='text'>
Using Linux code style for struct gpib_board_config

Adhering to Linux code style.

Reported by checkpatch.pl

In general, a pointer, or a struct that has elements that can reasonably be
directly accessed should never be a typedef.

Signed-off-by: Michael Rubin &lt;matchstick@neverthere.org&gt;
Link: https://lore.kernel.org/r/20250408223659.187109-17-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using Linux code style for struct gpib_board_config

Adhering to Linux code style.

Reported by checkpatch.pl

In general, a pointer, or a struct that has elements that can reasonably be
directly accessed should never be a typedef.

Signed-off-by: Michael Rubin &lt;matchstick@neverthere.org&gt;
Link: https://lore.kernel.org/r/20250408223659.187109-17-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: pc2: lines exceeded 100 columns</title>
<updated>2025-04-15T14:34:51+00:00</updated>
<author>
<name>Michael Rubin</name>
<email>matchstick@neverthere.org</email>
</author>
<published>2025-04-08T22:20:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e4b6bf7bb6f611c0ff4a53b318bb8487141348a4'/>
<id>e4b6bf7bb6f611c0ff4a53b318bb8487141348a4</id>
<content type='text'>
Adhere to Linux kernel coding style.

CHECK: line length exceeds 100 columns

Reported by checkpatch

Signed-off-by: Michael Rubin &lt;matchstick@neverthere.org&gt;
Link: https://lore.kernel.org/r/20250408222040.186881-9-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adhere to Linux kernel coding style.

CHECK: line length exceeds 100 columns

Reported by checkpatch

Signed-off-by: Michael Rubin &lt;matchstick@neverthere.org&gt;
Link: https://lore.kernel.org/r/20250408222040.186881-9-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: change return type of t1_delay function to report errors</title>
<updated>2025-03-20T14:07:50+00:00</updated>
<author>
<name>Rodrigo Gobbi</name>
<email>rodrigo.gobbi.7@gmail.com</email>
</author>
<published>2025-02-25T01:44:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ed3751860e6ca5f4f3bb8db3006e607460b047cd'/>
<id>ed3751860e6ca5f4f3bb8db3006e607460b047cd</id>
<content type='text'>
The current code returns "unsigned int" and it doesn't handle errors
correctly if it happens during ioctl call for t1 delay configuration.

The ni_usb_t1_delay(), from NI, is the only function returning -1
at this point. The caller, t1_delay_ioctl(), doesn't check for errors
and sets board-&gt;t1_nano_sec to -1 and returns success.
The board-&gt;t1_nano_sec value is also used in ni_usb_setup_t1_delay()
besides the ioctl call and a value of -1 is treated as being above 1100ns.
It may or may not have a noticeable effect, but it's obviously not right
considering the content of ni_usb_setup_t1_delay().

Typical delays are in the 200-2000 range, but definitely not more
than INT_MAX so we can fix this code by changing the return type to int
and adding a check for errors. While we're at it, lets change the error
code in ni_usb_t1_delay() from -1 and instead propagate the error from
ni_usb_write_registers().

Fixes: 4e127de14fa7 ("staging: gpib: Add National Instruments USB GPIB driver")
Signed-off-by: Rodrigo Gobbi &lt;rodrigo.gobbi.7@gmail.com&gt;
Link: https://lore.kernel.org/r/20250225014811.77995-1-rodrigo.gobbi.7@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current code returns "unsigned int" and it doesn't handle errors
correctly if it happens during ioctl call for t1 delay configuration.

The ni_usb_t1_delay(), from NI, is the only function returning -1
at this point. The caller, t1_delay_ioctl(), doesn't check for errors
and sets board-&gt;t1_nano_sec to -1 and returns success.
The board-&gt;t1_nano_sec value is also used in ni_usb_setup_t1_delay()
besides the ioctl call and a value of -1 is treated as being above 1100ns.
It may or may not have a noticeable effect, but it's obviously not right
considering the content of ni_usb_setup_t1_delay().

Typical delays are in the 200-2000 range, but definitely not more
than INT_MAX so we can fix this code by changing the return type to int
and adding a check for errors. While we're at it, lets change the error
code in ni_usb_t1_delay() from -1 and instead propagate the error from
ni_usb_write_registers().

Fixes: 4e127de14fa7 ("staging: gpib: Add National Instruments USB GPIB driver")
Signed-off-by: Rodrigo Gobbi &lt;rodrigo.gobbi.7@gmail.com&gt;
Link: https://lore.kernel.org/r/20250225014811.77995-1-rodrigo.gobbi.7@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: pc2: struct gpib_board</title>
<updated>2025-03-20T13:59:39+00:00</updated>
<author>
<name>Michael Rubin</name>
<email>matchstick@neverthere.org</email>
</author>
<published>2025-03-19T21:59:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1d61a41b3bdb38682e2574b89492a816d71fbe30'/>
<id>1d61a41b3bdb38682e2574b89492a816d71fbe30</id>
<content type='text'>
Using Linux code style for struct gpib_board.

Adhering to Linux code style.

In general, a pointer, or a struct that has elements that can reasonably be
directly accessed should never be a typedef.

Signed-off-by: Michael Rubin &lt;matchstick@neverthere.org&gt;
Acked-By: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250319215924.19387-17-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using Linux code style for struct gpib_board.

Adhering to Linux code style.

In general, a pointer, or a struct that has elements that can reasonably be
directly accessed should never be a typedef.

Signed-off-by: Michael Rubin &lt;matchstick@neverthere.org&gt;
Acked-By: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250319215924.19387-17-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: pc2 console messaging cleanup</title>
<updated>2025-02-19T15:48:06+00:00</updated>
<author>
<name>Dave Penkler</name>
<email>dpenkler@gmail.com</email>
</author>
<published>2025-02-14T11:47:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4d5092b188b363aa6b15cedb79c2ffd758aa5af7'/>
<id>4d5092b188b363aa6b15cedb79c2ffd758aa5af7</id>
<content type='text'>
Enable module name to be printed in pr_xxx and dev_xxx

Turn long pr_err into comment, short message in dev_err.

Change pr_err to dev_err where possible.

Use error return codes consistent with messages.

Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250214114708.28947-16-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enable module name to be printed in pr_xxx and dev_xxx

Turn long pr_err into comment, short message in dev_err.

Change pr_err to dev_err where possible.

Use error return codes consistent with messages.

Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250214114708.28947-16-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: Make static, reduce fwd declarations</title>
<updated>2025-02-03T15:08:47+00:00</updated>
<author>
<name>Dave Penkler</name>
<email>dpenkler@gmail.com</email>
</author>
<published>2025-01-22T10:38:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8418753187ba216f8931432dd8a6ee2f23977ecd'/>
<id>8418753187ba216f8931432dd8a6ee2f23977ecd</id>
<content type='text'>
A number of drivers were unnecessarily not declaring their entry
points as static.

Declare them as static.

In order to reduce the number of forward declarations the gpib
interface structure initializations have been moved to after the
code of the entry points that they use. This also makes the
structure of the drivers to be more consistent between them.

Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Reviewed-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Link: https://lore.kernel.org/r/20250122103859.25499-3-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A number of drivers were unnecessarily not declaring their entry
points as static.

Declare them as static.

In order to reduce the number of forward declarations the gpib
interface structure initializations have been moved to after the
code of the entry points that they use. This also makes the
structure of the drivers to be more consistent between them.

Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Reviewed-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Link: https://lore.kernel.org/r/20250122103859.25499-3-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
