[PATCH v1 1/4] i2c: mpc: Use devm_clk_get_optional()

2021-04-13 Thread Andy Shevchenko
The peripheral clock is optional and we may get an -EPROBE_DEFER error code which would not be propagated correctly, fix this by using devm_clk_get_optional(). Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-mpc.c | 25 - 1 file changed, 12 insertions(+), 13

Re: [PATCH] i2c: I2C_HISI should depend on ARCH_HISI && ACPI

2021-04-13 Thread Andy Shevchenko
On Tue, Apr 13, 2021 at 02:48:15PM +0200, Geert Uytterhoeven wrote: > On Tue, Apr 13, 2021 at 2:37 PM Andy Shevchenko > wrote: > > On Tue, Apr 13, 2021 at 02:26:15PM +0200, Geert Uytterhoeven wrote: > > > The HiSilicon Kunpeng I2C controller is only present on HiSilic

[PATCH v1 4/4] i2c: mpc: Drop duplicate message from devm_platform_ioremap_resource()

2021-04-13 Thread Andy Shevchenko
devm_platform_ioremap_resource() prints a message in case of error. Drop custom one. Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-mpc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index

[PATCH v1 3/4] i2c: mpc: Use device_get_match_data() helper

2021-04-13 Thread Andy Shevchenko
Use the device_get_match_data() helper instead of open coding. Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-mpc.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index 2376accd4e8e

[PATCH v1 2/4] i2c: mpc: Remove CONFIG_PM_SLEEP ifdeffery

2021-04-13 Thread Andy Shevchenko
Use __maybe_unused for the suspend()/resume() hooks and get rid of the CONFIG_PM_SLEEP ifdeffery to improve the code. Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-mpc.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/i2c/busses/i2c-mpc.c b

Re: [PATCH v3 2/4] i2c: mpc: Interrupt driven transfer

2021-04-13 Thread Andy Shevchenko
); > + mpc_i2c_do_intr(i2c, status); > + return IRQ_HANDLED; > } > + return IRQ_NONE; > +} ... > + time_left = wait_event_timeout(i2c->waitq, !i2c->block, > i2c->adap.timeout); > + No need for a blank line here. > + if (!time_left) > + i2c->rc = -ETIMEDOUT; > + else if (time_left < 0) Redundant 'else' > + i2c->rc = time_left; Can't you return an error code from here, rather than injecting it somewhere where it doesn't belong to? > } -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 1/4] i2c: mpc: use device managed APIs

2021-04-13 Thread Andy Shevchenko
s it? i2c/for-next shows the v2 of this series being applied. -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 1/4] i2c: mpc: use device managed APIs

2021-04-13 Thread Andy Shevchenko
On Tue, Apr 13, 2021 at 4:31 PM Andy Shevchenko wrote: > > On Tue, Apr 13, 2021 at 3:21 PM Wolfram Sang wrote: > > > > > > > Yongjun[1] into the original patch. If Wei's patch is applied on top > > > of whats already in i2c/for-next then this pat

Re: [PATCH] i2c: I2C_HISI should depend on ARCH_HISI && ACPI

2021-04-13 Thread Andy Shevchenko
ependency, feel free to add my Reviewed-by: Andy Shevchenko > Fixes: d62fbdb99a85730a ("i2c: add support for HiSilicon I2C controller") > Signed-off-by: Geert Uytterhoeven > --- > drivers/i2c/busses/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [PATCH v2 1/1] devres: Enable trace events

2021-04-13 Thread Andy Shevchenko
On Tue, Apr 13, 2021 at 03:00:52PM +0300, Heikki Krogerus wrote: > On Tue, Apr 13, 2021 at 02:38:01PM +0300, Andy Shevchenko wrote: > > In some cases the printf() mechanism is too heavy and can't be used. > > For example, when debugging a race condition involving devre

[PATCH v2 1/1] devres: Enable trace events

2021-04-13 Thread Andy Shevchenko
for devres part of the driver core. Signed-off-by: Andy Shevchenko --- v2: fixed compilation error (lkp), elaborate commit message (Greg) drivers/base/Makefile | 3 +++ drivers/base/devres.c | 23 +++--- drivers/base/trace.c | 10 drivers/base/trace.h | 56

Re: [PATCH v3 3/3] MAINTAINERS: Add Chris Packham as FREESCALE MPC I2C maintainer

2021-04-13 Thread Andy Shevchenko
n of git format-patch lying around. "[PATCH v3 4/4] > MAINTAINERS: ..." is the one I intended to send (although the content is > the same). For myself I wrote a script [1] to send patches :-) No more duplicates or strangers in the Cc list. [1]: https://github.com/andy-shev/

Re: [PATCH v4 05/13] module: Add printk formats to add module build ID to stacktraces

2021-04-13 Thread Andy Shevchenko
On Mon, Apr 12, 2021 at 12:29:05PM -0700, Stephen Boyd wrote: > Quoting Andy Shevchenko (2021-04-12 04:58:02) > > On Fri, Apr 09, 2021 at 06:52:52PM -0700, Stephen Boyd wrote: > > > Let's make kernel stacktraces easier to identify by including the build > > > ID[1] of

Re: [PATCH v2 5/6] i2c: mpc: use device managed APIs

