From: Tom Rini <trini@konsulko.com>
To: Marek Vasut <marek.vasut@mailbox.org>
Cc: Andrew Goodbody <andrew.goodbody@linaro.org>,
u-boot@lists.denx.de, Neil Armstrong <neil.armstrong@linaro.org>,
Mattijs Korpershoek <mkorpershoek@kernel.org>,
Anshul Dalal <anshuld@ti.com>
Subject: Re: [PATCH RESEND] usb: dwc3: Remove redundant test
Date: Mon, 29 Sep 2025 08:10:17 -0600 [thread overview]
Message-ID: <20250929141017.GD6093@bill-the-cat> (raw)
In-Reply-To: <c65b682c-5520-4814-a6e3-42a8d39e2060@mailbox.org>
[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]
On Mon, Sep 29, 2025 at 03:27:19PM +0200, Marek Vasut wrote:
> On 9/29/25 11:11 AM, Andrew Goodbody wrote:
> > In dwc3_ep0_complete_data there is a test for 'r' being null and the
> > code will return at that point if so. After that point 'r' is guaranteed
> > to not be null and testing for that is redundant. Remove the test for
> > 'r' being non-null.
>
> If you really want to make this obvious, use git send-email -U20 or some
> such, this will add more context into the diff and include the relevant
> part:
>
> 793 r = next_request(&ep0->request_list);
> 794 if (!r)
> 795 return;
> ^^^^^^^^^^^^^^^
> 796
> 797 dwc3_flush_cache((uintptr_t)trb, sizeof(*trb));
> 798
> 799 status = DWC3_TRB_SIZE_TRBSTS(trb->size);
> 800 if (status == DWC3_TRBSTS_SETUP_PENDING) {
> 801 dev_dbg(dwc->dev, "Setup Pending received");
> 802
> 803 if (r)
> 804 dwc3_gadget_giveback(ep0, r, -ECONNRESET);
>
> Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
FWIW, to me updating the amount of context in a sent patch is a style
choice. Yes, just a few more lines in this case would make it clear but
in lots of other cases to review you need to look at the whole function
anyhow (and sometimes catch other issues / places to refactor things for
clarity, ie the pfuze100 patch thread).
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2025-09-29 14:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-29 9:11 [PATCH RESEND] usb: dwc3: Remove redundant test Andrew Goodbody
2025-09-29 13:27 ` Marek Vasut
2025-09-29 14:10 ` Tom Rini [this message]
2025-09-30 7:47 ` Mattijs Korpershoek
2025-09-30 9:55 ` Mattijs Korpershoek
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=20250929141017.GD6093@bill-the-cat \
--to=trini@konsulko.com \
--cc=andrew.goodbody@linaro.org \
--cc=anshuld@ti.com \
--cc=marek.vasut@mailbox.org \
--cc=mkorpershoek@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.