All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ard Biesheuvel <ardb@kernel.org>
Cc: linux-usb@vger.kernel.org, kernel@pengutronix.de
Subject: [PATCH 0/2] usb: host: u132-hcd: Two cleanups
Date: Tue, 21 Mar 2023 11:19:09 +0100	[thread overview]
Message-ID: <20230321101911.342538-1-u.kleine-koenig@pengutronix.de> (raw)

Hello,

this driver is horrifying. I made these two cleanups but there is more to do:
 - Drop the explicit kref handling (or at least only do it in one place)
 - Simplify .remove() further (I think at entry ->going should never be > 1 (or
   even > 0?) Also "u132->going++ > 1" means the device is already gone, not
   "being removed".
 - Fix .remove() not to return -ENODEV;
 - I'm sure there is more.

Uwe Kleine-König (2):
  usb: host: u132-hcd: Various style improvements
  usb: host: u132-hcd: Drop if with an always true condition

 drivers/usb/host/u132-hcd.c | 452 +++++++++++++++++++-----------------
 1 file changed, 236 insertions(+), 216 deletions(-)

base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.2


             reply	other threads:[~2023-03-21 10:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-21 10:19 Uwe Kleine-König [this message]
2023-03-21 10:19 ` [PATCH 1/2] usb: host: u132-hcd: Various style improvements Uwe Kleine-König
2023-03-21 10:19 ` [PATCH 2/2] usb: host: u132-hcd: Drop if with an always true condition Uwe Kleine-König

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=20230321101911.342538-1-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=ardb@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-usb@vger.kernel.org \
    /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.