2021-04-12 Thread Andy Shevchenko
On Tue, Apr 13, 2021 at 2:21 AM Chris Packham wrote: > On 13/04/21 10:52 am, Andy Shevchenko wrote: > > On Mon, Mar 29, 2021 at 4:54 AM Chris Packham > > wrote: > >> Use device managed functions an clean up error handling. > > For the god sake how have you tested

[PATCH v2 2/2] ACPI: utils: Capitalize abbreviations in the comments

2021-04-12 Thread Andy Shevchenko
The DSDT and ACPI should be capitalized. Signed-off-by: Andy Shevchenko --- v2: split from patch 1 as per Rafael's request drivers/acpi/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index 60e46efc1bc8..3b54b8fd7396

[PATCH v2 1/2] ACPI: utils: Document for_each_acpi_dev_match() macro

2021-04-12 Thread Andy Shevchenko
() and advertise acpi_dev_put() instead of put_device() in the whole family of the helper functions. Fixes: bf263f64e804 ("media: ACPI / bus: Add acpi_dev_get_next_match_dev() and helper macro") Cc: Daniel Scally Signed-off-by: Andy Shevchenko --- v2: fixed grammar (Rafael) split

Re: [PATCH v2 6/6] i2c: mpc: Interrupt driven transfer

2021-04-12 Thread Andy Shevchenko
"BUG" and "BUG_ON" and wonder if we really > need to halt the kernel in that case. Maybe WARN is enough? > > I'll apply the first five patches now, they look good to me. And now is the time to revert the fifth one (at least, I don't know the state of the rest). It's obviously the series has not been tested (to some extent). -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 5/6] i2c: mpc: use device managed APIs

2021-04-12 Thread Andy Shevchenko
On Tue, Apr 13, 2021 at 1:52 AM Andy Shevchenko wrote: > > On Mon, Mar 29, 2021 at 4:54 AM Chris Packham > wrote: > > > > Use device managed functions an clean up error handling. > > For the god sake how have you tested this? > The patch is broken. Looking into i2

Re: [PATCH v2 5/6] i2c: mpc: use device managed APIs

2021-04-12 Thread Andy Shevchenko
On Mon, Mar 29, 2021 at 4:54 AM Chris Packham wrote: > > Use device managed functions an clean up error handling. For the god sake how have you tested this? The patch is broken. -- With Best Regards, Andy Shevchenko

[PATCH v2 1/1] ACPI: bus: Introduce acpi_dev_get() and reuse it in ACPI code

2021-04-12 Thread Andy Shevchenko
Introduce acpi_dev_get() to have a symmetrical API with acpi_dev_put() and reuse both in ACPI code under drivers/acpi folder. While at it, use acpi_bus_put_acpi_device() in one place rather than above. Signed-off-by: Andy Shevchenko --- v2: made acpi_dev_get() to return pointer as get_device

Re: [PATCH v1 1/1] ACPI: bus: Introduce acpi_dev_get() and reuse it in ACPI code

2021-04-12 Thread Andy Shevchenko
On Mon, Apr 12, 2021 at 9:05 PM Rafael J. Wysocki wrote: > > On Mon, Apr 12, 2021 at 7:47 PM Andy Shevchenko > wrote: > > > > On Mon, Apr 12, 2021 at 8:32 PM Rafael J. Wysocki wrote: > > > On Sat, Apr 10, 2021 at 3:47 PM Andy Shevchenko > > > wrot

Re: [PATCH v1 1/1] ACPI: utils: Document for_each_acpi_dev_match() macro

2021-04-12 Thread Andy Shevchenko
On Mon, Apr 12, 2021 at 8:27 PM Rafael J. Wysocki wrote: > > On Sat, Apr 10, 2021 at 3:29 PM Andy Shevchenko > wrote: > > > > The macro requires to call acpi_dev_put() on each iteration. > > Due to this it doesn't tolerate sudden disappearence of the devices. A

Re: [PATCH v1 1/1] ACPI: bus: Introduce acpi_dev_get() and reuse it in ACPI code

