diff options
| author | Dave Penkler <[email protected]> | 2024-12-05 09:34:42 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2024-12-20 15:39:13 +0000 |
| commit | 4da38536e2190fb5bfabfcf5229f4d5398648295 (patch) | |
| tree | 5334b3ed1f52c6e3cd076ce4ee57e5a82f46dabd /drivers/platform/x86/intel/pmt/class.c | |
| parent | Linux 6.13-rc3 (diff) | |
| download | kernel-4da38536e2190fb5bfabfcf5229f4d5398648295.tar.gz kernel-4da38536e2190fb5bfabfcf5229f4d5398648295.zip | |
staging: gpib: Fix erroneous removal of blank before newline
The USB_GPIB_SET_LINES command string used to be: "\nIBDC \n" but when
we were merging this code into the upstream kernel we deleted the space
character before the newline to make checkpatch happy. That turned
out to be a mistake.
The "\nIBDC" part of the string is a command that we pass to the
firmware and the next character is a variable u8 value.
It gets set in set_control_line().
msg[leng - 2] = value ? (retval & ~line) : retval | line;
where leng is the length of the command string.
Imagine the parameter was supposed to be "8".
With the pre-merge code the command string would be "\nIBDC8\n"
With the post-merge code the command string became "\nIBD8\n"
The firmware doesn't recognize "IBD8" as a valid command and rejects it.
Putting a "." where the parameter is supposed to go fixes the driver
and makes checkpatch happy. Same thing with the other define and
the in-line assignment.
Reported-by: Marcello Carla' <[email protected]>
Fixes: fce79512a96a ("staging: gpib: Add LPVO DIY USB GPIB driver")
Co-developed-by: Marcello Carla' <[email protected]>
Signed-off-by: Marcello Carla' <[email protected]>
Signed-off-by: Dave Penkler <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.c')
0 files changed, 0 insertions, 0 deletions
