All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Kennedy <ryan5544@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	mathias.nyman@intel.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] usb: pci-quirks: Minor cleanup for AMD PLL quirk
Date: Fri, 5 Jul 2019 21:29:41 -0400	[thread overview]
Message-ID: <CAJRN7XOzk03s6k+EpLKxE6g-7-EeSZ9JxMF9Jphe24vXHktTKQ@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1907051504310.1606-100000@iolanthe.rowland.org>

On Fri, Jul 5, 2019 at 3:10 PM Alan Stern <stern@rowland.harvard.edu> wrote:
>
> On Thu, 4 Jul 2019, Ryan Kennedy wrote:
>
> > usb_amd_find_chipset_info() is used for chipset detection for
> > several quirks. It is strange that its return value indicates
> > the need for the PLL quirk, which means it is often ignored.
> > This patch adds a function specifically for checking the PLL
> > quirk like the other ones. Additionally, rename probe_result to
> > something more appropriate.
> >
> > Signed-off-by: Ryan Kennedy <ryan5544@gmail.com>
>
> > @@ -322,6 +317,13 @@ bool usb_amd_prefetch_quirk(void)
> >  }
> >  EXPORT_SYMBOL_GPL(usb_amd_prefetch_quirk);
> >
> > +bool usb_amd_quirk_pll_check(void)
> > +{
> > +     usb_amd_find_chipset_info();
> > +     return amd_chipset.need_pll_quirk;
> > +}
> > +EXPORT_SYMBOL_GPL(usb_amd_quirk_pll_check);
>
> I really don't see the point of separating out all but one line into a
> different function.  You might as well just rename
> usb_amd_find_chipset_info to usb_amd_quirk_pll_check (along with the
> other code adjustments) and be done with it.

I did this for consistency with the others:

usb_amd_prefetch_quirk()
usb_amd_hang_symptom_quirk()
usb_hcd_amd_remote_wakeup_quirk()

They all need to ensure the chipset information exists then decide if
the particular quirk should be applied to the chipset.

Ryan

>
> However, in the end I don't care if you still want to do this.  Either
> way:
>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
>
> Alan Stern
>

      reply	other threads:[~2019-07-06  1:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04 15:35 [PATCH 0/2] usb: pci-quirks: AMD PLL quirk fix Ryan Kennedy
2019-07-04 15:35 ` [PATCH 1/2] usb: pci-quirks: Correct AMD PLL quirk detection Ryan Kennedy
2019-07-05  5:22   ` Greg KH
2019-07-05 14:48     ` Ryan Kennedy
2019-07-05 19:04   ` Alan Stern
2019-07-04 15:35 ` [PATCH 2/2] usb: pci-quirks: Minor cleanup for AMD PLL quirk Ryan Kennedy
2019-07-05 19:10   ` Alan Stern
2019-07-06  1:29     ` Ryan Kennedy [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=CAJRN7XOzk03s6k+EpLKxE6g-7-EeSZ9JxMF9Jphe24vXHktTKQ@mail.gmail.com \
    --to=ryan5544@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=stern@rowland.harvard.edu \
    /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.