2021-04-12 Thread Andy Shevchenko
On Mon, Apr 12, 2021 at 8:32 PM Rafael J. Wysocki wrote: > On Sat, Apr 10, 2021 at 3:47 PM Andy Shevchenko > wrote: ... > > static void get_acpi_device(void *dev) > > { > > - if (dev) > > - get_device(&((struct acpi_device *)dev)-&

Re: [PATCH v1 6/7] mfd: lpc_ich: Add support for pinctrl in non-ACPI system

2021-04-12 Thread Andy Shevchenko
On Mon, Apr 12, 2021 at 07:27:14PM +0200, Henning Schild wrote: > Am Mon, 12 Apr 2021 19:51:42 +0300 > schrieb Andy Shevchenko : > > On Mon, Apr 12, 2021 at 06:01:06PM +0200, Henning Schild wrote: > > > Am Mon, 8 Mar 2021 14:20:19 +0200 > > > schrieb Andy Shevc

Re: [PATCH v1 6/7] mfd: lpc_ich: Add support for pinctrl in non-ACPI system

2021-04-12 Thread Andy Shevchenko
On Mon, Apr 12, 2021 at 07:16:53PM +0200, Henning Schild wrote: > Am Mon, 12 Apr 2021 19:59:05 +0300 > schrieb Andy Shevchenko : > > On Mon, Apr 12, 2021 at 06:40:01PM +0200, Henning Schild wrote: > > > Tan or Andy, > > > > > > maybe you can point me to a

Re: [PATCH v1 6/7] mfd: lpc_ich: Add support for pinctrl in non-ACPI system

2021-04-12 Thread Andy Shevchenko
On Mon, Apr 12, 2021 at 06:40:01PM +0200, Henning Schild wrote: > Tan or Andy, > > maybe you can point me to a user of that patch. I guess there might be > an out-of-tree driver or userland code on how to use the GPIOs from > there. I'm confused. User of this patch is pinctrl

Re: [PATCH v1 6/7] mfd: lpc_ich: Add support for pinctrl in non-ACPI system

2021-04-12 Thread Andy Shevchenko
On Mon, Apr 12, 2021 at 06:01:06PM +0200, Henning Schild wrote: > Am Mon, 8 Mar 2021 14:20:19 +0200 > schrieb Andy Shevchenko : > > > From: Tan Jui Nee > > > > Add support for non-ACPI systems, such as system that uses > > Advanced Boot Loader (ABL) whereby a

Re: [PATCH] x86/efi: Do not release sub-1MB memory regions when the crashkernel option is specified

2021-04-12 Thread Andy Lutomirski
On Mon, Apr 12, 2021 at 2:52 AM Baoquan He wrote: > > On 04/11/21 at 06:49pm, Andy Lutomirski wrote: > > > > > > > On Apr 11, 2021, at 6:14 PM, Baoquan He wrote: > > > > > > On 04/09/21 at 07:59pm, H. Peter Anvin wrote: > > >> Why don't

Re: Candidate Linux ABI for Intel AMX and hypothetical new related features

2021-04-12 Thread Andy Lutomirski
On Mon, Apr 12, 2021 at 7:19 AM Florian Weimer wrote: > > * Andy Lutomirski: > > Maybe we could have done this in 2016 when I reported this for the first > time. Now it is too late, as more and more software is using > CPUID-based detection for AVX-512. Our users have

Re: Candidate Linux ABI for Intel AMX and hypothetical new related features

2021-04-12 Thread Andy Lutomirski
> On Apr 12, 2021, at 7:38 AM, Florian Weimer wrote: > > * Borislav Petkov: > >>> On Mon, Apr 12, 2021 at 04:19:29PM +0200, Florian Weimer wrote: >>> Maybe we could have done this in 2016 when I reported this for the first >>> time. Now it is too late, as more and more software is using

[PATCH v1 2/3] pinctrl: Introduce MODE group in enum pin_config_param

2021-04-12 Thread Andy Shevchenko
Better to have a MODE group of settings to keep them together when ordered alphabetically. Hence, rename PIN_CONFIG_LOW_POWER_MODE to PIN_CONFIG_MODE_LOW_POWER. Signed-off-by: Andy Shevchenko --- drivers/pinctrl/pinconf-generic.c | 6 +++--- drivers/pinctrl/pinctrl-lpc18xx.c | 4

[PATCH v1 3/3] pinctrl: Add PIN_CONFIG_MODE_PWM to enum pin_config_param

2021-04-12 Thread Andy Shevchenko
a corresponding item to the pin_config_param enumerator. Signed-off-by: Andy Shevchenko --- include/linux/pinctrl/pinconf-generic.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index 189e701832ea

[PATCH v1 1/3] pinctrl: Keep enum pin_config_param ordered by name

2021-04-12 Thread Andy Shevchenko
It seems the ordering is by name. Keep it that way. Signed-off-by: Andy Shevchenko --- include/linux/pinctrl/pinconf-generic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index

Re: [PATCH v2 0/7] gpio-rockchip driver

2021-04-12 Thread Andy Shevchenko
On Mon, Apr 12, 2021 at 4:30 PM Heiko Stübner wrote: > Am Montag, 12. April 2021, 14:13:37 CEST schrieb Andy Shevchenko: > > On Sun, Apr 11, 2021 at 4:35 PM Peter Geis wrote: > > > > > > Separate gpio driver from pinctrl driver, and support v2 controller. > >

[PATCH v2 1/1] iio: adc: ad7298: Enable on Intel Galileo Gen 1

2021-04-12 Thread Andy Shevchenko
Enable ADC on Intel Galileo Gen 1 board. Signed-off-by: Andy Shevchenko --- v2: fixed typo in ID drivers/iio/adc/ad7298.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/iio/adc/ad7298.c b/drivers/iio/adc/ad7298.c index 689ecd5dd563..e7e866433090 100644 --- a/drivers/iio/adc

Re: [PATCH v1 1/1] iio: adc: ad7298: Enable on Intel Galileo Gen 1

2021-04-12 Thread Andy Shevchenko
On Mon, Apr 12, 2021 at 4:02 PM Andy Shevchenko wrote: > > Enable ADC on Intel Galileo Gen 1 board. Not my day... > + { "INT3495", 0 }, Should be INT3494 I'll send v2 -- With Best Regards, Andy Shevchenko

[PATCH v1 1/1] iio: adc: ad7298: Enable on Intel Galileo Gen 1

2021-04-12 Thread Andy Shevchenko
Enable ADC on Intel Galileo Gen 1 board. Signed-off-by: Andy Shevchenko --- drivers/iio/adc/ad7298.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/iio/adc/ad7298.c b/drivers/iio/adc/ad7298.c index 689ecd5dd563..3a7b75463335 100644 --- a/drivers/iio/adc/ad7298.c +++ b

Re: [PATCH v2 0/7] gpio-rockchip driver

2021-04-12 Thread Andy Shevchenko
hip.c > create mode 100644 drivers/pinctrl/pinctrl-rockchip.h > > -- > 2.25.1 > -- With Best Regards, Andy Shevchenko

Re: [PATCH v4 05/13] module: Add printk formats to add module build ID to stacktraces

2021-04-12 Thread Andy Shevchenko
did && > buildid) > + len += sprintf(buffer + len, " %20phN", buildid); len += sprintf(buffer + len, " %*phN", BUILD_ID_SIZE_MAX, buildid); ? -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/1] iio: adc: ad7768-1: Keep fwnode reference count balanced

