<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/drivers/staging/gpib, branch cpufreq-rust</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>https://git.kobert.dev/pm24.git/atom/drivers/staging/gpib?h=cpufreq-rust</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom/drivers/staging/gpib?h=cpufreq-rust'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2025-01-19T08:06:31Z</updated>
<entry>
<title>staging: gpib: Agilent usb code cleanup</title>
<updated>2025-01-19T08:06:31Z</updated>
<author>
<name>Dave Penkler</name>
<email>dpenkler@gmail.com</email>
</author>
<published>2025-01-18T14:50:46Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=579b6f18c5ca162af040f44684cc55f7da182236'/>
<id>urn:sha1:579b6f18c5ca162af040f44684cc55f7da182236</id>
<content type='text'>
Remove useless #ifdef RESET_USB_CONFIG code.

Change kalloc / memset to kzalloc

The attach function was not freeing the private data on error
returns. Separate the releasing of urbs and private data and
add a common error exit for attach failure.

Set the board private data pointer to NULL after freeing
the private data.

Reduce console spam by emitting only one attach message.

Change last pr_err in attach to dev_err

Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250118145046.12181-3-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: gpib: Fix NULL pointer dereference in detach</title>
<updated>2025-01-19T08:06:30Z</updated>
<author>
<name>Dave Penkler</name>
<email>dpenkler@gmail.com</email>
</author>
<published>2025-01-18T14:50:45Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=6a6c153537f093c3bc79ea9633f3954d3450d0ba'/>
<id>urn:sha1:6a6c153537f093c3bc79ea9633f3954d3450d0ba</id>
<content type='text'>
When the detach function is called after a failed attach
the usb_dev initialization can cause a NULL pointer
dereference. This happens when the usb device is not found
in the attach procedure.

Remove the usb_dev variable and initialization and change the dev
in the dev_info message from the usb_dev to the gpib_dev.

Fixes: fbae7090f30c ("staging: gpib: Update messaging and usb_device refs in agilent_usb")
Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250118145046.12181-2-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: gpib: Fix inadvertent negative shift</title>
<updated>2025-01-16T12:23:35Z</updated>
<author>
<name>Dave Penkler</name>
<email>dpenkler@gmail.com</email>
</author>
<published>2025-01-16T11:00:14Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=9ed145e64f0af9a22e95f79940c540affbd939e2'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>staging: gpib: fix prefixing 0x with decimal output</title>
<updated>2025-01-15T17:37:40Z</updated>
<author>
<name>Ajith P V</name>
<email>ajithpv.linux@gmail.com</email>
</author>
<published>2025-01-14T12:16:56Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=d3fbbfa925c25d4d4453236173fb459ae2990265'/>
<id>urn:sha1:d3fbbfa925c25d4d4453236173fb459ae2990265</id>
<content type='text'>
* pr_err() of request_region() in cb7210 uses 0x%u which is defective.
* The config-&gt;ibbase is of u32 and correct prefix is 0x%x.
* This error reported by checkpatch with below message:
  ERROR: Prefixing 0x with decimal output is defective

Signed-off-by: Ajith P V &lt;ajithpv.linux@gmail.com&gt;
Link: https://lore.kernel.org/r/20250114121656.30577-1-ajithpv.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: gpib: Use C99 syntax and make static</title>
<updated>2025-01-15T17:35:57Z</updated>
<author>
<name>Dave Penkler</name>
<email>dpenkler@gmail.com</email>
</author>
<published>2025-01-14T16:54:03Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=3e2bcc16804b584bb2a2a8538a40fd3307305816'/>
<id>urn:sha1:3e2bcc16804b584bb2a2a8538a40fd3307305816</id>
<content type='text'>
Some drivers were still using the old syntax for initializing
structs:
field : value;

This caused sparse to emit the following warning, for example:
common/gpib_os.c:2026:1: warning: obsolete struct initializer, use C99 syntax

Use C99 syntax:
.field = value;

Some local structs and arrays were not declared static causing
sparse to emit the following warning, for example:
warning: symbol 'ib_fops' was not declared. Should it be static?

