[PATCH] leds: pwm: fix max_brightness works abnormal when active_low

2019-02-10 Thread Yisheng Xie
When leds-pwm is active_low, smaller number of duty kept in led_dat means less brighness, so we should disable pwm when led_dat->duty is equal to period instead of zero, which means max_brightness. Signed-off-by: Yisheng Xie --- drivers/leds/leds-pwm.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH v4 21/21] sparc64: use match_string() helper

2018-06-20 Thread Yisheng Xie
: "David S. Miller" Cc: Anthony Yznaga Cc: Pavel Tatashin Cc: sparcli...@vger.kernel.org Signed-off-by: Yisheng Xie --- arch/sparc/kernel/setup_64.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kerne

[PATCH v4 21/21] sparc64: use match_string() helper

2018-06-20 Thread Yisheng Xie
: "David S. Miller" Cc: Anthony Yznaga Cc: Pavel Tatashin Cc: sparcli...@vger.kernel.org Signed-off-by: Yisheng Xie --- arch/sparc/kernel/setup_64.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kerne

Re: [PATCH v3 21/21] sparc64: use match_string() helper

2018-06-20 Thread Yisheng Xie
Hi Andy, Sorry for late response. I will take your suggestion in next version. Thanks Yisheng On 2018/6/6 13:01, Andy Shevchenko wrote: > On Wed, Jun 6, 2018 at 5:19 AM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can

Re: [PATCH v3 21/21] sparc64: use match_string() helper

2018-06-20 Thread Yisheng Xie
Hi Andy, Sorry for late response. I will take your suggestion in next version. Thanks Yisheng On 2018/6/6 13:01, Andy Shevchenko wrote: > On Wed, Jun 6, 2018 at 5:19 AM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can

[PATCH v3 03/21] Staging: gdm724x: use match_string() helper

2018-06-05 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Greg Kroah-Hartman Cc: Quytelda Kahja Cc: de...@driverdev.osuosl.org Signed-off-by: Yisheng Xie --- v3: - no need to check input tty's index - per Greg v2: - const

[PATCH v3 03/21] Staging: gdm724x: use match_string() helper

2018-06-05 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Greg Kroah-Hartman Cc: Quytelda Kahja Cc: de...@driverdev.osuosl.org Signed-off-by: Yisheng Xie --- v3: - no need to check input tty's index - per Greg v2: - const

[PATCH v3 21/21] sparc64: use match_string() helper

2018-06-05 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: "David S. Miller" Cc: Anthony Yznaga Cc: Pavel Tatashin Cc: sparcli...@vger.kernel.org Signed-off-by: Yisheng Xie --- v3: - add string literal instead of NULL

[PATCH v3 21/21] sparc64: use match_string() helper

2018-06-05 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: "David S. Miller" Cc: Anthony Yznaga Cc: Pavel Tatashin Cc: sparcli...@vger.kernel.org Signed-off-by: Yisheng Xie --- v3: - add string literal instead of NULL

Re: [PATCH v3 1/2] PCI: Avoid panic when PCI IO resource's size is not page aligned

2018-06-05 Thread Yisheng Xie
Hi Bjorn, On 2018/6/6 7:53, Bjorn Helgaas wrote: > On Tue, May 29, 2018 at 08:18:18PM +0800, Yisheng Xie wrote: >> Zhou reported a bug on Hisilicon arm64 D06 platform with 64KB page size: >> >> [2.470908] kernel BUG at lib/ioremap.c:72! >> [2.475079] Intern

Re: [PATCH v3 1/2] PCI: Avoid panic when PCI IO resource's size is not page aligned

2018-06-05 Thread Yisheng Xie
Hi Bjorn, On 2018/6/6 7:53, Bjorn Helgaas wrote: > On Tue, May 29, 2018 at 08:18:18PM +0800, Yisheng Xie wrote: >> Zhou reported a bug on Hisilicon arm64 D06 platform with 64KB page size: >> >> [2.470908] kernel BUG at lib/ioremap.c:72! >> [2.475079] Intern

Re: [PATCH v2 21/21] sparc64: use match_string() helper

2018-06-05 Thread Yisheng Xie
Hi Andy, On 2018/6/4 18:06, Andy Shevchenko wrote: > On Mon, Jun 4, 2018 at 4:06 AM, Yisheng Xie wrote: >> Hi Andy, >> >> On 2018/6/1 19:34, Andy Shevchenko wrote: >>> On Thu, May 31, 2018 at 2:11 PM, Yisheng Xie wrote: >>>> match_string() returns t