2021-04-12 Thread Andy Shevchenko
On Mon, Apr 12, 2021 at 01:19:04PM +0300, Andy Shevchenko wrote: > The commit 75ed0be7200d ("iio: adc: ad7768-1: Add channel labels.") > missed the point that loop counter should be put after use. Otherwise > the reference count of it will become unbalanced. Scratch this, I

Re: [PATCH v1 1/1] leds: as3645a: Keep fwnode reference count balanced

2021-04-12 Thread Andy Shevchenko
On Mon, Apr 12, 2021 at 01:38:38PM +0300, Andy Shevchenko wrote: > The commit 88b7e9ffe594 ("leds: as3645a: Switch to fwnode property API") > missed the point that loop counter should be put after use. Otherwise > the reference count of it will become unbalanced. Sc

Re: [PATCH] platform/x86: pmc_atom: Match all Beckhoff Automation baytrail boards with critclk_systems DMI table

2021-04-12 Thread Andy Shevchenko
On Mon, Apr 12, 2021 at 2:07 PM linux-kernel-dev wrote: > On Mo, 2021-04-12 at 13:54 +0300, Andy Shevchenko wrote: > > CAUTION: External Email!! > > On Mon, Apr 12, 2021 at 1:39 PM linux-kernel-dev > > wrote: > > > On Mo, 2021-04-12 at 12:43 +0300, Andy Shevchenko

Re: [PATCH] platform/x86: pmc_atom: Match all Beckhoff Automation baytrail boards with critclk_systems DMI table

2021-04-12 Thread Andy Shevchenko
On Mon, Apr 12, 2021 at 1:39 PM linux-kernel-dev wrote: > On Mo, 2021-04-12 at 12:43 +0300, Andy Shevchenko wrote: > > On Mon, Apr 12, 2021 at 12:29 PM Steffen Dirkwinkel > > wrote: ... > > I'm afraid it's a bit too much. Is there any guarantee all the boards > > ba

[PATCH v1 1/1] leds: as3645a: Keep fwnode reference count balanced

2021-04-12 Thread Andy Shevchenko
6e005 ("leds-as3645a: Drop fwnode reference on ignored node") Signed-off-by: Andy Shevchenko --- drivers/leds/leds-as3645a.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c index e8922fa03379..50454d1c6090 100644 --- a/dri

[PATCH v1 1/1] iio: adc: ad7768-1: Keep fwnode reference count balanced

2021-04-12 Thread Andy Shevchenko
The commit 75ed0be7200d ("iio: adc: ad7768-1: Add channel labels.") missed the point that loop counter should be put after use. Otherwise the reference count of it will become unbalanced. Fixes: 75ed0be7200d ("iio: adc: ad7768-1: Add channel labels.") Cc: Cristian Pop

Re: [PATCH] platform/x86: pmc_atom: Match all Beckhoff Automation baytrail boards with critclk_systems DMI table

2021-04-12 Thread Andy Shevchenko
...only a few..." > having the clocks turned on is not an issue on those. "...not an issue." > Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL") > Signed-off-by: Steffen Dirkwinkel I'm afraid it's a bit too much. Is there any guarantee

Re: [PATCH] [v2] iio: proximity: pulsedlight: Fix rumtime PM imbalance on error

2021-04-12 Thread Andy Shevchenko
*reg) > ret = lidar_write_control(data, LIDAR_REG_CONTROL_ACQUIRE); > if (ret < 0) { > dev_err(>dev, "cannot send start measurement > command"); > + pm_runtime_put_noidle(>dev); > return ret; > } > > -- > 2.17.1 > -- With Best Regards, Andy Shevchenko

Re: [PATCH] x86/efi: Do not release sub-1MB memory regions when the crashkernel option is specified

2021-04-11 Thread Andy Lutomirski
> On Apr 11, 2021, at 6:14 PM, Baoquan He wrote: > > On 04/09/21 at 07:59pm, H. Peter Anvin wrote: >> Why don't we do this unconditionally? At the very best we gain half a >> megabyte of memory (except the trampoline, which has to live there, but it >> is only a few kilobytes.) > > This

Re: [PATCH] x86/msr: Block writes to certain MSRs unconditionally

2021-04-11 Thread Andy Lutomirski
On Sun, Apr 11, 2021 at 10:04 AM Borislav Petkov wrote: > > On Sun, Apr 11, 2021 at 09:57:20AM -0700, Andy Lutomirski wrote: > > Working around a kernel bug. The workaround only worked on AMD > > systems. The correct solution was to fix the kernel bug, not poke > > MSRs. &

