linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem with 4cec16861a40 ("PCI/ASPM: Convert to use match_string() helper")
@ 2018-08-02 18:13 Heiner Kallweit
  2018-08-03  9:35 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2018-08-02 18:13 UTC (permalink / raw)
  To: Andy Shevchenko, Bjorn Helgaas; +Cc: linux-pci@vger.kernel.org

I wondered why my system gets warmer than usual and eventually found that
every write to /sys/module/pcie_aspm/parameters/policy returns EINVAL.

Reason is mentioned change, using match_string() is wrong when used with
sysfs because sysfs strings have a trailing newline. Seems like the patch
wasn't tested.
__sysfs_match_string() has to be used instead. I checked and this fixes
the issue. 

Rgds, Heiner

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem with 4cec16861a40 ("PCI/ASPM: Convert to use match_string() helper")
  2018-08-02 18:13 Problem with 4cec16861a40 ("PCI/ASPM: Convert to use match_string() helper") Heiner Kallweit
@ 2018-08-03  9:35 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2018-08-03  9:35 UTC (permalink / raw)
  To: Heiner Kallweit, Bjorn Helgaas; +Cc: linux-pci@vger.kernel.org

On Thu, 2018-08-02 at 20:13 +0200, Heiner Kallweit wrote:
> I wondered why my system gets warmer than usual and eventually found
> that
> every write to /sys/module/pcie_aspm/parameters/policy returns EINVAL.

Thanks for spotting this!
My bad.

> 
> Reason is mentioned change, using match_string() is wrong when used
> with
> sysfs because sysfs strings have a trailing newline.

Not always, but you are right, it has to be \n-aware.

>  Seems like the patch
> wasn't tested.
> __sysfs_match_string() has to be used instead. I checked and this
> fixes
> the issue. 

Yes, it should be sysfs variant.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-03 11:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-02 18:13 Problem with 4cec16861a40 ("PCI/ASPM: Convert to use match_string() helper") Heiner Kallweit
2018-08-03  9:35 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).