Re: [PATCH v2 21/21] sparc64: use match_string() helper

2018-06-05 Thread Yisheng Xie
Hi Andy, On 2018/6/4 18:06, Andy Shevchenko wrote: > On Mon, Jun 4, 2018 at 4:06 AM, Yisheng Xie wrote: >> Hi Andy, >> >> On 2018/6/1 19:34, Andy Shevchenko wrote: >>> On Thu, May 31, 2018 at 2:11 PM, Yisheng Xie wrote: >>>> match_string() returns t

Re: [PATCH v2 02/21] mfd: omap-usb-host: use match_string() helper

2018-06-04 Thread Yisheng Xie
Hi Lee, On 2018/6/4 15:44, Lee Jones wrote: > On Thu, 31 May 2018, Yisheng Xie wrote: > >> match_string() returns the index of an array for a matching string, >> which can be used instead of open coded variant. >> >> Acked-by: Tony Lindgren >> Reviewed-by: A

Re: [PATCH v2 02/21] mfd: omap-usb-host: use match_string() helper

2018-06-04 Thread Yisheng Xie
Hi Lee, On 2018/6/4 15:44, Lee Jones wrote: > On Thu, 31 May 2018, Yisheng Xie wrote: > >> match_string() returns the index of an array for a matching string, >> which can be used instead of open coded variant. >> >> Acked-by: Tony Lindgren >> Reviewed-by: A

Re: [PATCH v2 21/21] sparc64: use match_string() helper

2018-06-03 Thread Yisheng Xie
Hi Andy, On 2018/6/1 19:34, Andy Shevchenko wrote: > On Thu, May 31, 2018 at 2:11 PM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used instead of open coded variant. > >> @@ -512,10 +512,9 @@ sta

Re: [PATCH v2 21/21] sparc64: use match_string() helper

2018-06-03 Thread Yisheng Xie
Hi Andy, On 2018/6/1 19:34, Andy Shevchenko wrote: > On Thu, May 31, 2018 at 2:11 PM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used instead of open coded variant. > >> @@ -512,10 +512,9 @@ sta

Re: [PATCH v2 19/21] bcache: use match_string() helper

2018-05-31 Thread Yisheng Xie
Hi Coly, On 2018/6/1 11:45, Coly Li wrote: > On 2018/5/31 7:11 PM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used instead of open coded variant. >> >> Cc: Kent Overstreet >> Cc: linux-bca.

Re: [PATCH v2 19/21] bcache: use match_string() helper

2018-05-31 Thread Yisheng Xie
Hi Coly, On 2018/6/1 11:45, Coly Li wrote: > On 2018/5/31 7:11 PM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used instead of open coded variant. >> >> Cc: Kent Overstreet >> Cc: linux-bca.

Re: [PATCH v2 16/21] ASoC: max98088: use match_string() helper

2018-05-31 Thread Yisheng Xie
Hi Mark, On 2018/6/1 0:02, Mark Brown wrote: > On Thu, May 31, 2018 at 08:25:39PM +0800, Yisheng Xie wrote: > >> Anyway, Here is the cover letter of v1 and I have add v2's cover letter to >> you: >> https://lkml.org/lkml/2018/5/21/303 > >> Each patch i

Re: [PATCH v2 16/21] ASoC: max98088: use match_string() helper

2018-05-31 Thread Yisheng Xie
Hi Mark, On 2018/6/1 0:02, Mark Brown wrote: > On Thu, May 31, 2018 at 08:25:39PM +0800, Yisheng Xie wrote: > >> Anyway, Here is the cover letter of v1 and I have add v2's cover letter to >> you: >> https://lkml.org/lkml/2018/5/21/303 > >> Each patch i

Re: [PATCH v2 16/21] ASoC: max98088: use match_string() helper

2018-05-31 Thread Yisheng Xie
Hi Mark, On 2018/5/31 19:49, Mark Brown wrote: > On Thu, May 31, 2018 at 07:11:21PM +0800, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used instead of open coded variant. > > I don't have either the cov

Re: [PATCH v2 16/21] ASoC: max98088: use match_string() helper