Re: [PATCH v4 2/2] iio: temperature: add driver support for ti tmp117

2021-04-11 Thread Andy Shevchenko
On Sun, Apr 11, 2021 at 9:07 PM Andy Shevchenko wrote: > On Sun, Apr 11, 2021 at 5:53 PM Jonathan Cameron wrote: > > On Wed, 7 Apr 2021 23:51:47 +0530 > > Puranjay Mohan wrote: > Good point, but better is to use clamp_t(s16, ...) rather than explicit > casting. Sorry

Re: [PATCH v4 2/2] iio: temperature: add driver support for ti tmp117

2021-04-11 Thread Andy Shevchenko
od point, but better is to use clamp_t(s16, ...) rather than explicit casting. I always consider explicit casting in C (and esp. in Linux kernel) is a red flag. Should be really rarely needed. > > + if (off == data->calibbias) > > + return 0; -- With Best Regards, Andy Shevchenko

Re: [PATCH] x86/msr: Block writes to certain MSRs unconditionally

2021-04-11 Thread Andy Lutomirski
> On Apr 11, 2021, at 9:43 AM, Andi Kleen wrote: > >  >> >> I have actually seen real user programs poke MSR_SYSCALL_MASK. > > Hmm, what was the use case? > > Working around a kernel bug. The workaround only worked on AMD systems. The correct solution was to fix the kernel bug, not

Re: [PATCH] x86/msr: Block writes to certain MSRs unconditionally

2021-04-11 Thread Andy Lutomirski
On Sat, Apr 10, 2021 at 11:52 AM Andi Kleen wrote: > > Borislav Petkov writes: > > > From: Borislav Petkov > > Date: Sat, 10 Apr 2021 14:08:13 +0200 > > > > There are a bunch of MSRs which luserspace has no business poking at, > > whatsoever. Add a ban list and put the TSC-related MSRs in

Re: [PATCH] x86/msr: Block writes to certain MSRs unconditionally

2021-04-10 Thread Andy Lutomirski
> On Apr 10, 2021, at 5:11 AM, Borislav Petkov wrote: > > From: Borislav Petkov > Date: Sat, 10 Apr 2021 14:08:13 +0200 > > There are a bunch of MSRs which luserspace has no business poking at, > whatsoever. Add a ban list and put the TSC-related MSRs in there. Issue > a big juicy splat to

[PATCH v1 1/1] ACPI: scan: Utilize match_string() API

2021-04-10 Thread Andy Shevchenko
We have already an API to match a string in the array of strings. Utilize it instead of open coded analogues. Signed-off-by: Andy Shevchenko --- drivers/acpi/scan.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/acpi/scan.c b/drivers/acpi

[PATCH v1 1/1] ACPI: bus: Introduce acpi_dev_get() and reuse it in ACPI code

2021-04-10 Thread Andy Shevchenko
Introduce acpi_dev_get() to have a symmetrical API with acpi_dev_put() and reuse both in ACPI code under drivers/acpi folder. While at it, use acpi_bus_put_acpi_device() in one place rather than above. Signed-off-by: Andy Shevchenko --- drivers/acpi/device_sysfs.c | 4 ++-- drivers/acpi/glue.c

[PATCH v1 1/1] ACPI: utils: Document for_each_acpi_dev_match() macro

2021-04-10 Thread Andy Shevchenko
() and advertise acpi_dev_put() instead of put_device() in the whole family of the helper functions. Fixes: bf263f64e804 ("media: ACPI / bus: Add acpi_dev_get_next_match_dev() and helper macro") Cc: Daniel Scally Signed-off-by: Andy Shevchenko --- drivers/acpi/utils.c| 12 ---

Re: Candidate Linux ABI for Intel AMX and hypothetical new related features

2021-04-09 Thread Andy Lutomirski
On Fri, Apr 9, 2021 at 1:53 PM Len Brown wrote: > > On Wed, Mar 31, 2021 at 6:45 PM Andy Lutomirski wrote: > > > > On Wed, Mar 31, 2021 at 3:28 PM Len Brown wrote: > > > > > We added compiler annotation for user-level interrupt handlers. > > > I'm n

[PATCH v1 1/1] video: ssd1307fb: Drop OF dependency

2021-04-09 Thread Andy Shevchenko
After the commit 72915994e028 ("video: ssd1307fb: Make use of device properties") driver does not depend on OF, drop unneeded dependency. Signed-off-by: Andy Shevchenko --- drivers/video/fbdev/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/dri

Re: [PATCH 0/2] USB: serial: cp210x: provide gpio valid mask

2021-04-09 Thread Andy Shevchenko
chardev interface without having to request each pin in > turn. Thanks! I like the series. Independently on reaction on my comments: Reviewed-by: Andy Shevchenko > Johan > > > Johan Hovold (2): > USB: serial: cp210x: provide gpio valid mask > USB: serial: cp210x: add gpio-

Re: [PATCH 2/2] USB: serial: cp210x: add gpio-configuration debug printk

2021-04-09 Thread Andy Shevchenko
ver's behalf? > + else > + dev_dbg(dev, "GPIO.%*pbl configured for GPIO\n", ngpios, > + valid_mask); A nit-pick: I would change GPIO -> pin in the second message in the first occurrence. > return 0; > } > > -- > 2.26.3 > -- With Best Regards, Andy Shevchenko