Declare the local structs and arrays as static.

Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250114165403.16410-5-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: gpib: Avoid plain integers as NULL pointers</title>
<updated>2025-01-15T17:35:57Z</updated>
<author>
<name>Dave Penkler</name>
<email>dpenkler@gmail.com</email>
</author>
<published>2025-01-14T16:54:02Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=b3beeeee2724b0664a2fc8682e1440d3fc31c6fe'/>
<id>urn:sha1:b3beeeee2724b0664a2fc8682e1440d3fc31c6fe</id>
<content type='text'>
A number of drivers were comparing request_region() with 0,
others were passing 0 instead of NULL as a pointer argument.

This led to the following sparse warning, for example:

cb7210/cb7210.c:1043:72: warning: Using plain integer as NULL pointer

Use !request_region() to test for NULL return and use NULL instead
of 0 as pointer parameter.

Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250114165403.16410-4-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: gpib: Use __user for user space pointers</title>
<updated>2025-01-15T17:35:56Z</updated>
<author>
<name>Dave Penkler</name>
<email>dpenkler@gmail.com</email>
</author>
<published>2025-01-14T16:54:01Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=8e7ff4e7a2358fbbe3a5bbdb733e5cf5868cf1ff'/>
<id>urn:sha1:8e7ff4e7a2358fbbe3a5bbdb733e5cf5868cf1ff</id>
<content type='text'>
The user buffers in copy_from_user, copy_to_user and some file ops
did not use the __user address space attribute.

This led to the following sparse warning, for example:
common/gpib_os.c:838:40: warning: incorrect type in argument 2 (different address spaces)
common/gpib_os.c:838:40:    expected void const [noderef] __user *from
common/gpib_os.c:838:40:    got void *

Add the __user address space attribute where needed.

Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250114165403.16410-3-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: gpib: Use __iomem attribute for io addresses</title>
<updated>2025-01-15T17:35:56Z</updated>
<author>
<name>Dave Penkler</name>
<email>dpenkler@gmail.com</email>
</author>
<published>2025-01-14T16:54:00Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=77b41a9342f610b90675a15aea87c8462b900404'/>
<id>urn:sha1:77b41a9342f610b90675a15aea87c8462b900404</id>
<content type='text'>
In a number of drivers the PCI memory pointers were declared simply as
void *.
This caused sparse to emit the following warning, for example:

agilent_82350b/agilent_82350b.c:44:58: warning: incorrect type in argument 2 (different address spaces)
agilent_82350b/agilent_82350b.c:44:58:    expected void volatile [noderef] __iomem *addr

Declare the PCI memory pointers as void __iomem *addr.

Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250114165403.16410-2-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: gpib: Add missing mutex unlock in ni usb driver</title>
<updated>2025-01-13T05:43:34Z</updated>
<author>
<name>Dave Penkler</name>
<email>dpenkler@gmail.com</email>
</author>
<published>2025-01-11T16:15:48Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=d43f18d94795aa9aacb110a60bc4df76e112f77f'/>
<id>urn:sha1:d43f18d94795aa9aacb110a60bc4df76e112f77f</id>
<content type='text'>
When the buffer allocation for return data in ni_usb_write() fails
we were returning without unlocking the addressed_transfer_lock.

Add the unlock call.

This was detected by smatch:
New smatch warnings:
drivers/staging/gpib/ni_usb/ni_usb_gpib.c:837 ni_usb_write() warn: inconsistent returns '&amp;ni_priv-&gt;addressed_transfer_lock'.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Closes: https://lore.kernel.org/r/202412201550.9NCO57Ye-lkp@intel.com/
Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250111161548.27601-1-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: gpib: Add missing mutex unlock in agilent usb driver</title>
<updated>2025-01-13T05:43:34Z</updated>
<author>
<name>Dave Penkler</name>
<email>dpenkler@gmail.com</email>
</author>
<published>2025-01-11T16:14:57Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=55eb3c3a6388420afda1374b353717de32ae9573'/>
<id>urn:sha1:55eb3c3a6388420afda1374b353717de32ae9573</id>
<content type='text'>
When no matching product id was found in the attach function the driver
returned without unlocking the agilent_82357a_hotplug_lock mutex.

Add the unlock call.

This was detected by smatch:
smatch warnings:
drivers/staging/gpib/agilent_82357a/agilent_82357a.c:1381 agilent_82357a_attach() warn: inconsistent returns 'global &amp;agilent_82357a_hotplug_lock'.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Closes: https://lore.kernel.org/r/202412210143.WJhYzXfD-lkp@intel.com/
Fixes: 4c41fe886a56 ("staging: gpib: Add Agilent/Keysight 82357x USB GPIB driver")
Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20250111161457.27556-1-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