2018-05-31 Thread Yisheng Xie
Hi Mark, On 2018/5/31 19:49, Mark Brown wrote: > On Thu, May 31, 2018 at 07:11:21PM +0800, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used instead of open coded variant. > > I don't have either the cov

Re: [PATCH v2 00/21] use match_string() helper

2018-05-31 Thread Yisheng Xie
+ Mark On 2018/5/31 19:11, Yisheng Xie wrote: > Andy introduce helper function match_string() which can be used to return > the index of array for a matching string. so we can use it in many places > instead of open coded variant. > > I just try to make this API be used more

Re: [PATCH v2 00/21] use match_string() helper

2018-05-31 Thread Yisheng Xie
+ Mark On 2018/5/31 19:11, Yisheng Xie wrote: > Andy introduce helper function match_string() which can be used to return > the index of array for a matching string. so we can use it in many places > instead of open coded variant. > > I just try to make this API be used more

Re: [PATCH v2 03/21] Staging: gdm724x: use match_string() helper

2018-05-31 Thread Yisheng Xie
Hi Greg, On 2018/5/31 19:44, Greg Kroah-Hartman wrote: > On Thu, May 31, 2018 at 07:11:08PM +0800, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used instead of open coded variant. >> >> Cc: Greg Kroah-Har

Re: [PATCH v2 03/21] Staging: gdm724x: use match_string() helper

2018-05-31 Thread Yisheng Xie
Hi Greg, On 2018/5/31 19:44, Greg Kroah-Hartman wrote: > On Thu, May 31, 2018 at 07:11:08PM +0800, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used instead of open coded variant. >> >> Cc: Greg Kroah-Har

[PATCH v2 03/21] Staging: gdm724x: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Greg Kroah-Hartman Cc: Quytelda Kahja Cc: de...@driverdev.osuosl.org Signed-off-by: Yisheng Xie --- v2: - const DRIVER_STRING instead - per Andy drivers/staging/gdm724x

[PATCH v2 03/21] Staging: gdm724x: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Greg Kroah-Hartman Cc: Quytelda Kahja Cc: de...@driverdev.osuosl.org Signed-off-by: Yisheng Xie --- v2: - const DRIVER_STRING instead - per Andy drivers/staging/gdm724x

[PATCH v2 02/21] mfd: omap-usb-host: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Acked-by: Tony Lindgren Reviewed-by: Andy Shevchenko Cc: Tony Lindgren Cc: Lee Jones Cc: linux-o...@vger.kernel.org Signed-off-by: Yisheng Xie --- v2: - add Acked

[PATCH v2 02/21] mfd: omap-usb-host: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Acked-by: Tony Lindgren Reviewed-by: Andy Shevchenko Cc: Tony Lindgren Cc: Lee Jones Cc: linux-o...@vger.kernel.org Signed-off-by: Yisheng Xie --- v2: - add Acked

[PATCH v2 00/21] use match_string() helper

2018-05-31 Thread Yisheng Xie
the Patches which Andy already sent out, or maintainer already picked up. - Add Reviewed-by or Acked-by tags for some patchs. - Add some new patches[19-21]. Yisheng Xie (21): usb: phy: use match_string() helper mfd: omap-usb-host: use match_string() helper Staging: gdm724x: use match_string

[PATCH v2 09/21] clk: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-...@vger.kernel.org Signed-off-by: Yisheng Xie --- v2: - leave second parameter on the first line - per Andy drivers/clk

[PATCH v2 09/21] clk: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-...@vger.kernel.org Signed-off-by: Yisheng Xie --- v2: - leave second parameter on the first line - per Andy drivers/clk

[PATCH v2 00/21] use match_string() helper

2018-05-31 Thread Yisheng Xie
the Patches which Andy already sent out, or maintainer already picked up. - Add Reviewed-by or Acked-by tags for some patchs. - Add some new patches[19-21]. Yisheng Xie (21): usb: phy: use match_string() helper mfd: omap-usb-host: use match_string() helper Staging: gdm724x: use match_string

[PATCH v2 13/21] ima: use match_string() helper

2018-05-31 Thread Yisheng Xie
Cc: linux-security-mod...@vger.kernel.org Signed-off-by: Yisheng Xie --- v2: - add Reviewed-by tag. security/integrity/ima/ima_main.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 74d0bd

[PATCH v2 13/21] ima: use match_string() helper