[PATCH v2 1/1] ata: Replace inclusion of kernel.h by bits.h in the header

2021-04-09 Thread Andy Shevchenko
ata.h uses BIT() macro, hence bits.h must be included. Otherwise there is no need to have kernel.h included, I do not see any direct users of it in ata.h. Hence replace inclusion of kernel.h. Signed-off-by: Andy Shevchenko --- v2: replaced kernel.h by bits.h (lkp), tested allmod/yesconfig

Re: [PATCH v4] lib: add basic KUnit test for lib/math

2021-04-09 Thread Andy Shevchenko
s of parameterized tests > * provide a place to add tests for any new files in this dir > * are written so adding new test cases to cover edge cases should be easy Yes, that's why I think macros also can be a good example how to test *macro*. -- With Best Regards, Andy Shevchenko

Re: [PATCH v7 2/5] i2c: core: add api to provide frequency mode strings

2021-04-09 Thread Andy Shevchenko
t of strings > > sounds > > good to me. > > It is not important to me if we are going to change that later anyhow. > I'll leave it to you guys. Thanks, I think the series is okay to go as is. -- With Best Regards, Andy Shevchenko

Re: [PATCH v7 2/5] i2c: core: add api to provide frequency mode strings

2021-04-09 Thread Andy Shevchenko
; > ? Can we add this later if needed? Because in such case additionally printing bus_freq_hz will be fine, no? But putting max to each frequency representation in the list of strings sounds good to me. -- With Best Regards, Andy Shevchenko

[PATCH v2 1/1] kernel.h: Split out panic and oops helpers

2021-04-09 Thread Andy Shevchenko
from something which has its own domain At the same time convert users tree-wide to use new headers, although for the time being include new header back to kernel.h to avoid twisted indirected includes for existing users. Signed-off-by: Andy Shevchenko Reviewed-by: Bjorn Andersson Acked

Re: [PATCH v5 2/4] drivers/tty/serial/8250: refactor sirq and lpc address setting code

2021-04-09 Thread Andy Shevchenko
On Fri, Apr 9, 2021 at 10:38 AM Zev Weiss wrote: > > On Fri, Apr 09, 2021 at 02:24:08AM CDT, Andy Shevchenko wrote: > >On Thursday, April 8, 2021, Zev Weiss wrote: > > > >> This splits dedicated aspeed_vuart_set_{sirq,lpc_address}() functions > >> out of the

Re: [PATCH 1/2] linux/kconfig.h: replace IF_ENABLED() with PTR_IF() in

2021-04-09 Thread Andy Shevchenko
in with a respective header file? Really what we have in the kernel.h right now is a complete train wreck of something. We have to define what exactly is kernel.h for? Arnd? Others? Shall we start a wider discussion on the topic? -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-09 Thread Andy Shevchenko
On Thu, Apr 08, 2021 at 11:23:03PM -0700, Andrew Morton wrote: > On Wed, 7 Apr 2021 11:46:37 +0300 Andy Shevchenko > wrote: > > > On Wed, Apr 7, 2021 at 11:17 AM Kees Cook wrote: > > > > > > On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrot

[PATCH v1 1/1] gpio: sim: Initialize attribute allocated on the heap

2021-04-08 Thread Andy Shevchenko
by: Naresh Kamboju Tested-by: Naresh Kamboju Signed-off-by: Andy Shevchenko --- drivers/gpio/gpio-sim.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-sim.c b/drivers/gpio/gpio-sim.c index ea17289a869c..92493b98c51b 100644 --- a/drivers/gpio/gpio-sim.c +++ b/drivers/gpio/

Re: [PATCH v1 1/1] defconfig: enable GPIO_SIM

2021-04-08 Thread Andy Shevchenko
On Thu, Apr 08, 2021 at 06:54:41PM +0300, Andy Shevchenko wrote: > Signed-off-by: Andy Shevchenko Sorry for the noise. -- With Best Regards, Andy Shevchenko

[PATCH v1 1/1] defconfig: enable GPIO_SIM

2021-04-08 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko --- arch/x86/configs/i386_defconfig | 1 + arch/x86/configs/x86_64_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig index d696336674b0..e36dc940a83c 100644 --- a/arch/x86/configs

[PATCH 1/1] drivers/gpio/gpio-xilinx.c (updated): bitmap-fix

2021-04-08 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko --- drivers/gpio/gpio-xilinx.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c index d5a08dcdd677..109b32104867 100644 --- a/drivers/gpio/gpio-xilinx.c +++ b/drivers

Re: [next] [arm64] [gpio] BUG: key has not been registered! DEBUG_LOCKS_WARN_ON:

2021-04-08 Thread Andy Shevchenko
On Thu, Apr 8, 2021 at 3:59 PM Naresh Kamboju wrote: > On Thu, 8 Apr 2021 at 15:17, Andy Shevchenko > wrote: > > On Thu, Apr 8, 2021 at 11:33 AM Naresh Kamboju > > wrote: > > > On Thu, 8 Apr 2021 at 04:21, Andy Shevchenko > > > wrote: > > > >

Re: [PATCH v2 1/6] software node: Free resources explicitly when swnode_register() fails

