<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/usb/class/usblp.c, branch next/master</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=next%2Fmaster</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=next%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2026-02-22T01:09:51Z</updated>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T00:37:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>urn:sha1:bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43</id>
<content type='text'>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28Z</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1:69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: usblp: Use min_t() to improve usblp_read()</title>
<updated>2025-09-06T13:20:22Z</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2025-08-29T17:37:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=43ae982cd0ec7fb6fea40fabef2c872e6f9b213d'/>
<id>urn:sha1:43ae982cd0ec7fb6fea40fabef2c872e6f9b213d</id>
<content type='text'>
Use min_t() to improve usblp_read() and avoid calculating
'avail - usblp-&gt;readcount' twice. Use min_t(ssize_t,,) instead of min()
to avoid a signedness error.

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Link: https://lore.kernel.org/r/20250829173713.56222-1-thorsten.blum@linux.dev
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usblp: clean up assignment inside if conditions</title>
<updated>2025-07-21T14:30:54Z</updated>
<author>
<name>Darshan Rathod</name>
<email>darshan.rathod@siqol.com</email>
</author>
<published>2025-07-18T09:10:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d8e1ecffb4a282791be1b3d81a05541749b0db64'/>
<id>urn:sha1:d8e1ecffb4a282791be1b3d81a05541749b0db64</id>
<content type='text'>
This patch cleans up a few cases where assignments were made
inside of if conditions, like

if ((rv = func()) &lt; 0)

into two lines, to improve readability and be more in-line with
Linux kernel coding style. It also cleans up checkpatch warnings
like:

ERROR: do not use assignment in if condition

No functional change, just a style and maintainability fix.

Signed-off-by: Darshan Rathod &lt;darshan.rathod@siqol.com&gt;
Link: https://lore.kernel.org/r/20250718091045.264129-1-darshan.rathod@siqol.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 6.13-rc7 into usb-next</title>
<updated>2025-01-13T05:11:06Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2025-01-13T05:11:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2919c4a3d883361105185f9d2f658e1a4545a1a7'/>
<id>urn:sha1:2919c4a3d883361105185f9d2f658e1a4545a1a7</id>
<content type='text'>
We need the USB fixes in here as well for testing.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: usblp: return error when setting unsupported protocol</title>
<updated>2024-12-23T17:50:41Z</updated>
<author>
<name>Jun Yan</name>
<email>jerrysteve1101@gmail.com</email>
</author>
<published>2024-12-12T14:38:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7a3d76a0b60b3f6fc3375e4de2174bab43f64545'/>
<id>urn:sha1:7a3d76a0b60b3f6fc3375e4de2174bab43f64545</id>
<content type='text'>
Fix the regression introduced by commit d8c6edfa3f4e ("USB:
usblp: don't call usb_set_interface if there's a single alt"),
which causes that unsupported protocols can also be set via
ioctl when the num_altsetting of the device is 1.

Move the check for protocol support to the earlier stage.

Fixes: d8c6edfa3f4e ("USB: usblp: don't call usb_set_interface if there's a single alt")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Jun Yan &lt;jerrysteve1101@gmail.com&gt;
Link: https://lore.kernel.org/r/20241212143852.671889-1-jerrysteve1101@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: usblp: remove redundant semicolon</title>
<updated>2024-12-23T17:40:39Z</updated>
<author>
<name>Jun Yan</name>
<email>jerrysteve1101@gmail.com</email>
</author>
<published>2024-12-13T14:53:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c975c9b8f8204c34213e9a6821f597bbda021f8e'/>
<id>urn:sha1:c975c9b8f8204c34213e9a6821f597bbda021f8e</id>
<content type='text'>
remove redundant semicolon in LPIOC_SOFT_RESET to
fix the incorrect macro expansion syntax.

Signed-off-by: Jun Yan &lt;jerrysteve1101@gmail.com&gt;
Link: https://lore.kernel.org/r/20241213145314.785616-1-jerrysteve1101@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: make devnode() callback in usb_class_driver take a const *</title>
<updated>2022-10-20T10:11:56Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2022-10-01T16:51:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5033ac5c580cb22245a0c2b9e53d508e8fdd50d8'/>
<id>urn:sha1:5033ac5c580cb22245a0c2b9e53d508e8fdd50d8</id>
<content type='text'>
With the changes to the driver core to make more pointers const, the USB
subsystem also needs to be modified to take a const * for the devnode
callback so that the driver core's constant pointer will also be
properly propagated.

Cc: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Cc: Juergen Stuber &lt;starblue@users.sourceforge.net&gt;
Reviewed-by: Johan Hovold &lt;johan@kernel.org&gt;
Acked-by: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Reviewed-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Link: https://lore.kernel.org/r/20221001165128.2688526-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: usblp: fix a hang in poll() if disconnected</title>
<updated>2021-03-10T08:36:13Z</updated>
<author>
<name>Pete Zaitcev</name>
<email>zaitcev@redhat.com</email>
</author>
<published>2021-03-04T04:10:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9de2c43acf37a17dc4c69ff78bb099b80fb74325'/>
<id>urn:sha1:9de2c43acf37a17dc4c69ff78bb099b80fb74325</id>
<content type='text'>
Apparently an application that opens a device and calls select()
on it, will hang if the decice is disconnected. It's a little
surprising that we had this bug for 15 years, but apparently
nobody ever uses select() with a printer: only write() and read(),
and those work fine. Well, you can also select() with a timeout.

The fix is modeled after devio.c. A few other drivers check the
condition first, then do not add the wait queue in case the
device is disconnected. We doubt that's completely race-free.
So, this patch adds the process first, then locks properly
and checks for the disconnect.

Reviewed-by: Zqiang &lt;qiang.zhang@windriver.com&gt;
Signed-off-by: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20210303221053.1cf3313e@suzdal.zaitcev.lan
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: usblp: don't call usb_set_interface if there's a single alt</title>
<updated>2021-01-26T14:15:31Z</updated>
<author>
<name>Jeremy Figgins</name>
<email>kernel@jeremyfiggins.com</email>
</author>
<published>2021-01-24T00:21:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d8c6edfa3f4ee0d45d7ce5ef18d1245b78774b9d'/>
<id>urn:sha1:d8c6edfa3f4ee0d45d7ce5ef18d1245b78774b9d</id>
<content type='text'>
Some devices, such as the Winbond Electronics Corp. Virtual Com Port
(Vendor=0416, ProdId=5011), lockup when usb_set_interface() or
usb_clear_halt() are called. This device has only a single
altsetting, so it should not be necessary to call usb_set_interface().

Acked-by: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Jeremy Figgins &lt;kernel@jeremyfiggins.com&gt;
Link: https://lore.kernel.org/r/YAy9kJhM/rG8EQXC@watson
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