2018-05-31 Thread Yisheng Xie
Cc: linux-security-mod...@vger.kernel.org Signed-off-by: Yisheng Xie --- v2: - add Reviewed-by tag. security/integrity/ima/ima_main.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 74d0bd

[PATCH v2 08/21] clk: bcm2835: use match_string() helper

2018-05-31 Thread Yisheng Xie
: linux-arm-ker...@lists.infradead.org Signed-off-by: Yisheng Xie --- v2: - donot change the type of i - per Andy drivers/clk/bcm/clk-bcm2835.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index

[PATCH v2 08/21] clk: bcm2835: use match_string() helper

2018-05-31 Thread Yisheng Xie
: linux-arm-ker...@lists.infradead.org Signed-off-by: Yisheng Xie --- v2: - donot change the type of i - per Andy drivers/clk/bcm/clk-bcm2835.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index

[PATCH v2 10/21] cpufreq: intel_pstate: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Reviewed-by: Andy Shevchenko Cc: Srinivas Pandruvada Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: linux...@vger.kernel.org Signed-off-by: Yisheng X

[PATCH v2 04/21] cxgb4: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Ganesh Goudar Cc: net...@vger.kernel.org Signed-off-by: Yisheng Xie --- v2: - no change from v1. drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 14 -- 1 file

[PATCH v2 14/21] sched/debug: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Yisheng Xie --- v2: - rename i to ret to show the change in returned value meaning - per Andy kernel/sched/debug.c | 31

[PATCH v2 10/21] cpufreq: intel_pstate: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Reviewed-by: Andy Shevchenko Cc: Srinivas Pandruvada Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: linux...@vger.kernel.org Signed-off-by: Yisheng X

[PATCH v2 04/21] cxgb4: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Ganesh Goudar Cc: net...@vger.kernel.org Signed-off-by: Yisheng Xie --- v2: - no change from v1. drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 14 -- 1 file

[PATCH v2 14/21] sched/debug: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Yisheng Xie --- v2: - rename i to ret to show the change in returned value meaning - per Andy kernel/sched/debug.c | 31

[PATCH v2 07/21] bus: fsl-mc: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Reviewed-by: Andy Shevchenko Cc: Stuart Yoder Cc: Laurentiu Tudor Signed-off-by: Yisheng Xie --- v2: - add Reviewed-by tag. drivers/bus/fsl-mc/fsl-mc-allocator.c | 24

[PATCH v2 07/21] bus: fsl-mc: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Reviewed-by: Andy Shevchenko Cc: Stuart Yoder Cc: Laurentiu Tudor Signed-off-by: Yisheng Xie --- v2: - add Reviewed-by tag. drivers/bus/fsl-mc/fsl-mc-allocator.c | 24

[PATCH v2 21/21] sparc64: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: "David S. Miller" Cc: Anthony Yznaga Cc: Pavel Tatashin Cc: sparcli...@vger.kernel.org Signed-off-by: Yisheng Xie --- arch/sparc/kernel/setup_64.c | 7 +++--

[PATCH v2 21/21] sparc64: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: "David S. Miller" Cc: Anthony Yznaga Cc: Pavel Tatashin Cc: sparcli...@vger.kernel.org Signed-off-by: Yisheng Xie --- arch/sparc/kernel/setup_64.c | 7 +++--

[PATCH v2 15/21] ALSA: oxygen: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Clemens Ladisch Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-de...@alsa-project.org Signed-off-by: Yisheng Xie --- v2: - do not change the type of i - per Andy sound

[PATCH v2 18/21] ASoC: dapm: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Reviewed-by: Andy Shevchenko Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-de...@alsa-project.org Signed-off-by: Yisheng Xie --- v2: - add

[PATCH v2 17/21] ASoC: max98095: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-de...@alsa-project.org Signed-off-by: Yisheng Xie --- v2: - split ret= and move assignment

[PATCH v2 15/21] ALSA: oxygen: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Clemens Ladisch Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-de...@alsa-project.org Signed-off-by: Yisheng Xie --- v2: - do not change the type of i - per Andy sound

[PATCH v2 18/21] ASoC: dapm: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Reviewed-by: Andy Shevchenko Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-de...@alsa-project.org Signed-off-by: Yisheng Xie --- v2: - add

