From: Greg KH <gregkh@linuxfoundation.org>
To: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Cc: corbet@lwn.net, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH v2 1/4] Docs: usb: update usb_bulk_msg receiving example
Date: Mon, 6 Dec 2021 08:47:43 +0100 [thread overview]
Message-ID: <Ya3AHxw48/T3XnPv@kroah.com> (raw)
In-Reply-To: <f3a1b2ba-85fe-e829-0d11-07a4bc4d8756@gmail.com>
On Sun, Dec 05, 2021 at 06:04:48PM +0100, Philipp Hortmann wrote:
> On 12/5/21 12:00 PM, Greg KH wrote:
> > On Sat, Dec 04, 2021 at 05:35:11PM +0100, Philipp Hortmann wrote:
> > > Clarification that this example is not in the driver template anymore.
> > > Update code example so that it fits best to usb-skeleton.c
> > > Update format of function names
> > >
> > > Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
> > > ---
> > > V1 -> V2: Added "Update format of function names" to patch description
> > > Corrected format of function names like the following example:
> > > "`usb_bulk_msg` function" to "usb_bulk_msg()"
> > > ---
> > > .../driver-api/usb/writing_usb_driver.rst | 32 +++++++++----------
> > > 1 file changed, 16 insertions(+), 16 deletions(-)
> > >
> > > diff --git a/Documentation/driver-api/usb/writing_usb_driver.rst b/Documentation/driver-api/usb/writing_usb_driver.rst
> > > index b43e1ce49f0e..ed11398837e5 100644
> > > --- a/Documentation/driver-api/usb/writing_usb_driver.rst
> > > +++ b/Documentation/driver-api/usb/writing_usb_driver.rst
> > > @@ -218,36 +218,36 @@ do very much processing at that time. Our implementation of
> > > ``skel_write_bulk_callback`` merely reports if the urb was completed
> > > successfully or not and then returns.
> > > -The read function works a bit differently from the write function in
> > > +This read function works a bit differently from the write function in
> > > that we do not use an urb to transfer data from the device to the
> > > -driver. Instead we call the :c:func:`usb_bulk_msg` function, which can be used
> > > +driver. Instead we call usb_bulk_msg(), which can be used
> > > to send or receive data from a device without having to create urbs and
> > > -handle urb completion callback functions. We call the :c:func:`usb_bulk_msg`
> > > -function, giving it a buffer into which to place any data received from
> > > +handle urb completion callback functions. We call usb_bulk_msg(),
> > > +giving it a buffer into which to place any data received from
> > > the device and a timeout value. If the timeout period expires without
> > > receiving any data from the device, the function will fail and return an
> > > error message. This can be shown with the following code::
> > > /* do an immediate bulk read to get data from the device */
> > > - retval = usb_bulk_msg (skel->dev,
> > > - usb_rcvbulkpipe (skel->dev,
> > > - skel->bulk_in_endpointAddr),
> > > - skel->bulk_in_buffer,
> > > - skel->bulk_in_size,
> > > - &count, 5000);
> > > + rv = usb_bulk_msg(dev->udev,
> >
> > Why are you changing the varible name? That seems unnecessary.
> Reason is that retval does not exist in skel_read().
Neither does any call to usb_bulk_msg(). So this is not code that is
from that file at all. "retval" is easier to understand than "rv".
> > Also, any reason you aren't cc:ing the USB maintainer on these changes? :)
> According to:
> perl scripts/get_maintainer.pl --separator , --nokeywords --nogit
> --nogit-fallback --norolestats -f
> Documentation/driver-api/usb/writing_usb_driver.rst
> Jonathan Corbet
> <corbet@lwn.net>,linux-doc@vger.kernel.org,linux-kernel@vger.kernel.org
> you are not in charge.
Ah, documentation isn't added to the maintainers entry for USB, I'll go
fix that up...
But note, my name is at the top of that file still, right?
thanks,
greg k-h
next prev parent reply other threads:[~2021-12-06 7:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-04 16:35 [PATCH v2 0/4] Docs: usb: Code and text updates from usb-skeleton Philipp Hortmann
2021-12-04 16:35 ` [PATCH v2 1/4] Docs: usb: update usb_bulk_msg receiving example Philipp Hortmann
2021-12-05 11:00 ` Greg KH
2021-12-05 17:04 ` Philipp Hortmann
2021-12-06 7:47 ` Greg KH [this message]
2021-12-04 16:35 ` [PATCH v2 2/4] Docs: usb: update comment and code near decrement our usage count for the device Philipp Hortmann
2021-12-04 16:35 ` [PATCH v2 3/4] Docs: usb: update comment and code of function skel_delete Philipp Hortmann
2021-12-04 16:35 ` [PATCH v2 4/4] Docs: usb: update explanation for device_present to disconnected Philipp Hortmann
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=Ya3AHxw48/T3XnPv@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=philipp.g.hortmann@gmail.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;
as well as URLs for NNTP newsgroup(s).