All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Rosen Penev <rosenp@gmail.com>
Cc: linux-usb@vger.kernel.org, Bastien Nocera <hadess@hadess.net>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: apple-mfi-fastcharge: Convert to devm resources
Date: Sun, 14 Jun 2026 05:56:36 +0200	[thread overview]
Message-ID: <2026061448-gab-platter-199a@gregkh> (raw)
In-Reply-To: <CAKxU2N9BLP+H6-Xvu1gX6_Z8jhowAbn60=odyssUhio6XQHmvQ@mail.gmail.com>

On Sat, Jun 13, 2026 at 08:45:02PM -0700, Rosen Penev wrote:
> On Sat, Jun 13, 2026 at 8:41 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Sat, Jun 13, 2026 at 01:18:51PM -0700, Rosen Penev wrote:
> > > Use devm_kzalloc(), devm_kasprintf(), and devm_power_supply_register()
> > > to let the driver core handle resource cleanup. This allows removing
> > > the mfi_fc_disconnect() function and the error labels in probe.
> >
> > Please don't do this on old drivers unless you have the hardware to test
> > that the change worked properly.
> iPhones? I have those. I also have a USB power meter.

And did you test this change out with all of that?  If you do, please
say so.

But again, there is no need to change existing code to use devm_* calls
unless it fixes a bug.  devm can be tricky and is not always a good
idea.

thanks,

greg k-h

      reply	other threads:[~2026-06-14  3:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-13 20:18 [PATCH] usb: apple-mfi-fastcharge: Convert to devm resources Rosen Penev
2026-06-14  3:40 ` Greg Kroah-Hartman
2026-06-14  3:45   ` Rosen Penev
2026-06-14  3:56     ` Greg Kroah-Hartman [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=2026061448-gab-platter-199a@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=hadess@hadess.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rosenp@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 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.