[PATCH v2 17/21] ASoC: max98095: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-de...@alsa-project.org Signed-off-by: Yisheng Xie --- v2: - split ret= and move assignment

[PATCH v2 19/21] bcache: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Kent Overstreet Cc: linux-bca...@vger.kernel.org Signed-off-by: Yisheng Xie --- drivers/md/bcache/util.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions

[PATCH v2 19/21] bcache: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Kent Overstreet Cc: linux-bca...@vger.kernel.org Signed-off-by: Yisheng Xie --- drivers/md/bcache/util.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions

[PATCH v2 16/21] ASoC: max98088: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-de...@alsa-project.org Signed-off-by: Yisheng Xie --- v2: - split ret=xxx and move assignment

[PATCH v2 20/21] powerpc/xmon: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-...@lists.ozlabs.org Signed-off-by: Yisheng Xie --- arch/powerpc/xmon/xmon.c | 23

[PATCH v2 16/21] ASoC: max98088: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-de...@alsa-project.org Signed-off-by: Yisheng Xie --- v2: - split ret=xxx and move assignment

[PATCH v2 20/21] powerpc/xmon: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-...@lists.ozlabs.org Signed-off-by: Yisheng Xie --- arch/powerpc/xmon/xmon.c | 23

[PATCH v3 2/2] PCI: Check phys_addr for pci_remap_iospace

