<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/staging/gpib/include, branch v6.15</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<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: Removing typedef for gpib_board</title>
<updated>2025-03-20T13:59:40+00:00</updated>
<author>
<name>Michael Rubin</name>
<email>matchstick@neverthere.org</email>
</author>
<published>2025-03-19T21:59:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4a2b4d93e8b3bf986ccdaa128354dddc3b8da7e0'/>
<id>4a2b4d93e8b3bf986ccdaa128354dddc3b8da7e0</id>
<content type='text'>
Removing typedef as per Linux code style.

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-21-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>
Removing typedef as per Linux code style.

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-21-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: struct typing for gpib_gboard_t</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:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=50af7beb90b355f6aa6914ff3f66ee6b848c0990'/>
<id>50af7beb90b355f6aa6914ff3f66ee6b848c0990</id>
<content type='text'>
Using Linux code style for gpib_board struct.

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-20-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 gpib_board struct.

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-20-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: tms9914: 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:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e473ee288fb6fbc67963f7c92554947e14515a20'/>
<id>e473ee288fb6fbc67963f7c92554947e14515a20</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-18-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-18-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: nec7210 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:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4a55f2e13401515b43ee9816ca36c3ca4d06509e'/>
<id>4a55f2e13401515b43ee9816ca36c3ca4d06509e</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-15-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-15-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: struct typing for gpib_board</title>
<updated>2025-03-20T13:57:24+00:00</updated>
<author>
<name>Michael Rubin</name>
<email>matchstick@neverthere.org</email>
</author>
<published>2025-03-19T21:59:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8982069fa8e2fb5759515134a2caed60cc5ba0f4'/>
<id>8982069fa8e2fb5759515134a2caed60cc5ba0f4</id>
<content type='text'>
Using Linux code style for gpib_board struct in .h to allow drivers to migrate.

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-2-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 gpib_board struct in .h to allow drivers to migrate.

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-2-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: Fix inadvertent negative shift</title>
<updated>2025-01-16T12:23:35+00:00</updated>
<author>
<name>Dave Penkler</name>
<email>dpenkler@gmail.com</email>
</author>
<published>2025-01-16T11:00:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9ed145e64f0af9a22e95f79940c540affbd939e2'/>
<id>9ed145e64f0af9a22e95f79940c540affbd939e2</id>
<content type='text'>
During the initial checkpatch cleanup, when removing blanks
after open parentheses, a minus sign in the argument of a shift
operation was deleted by mistake. This transformed a pre-decrement
operation into a negation.

The result of a negative shift is undefined and a warning was
signalled by sparse.

Restore the pre-decrement operation.

Fixes: 6c52d5e3cde2 ("staging: gpib: Add common include files for GPIB drivers")
Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250116110014.15577-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>
During the initial checkpatch cleanup, when removing blanks
after open parentheses, a minus sign in the argument of a shift
operation was deleted by mistake. This transformed a pre-decrement
operation into a negation.

The result of a negative shift is undefined and a warning was
signalled by sparse.

Restore the pre-decrement operation.

Fixes: 6c52d5e3cde2 ("staging: gpib: Add common include files for GPIB drivers")
Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250116110014.15577-1-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge 6.13-rc7 into staging next</title>
<updated>2025-01-13T05:42:54+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2025-01-13T05:42:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b37333c8657cfece16b2fb0ba3fef2cb481a0a19'/>
<id>b37333c8657cfece16b2fb0ba3fef2cb481a0a19</id>
<content type='text'>
We need the gpib changes in here as well to build on top of.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need the gpib changes in here as well to build on top of.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: Modify gpib_register_driver() to return error if it fails</title>
<updated>2025-01-07T14:38:54+00:00</updated>
<author>
<name>Nihar Chaithanya</name>
<email>niharchaithanya@gmail.com</email>
</author>
<published>2024-12-30T18:56:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e999bd2a897e7d70fa1fca6b80873529532322fe'/>
<id>e999bd2a897e7d70fa1fca6b80873529532322fe</id>
<content type='text'>
The function gpib_register_driver() can fail if kmalloc() fails,
but it doesn't return any error if that happens.

Modify the function to return error i.e int. Return the appropriate
error code if it fails. Remove the pr_info() statement.

Signed-off-by: Nihar Chaithanya &lt;niharchaithanya@gmail.com&gt;
Link: https://lore.kernel.org/r/20241230185633.175690-2-niharchaithanya@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 function gpib_register_driver() can fail if kmalloc() fails,
but it doesn't return any error if that happens.

Modify the function to return error i.e int. Return the appropriate
error code if it fails. Remove the pr_info() statement.

Signed-off-by: Nihar Chaithanya &lt;niharchaithanya@gmail.com&gt;
Link: https://lore.kernel.org/r/20241230185633.175690-2-niharchaithanya@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: gpib: fix address space mixup</title>
<updated>2024-12-20T15:44:15+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2024-12-13T06:49:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=baf8855c916007a8a372576b65492316f43ed60b'/>
<id>baf8855c916007a8a372576b65492316f43ed60b</id>
<content type='text'>
Throughout the gpib drivers, a 'void *' struct member is used in place
of either port numbers or __iomem pointers, which leads to lots of extra
type casts, sparse warnings and less portable code.

Split the struct member in two separate ones with the correct types,
so each driver can pick which one to use.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/all/f10e976e-7a04-4454-b38d-39cd18f142da@roeck-us.net/
Link: https://lore.kernel.org/r/20241213064959.1045243-3-arnd@kernel.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>
Throughout the gpib drivers, a 'void *' struct member is used in place
of either port numbers or __iomem pointers, which leads to lots of extra
type casts, sparse warnings and less portable code.

Split the struct member in two separate ones with the correct types,
so each driver can pick which one to use.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/all/f10e976e-7a04-4454-b38d-39cd18f142da@roeck-us.net/
Link: https://lore.kernel.org/r/20241213064959.1045243-3-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
