All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kars Mulder" <kerneldev@karsmulder.nl>
To: "Pavel Machek" <pavel@denx.de>
Cc: gregkh@linuxfoundation.org, stern@rowland.harvard.edu,
	kai.heng.feng@canonical.com, johan@kernel.org,
	tomasz@meresinski.eu, jonathan@jdcox.net,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: quirks: simplify quirk handling.
Date: Wed, 23 Sep 2020 18:28:52 +0200	[thread overview]
Message-ID: <2f89-5f6b7800-e1-5029548@258698125> (raw)
In-Reply-To: <20200921113039.GA19862@duo.ucw.cz>

On Monday, September 21, 2020 13:30 CEST, Pavel Machek <pavel@denx.de> wrote: 
> Simplify quirk handling.

This patch seems to contain two different "simplifications" in one.
I have no objections against the first simplification:

-	if (quirk_list) {
-		kfree(quirk_list);
-		quirk_list = NULL;
-	}
-
+	kfree(quirk_list);
 	quirk_list = kcalloc(quirk_count, sizeof(struct quirk_entry),
 			     GFP_KERNEL);

Since kfree() does nothing to nullpointers, all lines that are cut seem
to be superfluous.

The second simplification does not seem to introduce any new bugs as far
as I can tell. Due to lack of experience, I shall refrain from commenting
on whether or not it simplifies things.


      parent reply	other threads:[~2020-09-23 16:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21 11:30 [PATCH] USB: quirks: simplify quirk handling Pavel Machek
2020-09-21 11:38 ` Greg KH
2020-09-21 11:47   ` Pavel Machek
2020-09-21 11:52     ` Greg KH
2020-09-23 16:28 ` Kars Mulder [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=2f89-5f6b7800-e1-5029548@258698125 \
    --to=kerneldev@karsmulder.nl \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=jonathan@jdcox.net \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pavel@denx.de \
    --cc=stern@rowland.harvard.edu \
    --cc=tomasz@meresinski.eu \
    /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.