From: Dan Carpenter <dan.carpenter@linaro.org>
To: Dave Penkler <dpenkler@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org,
Marcello Carla' <marcello.carla@gmx.com>
Subject: Re: [PATCH 3/4 v3] staging: gpib: Fix erroneous removal of blank before newline
Date: Thu, 5 Dec 2024 13:06:10 +0300 [thread overview]
Message-ID: <36f9a87e-ad02-45e6-a8a0-8da65461b346@stanley.mountain> (raw)
In-Reply-To: <20241205093442.5796-1-dpenkler@gmail.com>
On Thu, Dec 05, 2024 at 10:34:42AM +0100, Dave Penkler wrote:
> 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' <marcello.carla@gmx.com>
> Fixes: fce79512a96a ("staging: gpib: Add LPVO DIY USB GPIB driver")
> Co-developed-by: Marcello Carla' <marcello.carla@gmx.com>
> Signed-off-by: Marcello Carla' <marcello.carla@gmx.com>
> Signed-off-by: Dave Penkler <dpenkler@gmail.com>
> ---
Thank you!
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
regards,
dan carpenter
prev parent reply other threads:[~2024-12-05 10:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-05 9:34 Dave Penkler
2024-12-05 10:06 ` Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=36f9a87e-ad02-45e6-a8a0-8da65461b346@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=dpenkler@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=marcello.carla@gmx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®