2018-05-29 Thread Yisheng Xie
y: Zhou Wang Signed-off-by: Yisheng Xie --- drivers/pci/pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 0eb0381..117ca6a 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -3547,6 +3547,9 @@ int pci_remap_iospace(const struct r

[PATCH v3 2/2] PCI: Check phys_addr for pci_remap_iospace

2018-05-29 Thread Yisheng Xie
y: Zhou Wang Signed-off-by: Yisheng Xie --- drivers/pci/pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 0eb0381..117ca6a 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -3547,6 +3547,9 @@ int pci_remap_iospace(const struct r

[PATCH v3 1/2] PCI: Avoid panic when PCI IO resource's size is not page aligned

2018-05-29 Thread Yisheng Xie
jun Tan Signed-off-by: Yisheng Xie --- v3: - pci_remap_iospace() sanitize its arguments instead - per Rafael v2: - Let the caller of ioremap_page_range() align the request by PAGE_SIZE - per Toshi drivers/pci/pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/pci.c b/dr

[PATCH v3 1/2] PCI: Avoid panic when PCI IO resource's size is not page aligned

2018-05-29 Thread Yisheng Xie
jun Tan Signed-off-by: Yisheng Xie --- v3: - pci_remap_iospace() sanitize its arguments instead - per Rafael v2: - Let the caller of ioremap_page_range() align the request by PAGE_SIZE - per Toshi drivers/pci/pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/pci.c b/dr

Re: [PATCH 19/33] thermal: db8500: use match_string() helper

2018-05-23 Thread Yisheng Xie
Hi Andy, On 2018/5/22 6:00, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie <xieyishe...@huawei.com> wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. > >> +

Re: [PATCH 19/33] thermal: db8500: use match_string() helper

2018-05-23 Thread Yisheng Xie
Hi Andy, On 2018/5/22 6:00, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. > >> + i = match_string((const char

Re: [PATCH 31/33] ASoC: max98088: use match_string() helper

2018-05-22 Thread Yisheng Xie
Hi Andy, On 2018/5/22 6:24, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:58 PM, Yisheng Xie <xieyishe...@huawei.com> wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. > >> static i

Re: [PATCH 31/33] ASoC: max98088: use match_string() helper

2018-05-22 Thread Yisheng Xie
Hi Andy, On 2018/5/22 6:24, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:58 PM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. > >> static int max98088_get_channel(

Re: [PATCH 27/33] sched/debug: use match_string() helper

2018-05-22 Thread Yisheng Xie
Hi Andy, On 2018/5/22 6:13, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:58 PM, Yisheng Xie <xieyishe...@huawei.com> wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. >> >>

Re: [PATCH 27/33] sched/debug: use match_string() helper

2018-05-22 Thread Yisheng Xie
Hi Andy, On 2018/5/22 6:13, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:58 PM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. >> >> Cc: Ingo Molnar >>

Re: [PATCH 01/33] usb: phy: use match_string() helper

2018-05-22 Thread Yisheng Xie
Hi, On 2018/5/22 18:02, Greg Kroah-Hartman wrote: > On Tue, May 22, 2018 at 01:20:01AM +0300, Andy Shevchenko wrote: >> On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie <xieyishe...@huawei.com> wrote: >>> match_string() returns the index of an array for a matching string, >

Re: [PATCH 01/33] usb: phy: use match_string() helper

2018-05-22 Thread Yisheng Xie
Hi, On 2018/5/22 18:02, Greg Kroah-Hartman wrote: > On Tue, May 22, 2018 at 01:20:01AM +0300, Andy Shevchenko wrote: >> On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie wrote: >>> match_string() returns the index of an array for a matching string, >>> which can be used i

Re: [PATCH 22/33] drm/i915: use match_string() helper

2018-05-22 Thread Yisheng Xie
Hi Jani, On 2018/5/22 16:36, Jani Nikula wrote: > On Tue, 22 May 2018, Andy Shevchenko <andy.shevche...@gmail.com> wrote: >> On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie <xieyishe...@huawei.com> wrote: >>> match_string() returns the index of an array for a matching

Re: [PATCH 22/33] drm/i915: use match_string() helper

2018-05-22 Thread Yisheng Xie
Hi Jani, On 2018/5/22 16:36, Jani Nikula wrote: > On Tue, 22 May 2018, Andy Shevchenko wrote: >> On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie wrote: >>> match_string() returns the index of an array for a matching string, >>> which can be used intead of open

Re: [PATCH 12/33] clk: bcm2835: use match_string() helper

2018-05-21 Thread Yisheng Xie
Hi Andy, On 2018/5/22 5:50, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie <xieyishe...@huawei.com> wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. >> >&g

Re: [PATCH 12/33] clk: bcm2835: use match_string() helper

2018-05-21 Thread Yisheng Xie
Hi Andy, On 2018/5/22 5:50, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. >> >> Cc: Michael Turquette >> Cc:

Re: [PATCH 07/33] iwlwifi: mvm: use match_string() helper

2018-05-21 Thread Yisheng Xie
Hi Andy, On 2018/5/22 5:43, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie <xieyishe...@huawei.com> wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. > >>

Re: [PATCH 07/33] iwlwifi: mvm: use match_string() helper

2018-05-21 Thread Yisheng Xie
Hi Andy, On 2018/5/22 5:43, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. > >> in

Re: [PATCH 26/33] apparmor: use match_string() helper

2018-05-21 Thread Yisheng Xie
Hi John, On 2018/5/21 23:33, John Johansen wrote: > On 05/21/2018 04:58 AM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. >> > > Andy Shevchenko patch to do the same thing

Re: [PATCH 26/33] apparmor: use match_string() helper

2018-05-21 Thread Yisheng Xie
Hi John, On 2018/5/21 23:33, John Johansen wrote: > On 05/21/2018 04:58 AM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. >> > > Andy Shevchenko patch to do the same thing

Re: [PATCH 05/33] cxgb4: use match_string() helper

2018-05-21 Thread Yisheng Xie
Hi Andy, On 2018/5/22 5:39, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie <xieyishe...@huawei.com> wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. > >> -

Re: [PATCH 05/33] cxgb4: use match_string() helper

2018-05-21 Thread Yisheng Xie
Hi Andy, On 2018/5/22 5:39, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. > >> - for (i = 0; i <

Re: [PATCH 00/33] use match_string() helper

2018-05-21 Thread Yisheng Xie
Hi Andy, On 2018/5/22 6:27, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie <xieyishe...@huawei.com> wrote: >> Andy introduce helper function match_string() which can be used to return >> the index of array for a matching string. so we can use it in

Re: [PATCH 00/33] use match_string() helper

2018-05-21 Thread Yisheng Xie
Hi Andy, On 2018/5/22 6:27, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie wrote: >> Andy introduce helper function match_string() which can be used to return >> the index of array for a matching string. so we can use it in many places >> intead

Re: [PATCH] intel_th: pti: Convert to use sysfs_match_string() helper

2018-05-21 Thread Yisheng Xie
Hi Andy, On 2018/5/22 6:16, Andy Shevchenko wrote: > On Wed, May 16, 2018 at 12:15 PM, Yisheng Xie <xieyishe...@huawei.com> wrote: >> The helper returns index of the matching string in an array, >> use it to simpler the code. > > IIRC I sent the patch with the sa

Re: [PATCH] intel_th: pti: Convert to use sysfs_match_string() helper

2018-05-21 Thread Yisheng Xie
Hi Andy, On 2018/5/22 6:16, Andy Shevchenko wrote: > On Wed, May 16, 2018 at 12:15 PM, Yisheng Xie wrote: >> The helper returns index of the matching string in an array, >> use it to simpler the code. > > IIRC I sent the patch with the same semantics week or so ago against

[PATCH 07/33] iwlwifi: mvm: use match_string() helper

2018-05-21 Thread Yisheng Xie
el.grumb...@intel.com> Cc: linux-wirel...@vger.kernel.org Cc: net...@vger.kernel.org Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/

[PATCH 07/33] iwlwifi: mvm: use match_string() helper

2018-05-21 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Kalle Valo Cc: Intel Linux Wireless Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: linux-wirel...@vger.kernel.org Cc: net...@vger.kernel.org Signed-off-by: Yisheng Xie

[PATCH 01/33] usb: phy: use match_string() helper

2018-05-21 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: linux-...@vger.kernel.org Cc: Felipe Balbi <ba...@kernel.org> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Yisheng Xie <xieyish

[PATCH 00/33] use match_string() helper

2018-05-21 Thread Yisheng Xie
Andy introduce helper function match_string() which can be used to return the index of array for a matching string. so we can use it in many places intead of open coded variant. I just try to make this API be used more commonly, sorry if this makes too much big patchset. Yisheng Xie (33): usb

[PATCH 01/33] usb: phy: use match_string() helper

2018-05-21 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: linux-...@vger.kernel.org Cc: Felipe Balbi Cc: Greg Kroah-Hartman Signed-off-by: Yisheng Xie --- drivers/usb/phy/of.c | 12 +--- 1 file changed, 5 insertions(+), 7

[PATCH 00/33] use match_string() helper

2018-05-21 Thread Yisheng Xie
Andy introduce helper function match_string() which can be used to return the index of array for a matching string. so we can use it in many places intead of open coded variant. I just try to make this API be used more commonly, sorry if this makes too much big patchset. Yisheng Xie (33): usb

[PATCH 14/33] clk: use match_string() helper

2018-05-21 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Michael Turquette <mturque...@baylibre.com> Cc: Stephen Boyd <sb...@kernel.org> Cc: linux-...@vger.kernel.org Signed-off-by: Yisheng Xie <xieyishe...@huawei.co

[PATCH 14/33] clk: use match_string() helper

2018-05-21 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-...@vger.kernel.org Signed-off-by: Yisheng Xie --- drivers/clk/clk.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions

[PATCH 16/33] mmc: sdhci-xenon: use match_string() helper

2018-05-21 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Adrian Hunter <adrian.hun...@intel.com> Cc: Hu Ziji <huz...@marvell.com> Cc: Ulf Hansson <ulf.hans...@linaro.org> Cc: linux-...@vger.kernel.org Signed-o

[PATCH 11/33] bus: fsl-mc: use match_string() helper

2018-05-21 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Stuart Yoder <stuyo...@gmail.com> Cc: Laurentiu Tudor <laurentiu.tu...@nxp.com> Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/bus/fsl-mc/

[PATCH 16/33] mmc: sdhci-xenon: use match_string() helper

2018-05-21 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Adrian Hunter Cc: Hu Ziji Cc: Ulf Hansson Cc: linux-...@vger.kernel.org Signed-off-by: Yisheng Xie --- drivers/mmc/host/sdhci-xenon-phy.c | 11 +++ 1 file changed

[PATCH 11/33] bus: fsl-mc: use match_string() helper

2018-05-21 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Stuart Yoder Cc: Laurentiu Tudor Signed-off-by: Yisheng Xie --- drivers/bus/fsl-mc/fsl-mc-allocator.c | 24 +--- 1 file changed, 5 insertions(+), 19

[PATCH 17/33] pinctrl: armada-37xx: use match_string() helper

2018-05-21 Thread Yisheng Xie
hesselba...@gmail.com> Cc: Linus Walleij <linus.wall...@linaro.org> Cc: linux-arm-ker...@lists.infradead.org Cc: linux-g...@vger.kernel.org Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 16 ++-- 1 file changed, 2

  1   2   3   4   5   6   7   8   9   >