On Fri, Aug 03, 2018 at 12:51:37PM +0300, Andy Shevchenko wrote: > The commit > > 4cec16861a40 ("PCI/ASPM: Convert to use match_string() helper") > > didn't take into consideration small but crucial detail about scope of > usage, i.e. sysfs interface provided to handle the ASPM policy. Due to > this in most of the cases input string comes with a new line symbol. > > Use sysfs_match_string() helper to take into account above. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > Reported-by: Heiner Kallweit <hkallweit1@xxxxxxxxx> > Fixes: 4cec16861a40 ("PCI/ASPM: Convert to use match_string() helper") Folded into original patch on pci/aspm for v4.19, thanks! > --- > drivers/pci/pcie/aspm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c > index 0e88b3ad065f..5326916715d2 100644 > --- a/drivers/pci/pcie/aspm.c > +++ b/drivers/pci/pcie/aspm.c > @@ -1127,7 +1127,7 @@ static int pcie_aspm_set_policy(const char *val, > > if (aspm_disabled) > return -EPERM; > - i = match_string(policy_str, ARRAY_SIZE(policy_str), val); > + i = sysfs_match_string(policy_str, val); > if (i < 0) > return i; > if (i == aspm_policy) > -- > 2.18.0 >