2021-04-08 Thread Andy Shevchenko
On Thu, Apr 08, 2021 at 05:04:32PM +0200, Rafael J. Wysocki wrote: > On Thu, Apr 8, 2021 at 4:50 PM Andy Shevchenko > wrote: > > On Thu, Apr 08, 2021 at 04:15:37PM +0200, Rafael J. Wysocki wrote: > > > On Wed, Mar 31, 2021 at 1:06 PM Heikki Krogerus > > > wrote:

Re: [PATCH v1 4/5] gpio: xilinx: Switch to use bitmap APIs

2021-04-08 Thread Andy Shevchenko
On Thu, Apr 08, 2021 at 05:56:00PM +0300, Andy Shevchenko wrote: > It seems that Xilinx GPIO driver operates with bit arrays longer than 32 and > thus can leverage bitmap APIs for that. It makes code better to understand. > > The ->probe() function is modified to try read prop

[PATCH v1 4/5] gpio: xilinx: Switch to use bitmap APIs

2021-04-08 Thread Andy Shevchenko
sed for the second channel. On top of that kzalloc() guarantees zero initial values for the fields in the private data structure, hence drop unneeded conditionals and assignments. The change is inspired by Syed Nayyar Waris' ideas about bitmap API extension. Signed-off-by: Andy Shevchenko --- driv

[PATCH v1 5/5] gpio: xilinx: No need to disable IRQs in the handler

2021-04-08 Thread Andy Shevchenko
In IRQ handler interrupts are already disabled, hence no need to repeat it. Even in the threaded case, it is not a problem because IRQ framework keeps interrupt disabled there as well. Remove disabling IRQ part in the handler. Signed-off-by: Andy Shevchenko --- drivers/gpio/gpio-xilinx.c | 5

[PATCH v1 3/5] gpio: xilinx: Introduce xgpio_read_chan() / xgpio_write_chan()

2021-04-08 Thread Andy Shevchenko
With the new helpers, i.e. xgpio_read_chan() / xgpio_write_chan(), the code is easier to read and maintain. No functional changes intended. Signed-off-by: Andy Shevchenko --- drivers/gpio/gpio-xilinx.c | 68 +- 1 file changed, 37 insertions(+), 31 deletions

[PATCH v1 2/5] gpio: xilinx: Correct kernel doc for xgpio_probe()

2021-04-08 Thread Andy Shevchenko
evice interface") Signed-off-by: Andy Shevchenko --- drivers/gpio/gpio-xilinx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c index b411d3156e0b..136557e7dd3c 100644 --- a/drivers/gpio/gpio-xilinx.c +++ b/drivers

[RFT, PATCH v1 0/5] gpio: xilinx: convert to use bitmap API

2021-04-08 Thread Andy Shevchenko
with the series, due to above (lack of real testing). So I'm flexible in a way how it can be proceed. [1]: cover.1617380819.git.syednwa...@gmail.com Andy Shevchenko (5): bitmap: Make bitmap_remap() and bitmap_bitremap() available to users gpio: xilinx: Correct kernel doc for xgpio_probe() gpio

[PATCH v1 1/5] bitmap: Make bitmap_remap() and bitmap_bitremap() available to users

2021-04-08 Thread Andy Shevchenko
Currently the bitmap_remap() and bitmap_bitremap() are available only for CONFIG_NUMA=y case, while some users may benefit out of it and being independent to NUMA code. Make them available to users by moving out of ifdeffery and exporting for modules. Signed-off-by: Andy Shevchenko --- lib

Re: [PATCH v2 1/6] software node: Free resources explicitly when swnode_register() fails

2021-04-08 Thread Andy Shevchenko
On Thu, Apr 08, 2021 at 04:15:37PM +0200, Rafael J. Wysocki wrote: > On Wed, Mar 31, 2021 at 1:06 PM Heikki Krogerus > wrote: > > > > On Mon, Mar 29, 2021 at 06:12:02PM +0300, Andy Shevchenko wrote: > > > Currently we have a slightly twisted logic in swnode_register(

Re: [PATCH v3 04/12] module: Add printk format to add module build ID to stacktraces

2021-04-08 Thread Andy Shevchenko
t the ld man page seems to suggest this section name should be > consistent. Interesting idea (in positive way!), I'm wondering what Clang does in such case. -- With Best Regards, Andy Shevchenko

Re: [RESEND PATCH v4 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2021-04-08 Thread Andy Shevchenko
we have real users of the proposed API. -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-08 Thread Andy Shevchenko
On Thu, Apr 08, 2021 at 02:45:12PM +0200, Rasmus Villemoes wrote: > On 06/04/2021 15.31, Andy Shevchenko wrote: > > kernel.h is being used as a dump for all kinds of stuff for a long time. > > Here is the attempt to start cleaning it up by splitting out panic and > > o

Re: [PATCH net-next v2 0/5] net: pch: fix and a few cleanups

2021-04-08 Thread Andy Shevchenko
On Thu, Apr 08, 2021 at 09:57:12AM +, Flavio Suligoi wrote: > > > > On Thu, Mar 25, 2021 at 07:34:07PM +0200, Andy Shevchenko wrote: > > > > > The series provides one fix (patch 1) for GPIO to be able to wait for > > > > > the GPIO driver to app

Re: [PATCH v4 11/18] asm-generic/io.h: implement pci_remap_cfgspace using ioremap_np

2021-04-08 Thread Andy Shevchenko
Today I learned that this one is kosher in kernel code. Handy! Let's go > with that. It depends on the maintainer. Greg, for example, doesn't like this. I have no strong opinion (I use both variants on case-by-case basis), though I think in headers better to spell out all conditionals clearly. -- With Best Regards, Andy Shevchenko

Re: [PATCH v6 3/8] regulator: IRQ based event/error notification helpers

2021-04-08 Thread Andy Shevchenko
On Thu, Apr 8, 2021 at 11:21 AM Matti Vaittinen wrote: > > Hello Andy, > > On Wed, 2021-04-07 at 16:21 +0300, Andy Shevchenko wrote: > > On Wed, Apr 7, 2021 at 1:04 PM Matti Vaittinen > > wrote: > > > Provide helper function for IC's implementing regulator >

Re: [PATCH] media: atomisp: Fix runtime PM imbalance in atomisp_pci_probe

2021-04-08 Thread Andy Shevchenko
On Thu, Apr 8, 2021 at 11:19 AM Dinghao Liu wrote: > > When hmm_pool_register() fails, a pairing PM usage counter > increment is needed to keep the counter balanced. It's the > same for the following error paths. Acked-by: Andy Shevchenko > Signed-off-by: Dinghao Liu > ---

Re: [next] [arm64] [gpio] BUG: key has not been registered! DEBUG_LOCKS_WARN_ON:

2021-04-08 Thread Andy Shevchenko
On Thu, Apr 8, 2021 at 11:33 AM Naresh Kamboju wrote: > On Thu, 8 Apr 2021 at 04:21, Andy Shevchenko > wrote: > > On Thu, Apr 8, 2021 at 12:38 AM Naresh Kamboju > > wrote: > > > > > > While running kselftest recently added gpio gpio-sim.sh test cas

Re: [PATCH v6 3/5] i2c: add support for HiSilicon I2C controller

2021-04-08 Thread Andy Shevchenko
rer calculation, we can maybe skip the HZ_PER_KHZ > > define completely and just use plain '1000' as a factor/divider because > > it then becomes obvious. I still find the define more confusing than > > helpful TBH. But I'll leave the final decision to Yicong Yang. > > > >

Re: [next] [arm64] [gpio] BUG: key has not been registered! DEBUG_LOCKS_WARN_ON:

2021-04-07 Thread Andy Shevchenko
> BAD: next-20210330 > > This is still happening today on Linux next tag 20210407. Can you add the following sysfs_attr_init(attrs[i]); to the end of the loop in gpio_sim_setup_sysfs()? If it fixes an issue I'll send a formal patch. -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/1] ata: Drop unneeded inclusion of kernel.h in the header

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 07, 2021 at 10:43:53AM -0600, Jens Axboe wrote: > On 4/7/21 10:27 AM, Andy Shevchenko wrote: > > On Wed, Apr 07, 2021 at 10:04:49AM -0600, Jens Axboe wrote: > >> On 4/7/21 10:03 AM, Andy Shevchenko wrote: > >>> On Wed, Apr 07, 2021 at 11:51:31PM

Re: [PATCH v1 1/1] ata: Drop unneeded inclusion of kernel.h in the header

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 07, 2021 at 10:04:49AM -0600, Jens Axboe wrote: > On 4/7/21 10:03 AM, Andy Shevchenko wrote: > > On Wed, Apr 07, 2021 at 11:51:31PM +0800, kernel test robot wrote: ... > >> All errors (new ones prefixed by >>): > > > > Thanks, we need to incl

[PATCH v1 1/1] ata: Add bits.h inclusion

2021-04-07 Thread Andy Shevchenko
ata.h uses BIT() macro, hence bits.h must be included. Reported-by: kernel test robot Signed-off-by: Andy Shevchenko --- Jens, feel free to fold this into v1, or tell that you want me to send a v2. include/linux/ata.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/ata.h b

Re: [PATCH v1 1/1] ata: Drop unneeded inclusion of kernel.h in the header

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 07, 2021 at 11:51:31PM +0800, kernel test robot wrote: > Hi Andy, > > I love your patch! Yet something to improve: > > [auto build test ERROR on block/for-next] > [also build test ERROR on v5.12-rc6 next-20210407] > [If your patch is applied to the wrong git

Re: [PATCH v3 04/12] module: Add printk format to add module build ID to stacktraces

2021-04-07 Thread Andy Shevchenko
ure the the hard Why not static assert? -- With Best Regards, Andy Shevchenko

Re: [RFC PATCH 13/37] mm: implement speculative handling in __handle_mm_fault().

2021-04-07 Thread Andy Lutomirski
are off. You need RCU protection, too. You have the same error in the cover letter. --Andy

Re: [PATCH v3 04/12] module: Add printk format to add module build ID to stacktraces

2021-04-07 Thread Andy Shevchenko
xist on > > the device due to space concerns (the debuginfo can be too large for > > space limited devices). ... > It shows wrong build id for vmlinux. > And it does not show the build if for the module at all. >From your previous messages and this seems like virtualization breaks the access / use of build ID :-( -- With Best Regards, Andy Shevchenko

<    1   2   3   4   5   6   7   8   9   10   >