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

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 7, 2021 at 5:30 PM Luis Chamberlain wrote: > On Wed, Apr 07, 2021 at 10:33:44AM +0300, Andy Shevchenko wrote: > > On Wed, Apr 7, 2021 at 10:25 AM Luis Chamberlain wrote: > > > On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: ... > > >

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

2021-04-07 Thread Andy Shevchenko
There is no need to have kernel.h included, I do not see any direct users of it in ata.h. Drop unneeded inclusion of kernel.h. Signed-off-by: Andy Shevchenko --- include/linux/ata.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/ata.h b/include/linux/ata.h index 6e67aded28f8

Re: [PATCH v1 1/1] drm/i915: Include only needed headers in ascii85.h

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 07, 2021 at 04:40:10PM +0300, Andy Shevchenko wrote: > On Wed, Apr 07, 2021 at 03:46:37PM +0300, Jani Nikula wrote: > > On Wed, 07 Apr 2021, Andy Shevchenko > > wrote: > > > The ascii85.h is user of exactly two headers, i.e. math.h and types.h. > &g

Re: [PATCH v1 1/1] drm/i915: Include only needed headers in ascii85.h

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 07, 2021 at 03:46:37PM +0300, Jani Nikula wrote: > On Wed, 07 Apr 2021, Andy Shevchenko > wrote: > > The ascii85.h is user of exactly two headers, i.e. math.h and types.h. > > There is no need to carry on entire kernel.h. > > > > Signed-off-by: Andy Shev

Re: [PATCH v2 1/1] serial: sh-sci: Respect deferred probe when getting IRQ

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 07, 2021 at 06:11:46AM -0700, Guenter Roeck wrote: > On 4/7/21 3:17 AM, Andy Shevchenko wrote: > > With platform_get_irq() and its optional variant it's possible to get > > a deferred probe error code. Since the commit ed7027fdf4ec ("driver core

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

2021-04-07 Thread Andy Shevchenko
eturn ret; Usually negative conditions are worse for cognitive functions of human beings. (On top of that some patterns are applied) I would rewrite above as void __iomem *ret; ret = ioremap_np(offset, size); if (ret) return ret; return ioremap(offset, size); -- With Best Regards, Andy Shevchenko

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

2021-04-07 Thread Andy Shevchenko
on delayed work later. The helper also adds regulator_get_error_flags() > errors in cache for the duration of IRQ disabling. Thanks for an update, my comments below. After addressing them, feel free to add Reviewed-by: Andy Shevchenko > Signed-off-by: Matti Vaittinen > > --- >

Re: [PATCH v4 3/7] regulator: IRQ based event/error notification helpers

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 7, 2021 at 12:49 PM Vaittinen, Matti wrote: > On Wed, 2021-04-07 at 12:10 +0300, Andy Shevchenko wrote: > > On Wed, Apr 7, 2021 at 8:02 AM Matti Vaittinen > > wrote: > > > On Wed, 2021-04-07 at 01:44 +0300, Andy Shevchenko wrote: > > > > On Tue

Re: [PATCH v8] USB: serial: cp210x: Add support for GPIOs on CP2108

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 7, 2021 at 6:21 AM Tran Van Pho wrote: > On Wed, Apr 7, 2021 at 5:25 AM Andy Shevchenko > wrote: >> On Tuesday, April 6, 2021, Pho Tran wrote: ... >>> CP2108 has 16 GPIOs, So data types of several variables need to be is u16 >>> instead of u8(i

[PATCH v1 1/1] drm/i915: Include only needed headers in ascii85.h

2021-04-07 Thread Andy Shevchenko
The ascii85.h is user of exactly two headers, i.e. math.h and types.h. There is no need to carry on entire kernel.h. Signed-off-by: Andy Shevchenko --- include/linux/ascii85.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/ascii85.h b/include/linux/ascii85.h

Re: [PATCH v2 1/1] serial: sh-sci: Respect deferred probe when getting IRQ

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 07, 2021 at 12:23:21PM +0200, Greg Kroah-Hartman wrote: > On Wed, Apr 07, 2021 at 01:17:13PM +0300, Andy Shevchenko wrote: > > With platform_get_irq() and its optional variant it's possible to get > > a deferred probe error code. Since the commit ed7027fdf4e

[PATCH v2 1/1] serial: sh-sci: Respect deferred probe when getting IRQ

2021-04-07 Thread Andy Shevchenko
ling in sh-sci driver to follow above and allow to respect deferred probe. Fixes: ed7027fdf4ec ("driver core: platform: Make platform_get_irq_optional() optional") Reported-by: Guenter Roeck Signed-off-by: Andy Shevchenko --- v2: fixed a typo: i -> 0 drivers/tty/serial/sh-sci.c | 1

Re: [PATCH v1 1/1] serial: sh-sci: Respect deferred probe when getting IRQ

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 07, 2021 at 01:05:56PM +0300, Andy Shevchenko wrote: > With platform_get_irq() and its optional variant it's possible to get > a deferred probe error code. Since the commit ed7027fdf4ec ("driver core: > platform: Make platform_get_irq_optional() optional") t

Re: [PATCH v2 1/1] defconfig: enable SERIAL_SH_SCI

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 07, 2021 at 01:14:06PM +0300, Andy Shevchenko wrote: > Signed-off-by: Andy Shevchenko Sorry for noise, it's not for upstream. -- With Best Regards, Andy Shevchenko

[PATCH v2 1/1] defconfig: enable SERIAL_SH_SCI

2021-04-07 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko --- v2: fixed one typo arch/x86/configs/i386_defconfig | 1 + arch/x86/configs/x86_64_defconfig | 1 + drivers/tty/serial/Kconfig| 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs

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

2021-04-07 Thread Andy Shevchenko
gt; >> +} > > > > Any reason ehy this is an inline function? My gut feeling says it would > > be better added to the core? > > > > it's not a complicated function so i didn't think it'll make much difference, > so i just put it in the header along with the coresponding macro definitions. > do you want me to move it to the core? I guess exporting will save few dozens of bytes if the function is used more than once. (All strings will be duplicated or multiplied in that case) -- With Best Regards, Andy Shevchenko

[PATCH v1 1/1] serial: sh-sci: Respect deferred probe when getting IRQ

2021-04-07 Thread Andy Shevchenko
ling in sh-sci driver to follow above and allow to respect deferred probe. Fixes: ed7027fdf4ec ("driver core: platform: Make platform_get_irq_optional() optional") Reported-by: Guenter Roeck Signed-off-by: Andy Shevchenko --- drivers/tty/serial/sh-sci.c | 18 -

Re: [PATCH v1 1/1] driver core: platform: Make platform_get_irq_optional() optional

2021-04-07 Thread Andy Shevchenko
On Tue, Apr 06, 2021 at 12:25:14PM -0700, Guenter Roeck wrote: > On Wed, Mar 31, 2021 at 05:45:26PM +0300, Andy Shevchenko wrote: > > Currently the platform_get_irq_optional() returns an error code even > > if IRQ resource sumply has not been found. It prevents caller to be > >

Re: [PATCH v4 3/7] regulator: IRQ based event/error notification helpers

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 7, 2021 at 8:02 AM Matti Vaittinen wrote: > > Morning Andy, > > Thanks for the review! By the way, is it me or did your mail-client > spill this out using HTML? It's Gmail from my mobile phone, sorry for that. We have to blame Google that they don't think through. &g

Re: [PATCH v3 3/4] watchdog: simatic-ipc-wdt: add new driver for Siemens Industrial PCs

2021-04-07 Thread Andy Shevchenko
is should be two separate drivers. > In fact the latter should very likely be based on that gpio pinctl, > whether it really needs to be a separate driver will have to be seen. > There are probably pros and cons for both options. -- With Best Regards, Andy Shevchenko

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

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 7, 2021 at 11:17 AM Kees Cook wrote: > > On Tue, Apr 06, 2021 at 04:31:58PM +0300, 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 an

Re: [PATCH v7 1/2] Added AMS tsl2591 driver implementation

2021-04-07 Thread Andy Shevchenko
itto. ... > + if (!i2c_check_functionality(client->adapter, > +I2C_FUNC_SMBUS_BYTE_DATA)) { One line? > + dev_err(>dev, > + "I2C smbus byte data functionality is not > supported\n"); > + return -EOPNOTSUPP; > + } ... > + /* > +* Add chip off to automatically managed path and disable runtime > +* power management. This ensures that the chip power management > +* is handled correctly on driver remove. tsl2591_chip_off must be tsl2591_chip_off() > +* added to the managed path after pm runtime is enabled and before > +* any error exit paths are met to ensure we're not left in a state > +* of pm runtime not being disabled properly. > +*/ -- With Best Regards, Andy Shevchenko

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

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 7, 2021 at 7:59 AM Dinghao Liu wrote: > > When lidar_write_control() fails, a pairing PM usage counter > decrement is needed to keep the counter balanced. FWIW, Reviewed-by: Andy Shevchenko > Signed-off-by: Dinghao Liu > --- > drivers/iio/proximity/pulsedlight-l

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

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 7, 2021 at 10:25 AM Luis Chamberlain wrote: > > On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: > > diff --git a/include/linux/panic_notifier.h b/include/linux/panic_notifier.h > > new file mode 100644 > > index ..41e32483d7a7 >

Re: [PATCH v24 25/30] x86/cet/shstk: Handle signals for shadow stack

2021-04-06 Thread Andy Lutomirski
On Thu, Apr 1, 2021 at 3:11 PM Yu-cheng Yu wrote: > > When shadow stack is enabled, a task's shadow stack states must be saved > along with the signal context and later restored in sigreturn. However, > currently there is no systematic facility for extending a signal context. > > Introduce a

Re: [PATCH v24 24/30] x86/cet/shstk: Introduce shadow stack token setup/verify routines

2021-04-06 Thread Andy Lutomirski
On Thu, Apr 1, 2021 at 3:12 PM Yu-cheng Yu wrote: > > A shadow stack restore token marks a restore point of the shadow stack, and > the address in a token must point directly above the token, which is within > the same shadow stack. This is distinctively different from other pointers > on the

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

2021-04-06 Thread Andy Shevchenko
to avoid twisted indirected includes for existing users. Signed-off-by: Andy Shevchenko --- arch/powerpc/kernel/setup-common.c | 1 + arch/x86/include/asm/desc.h | 1 + arch/x86/kernel/cpu/mshyperv.c | 1 + arch/x86/kernel/setup.c | 1 + drivers/char/ipmi

Re: [PATCH v29 0/6] JTAG driver introduction

2021-04-06 Thread Andy Shevchenko
t to be > generic. My impression is that in its current state it's not adequate > for the purpose. > > [0] https://bitbucket.org/paulfertser/mlnx_cpldprog_bitbake > [1] http://openocd.zylin.com/#/c/5976/ > [2] http://openocd.zylin.com/#/c/5975/ -- With Best Regards, Andy Shevchenko

[PATCH v1 1/1] misc: pti: Remove Kconfig leftovers

2021-04-06 Thread Andy Shevchenko
The commit 8ba59e9dee31 ("misc: pti: Remove driver for deprecated platform") got rid of deprecated drivers under TTY subsystem, but cleaned only one Kconfig entry. Remove Kconfig leftovers. Fixes: 8ba59e9dee31 ("misc: pti: Remove driver for deprecated platform") Signed-off

[PATCH v1 1/1] mfd: core: Use acpi_find_child_device() for child devices lookup

2021-04-06 Thread Andy Shevchenko
are using it, according to Microsoft specifications for embedded platforms. Signed-off-by: Andy Shevchenko --- Validated on Intel Galileo Gen 2. drivers/mfd/mfd-core.c | 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd

Re: [PATCH v1 0/2] mfd: intel_quark_i2c_gpio: Covert I²C part to software nodes

2021-04-06 Thread Andy Shevchenko
then? -- With Best Regards, Andy Shevchenko

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

2021-04-06 Thread Andy Shevchenko
On Tue, Mar 30, 2021 at 07:46:58AM +, Flavio Suligoi wrote: > Hi Andy, > ... > > 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 appear. This is

[PATCH v2 1/1] time64.h: Consolidated PSEC_PER_SEC definition

2021-04-06 Thread Andy Shevchenko
We have currently three users of the PSEC_PER_SEC each of them defining it individually. Instead, move it to time64.h to be available for everyone. There is a new user coming with the same constant in use. It will also make its life easier. Signed-off-by: Andy Shevchenko Acked-by: Heiko

[PATCH net-next v1 1/1] stmmac: intel: Drop duplicate ID in the list of PCI device IDs

2021-04-06 Thread Andy Shevchenko
The PCI device IDs are defined with a prefix PCI_DEVICE_ID. There is no need to repeat the ID part at the end of each definition. Signed-off-by: Andy Shevchenko --- .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 60 +-- 1 file changed, 30 insertions(+), 30 deletions(-) diff

Re: [PATCH v4] gpio: mpc8xxx: Add ACPI support

2021-04-06 Thread Andy Shevchenko
On Mon, Mar 22, 2021 at 5:31 AM Ran Wang wrote: > > Current implementation only supports DT, now add ACPI support. FWIW, Reviewed-by: Andy Shevchenko > Signed-off-by: Ran Wang > --- > Change in v4: > - Update error print for gpiochip_add_data() to fix wrong info. in ACPI

Re: [PATCH] h8300: rearrange headers inclusion order in asm/bitops

2021-04-05 Thread Andy Shevchenko
ompile-time implicit function declaration error. Whit above commit message rephrasing: Reviewed-by: Andy Shevchenko > Reported-by: kernel test robot > Signed-off-by: Yury Norov > --- > arch/h8300/include/asm/bitops.h | 8 > 1 file changed, 4 insertions(+), 4 deleti

Re: [PATCH v1 1/1] i2c: designware: Adjust bus_freq_hz when refuse high speed mode set

2021-04-05 Thread Andy Shevchenko
On Wed, Mar 31, 2021 at 09:37:41PM +, Song Bao Hua (Barry Song) wrote: > > From: Andy Shevchenko [mailto:andriy.shevche...@linux.intel.com] > > Sent: Thursday, April 1, 2021 12:05 AM > > To: Andy Shevchenko ; Serge Semin > > ; linux-...@vger.kernel.org; > >

[PATCH v1 1/1] media: ipu3-cio2: Fix referece counting when looping over ACPI devices

2021-04-04 Thread Andy Shevchenko
cio2-bridge to ipu3-cio2 driver") Cc: Daniel Scally Cc: Sakari Ailus Signed-off-by: Andy Shevchenko --- drivers/media/pci/intel/ipu3/cio2-bridge.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/pci/intel/ipu3/cio2-bridge.c b/drivers/media/pci/

[PATCH v2 1/1] efi/dev-path-parser: Switch to use for_each_acpi_dev_match()

2021-04-04 Thread Andy Shevchenko
Switch to use for_each_acpi_dev_match() instead of home grown analogue. No functional change intended. Signed-off-by: Andy Shevchenko --- v2: fixed refcounting (example from which I took the v1 approach has been broken, fix is sent :-) drivers/firmware/efi/dev-path-parser.c | 49

[PATCH v1 1/1] efi/dev-path-parser: Switch to use for_each_acpi_dev_match()

2021-04-04 Thread Andy Shevchenko
Switch to use for_each_acpi_dev_match() instead of home grown analogue. No functional change intended. Signed-off-by: Andy Shevchenko --- drivers/firmware/efi/dev-path-parser.c | 47 +- 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/drivers/firmware/efi

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

2021-04-03 Thread Andy Shevchenko
On Fri, Apr 2, 2021 at 11:14 AM Lars-Peter Clausen wrote: > > On 4/1/21 11:36 AM, Andy Shevchenko wrote: > > [...] > >> + case IIO_CHAN_INFO_SCALE: > >> + /* Conversion from 10s of uC to mC > >> +

[PATCH v2 1/2] iio: trigger: Replace explicit casting and wrong specifier with proper one

2021-04-02 Thread Andy Shevchenko
By unknown reason device name is set with an index casted from int to unsigned long while at the same time with "%ld" specifier. Both parts seems wrong to me, thus replace replace explicit casting and wrong specifier with proper one, i.e. "%d". Signed-off-by: Andy Shevche

[PATCH v2 2/2] iio: trigger: Fix strange (ladder-type) indentation

2021-04-02 Thread Andy Shevchenko
In some cases indentation looks a bit weird with starting from = sign and being in a ladder-type style. Unify it across the module. While at it, add blank line after definition block where it needed, Signed-off-by: Andy Shevchenko --- v2: fixed typo in the commit message (tupe->type) driv

Re: [PATCH v1 1/2] iio: trigger: Replace explicit casting and wrong specifier with proper one

2021-04-02 Thread Andy Shevchenko
On Fri, Apr 2, 2021 at 4:25 PM Andy Shevchenko wrote: > On Friday, April 2, 2021, Jonathan Cameron wrote: >> On Thu, 1 Apr 2021 17:54:56 +0300 >> Andy Shevchenko wrote: >> >> > By unknown reason device name is set with an index casted from int >> >

[PATCH v2 10/10] ipmi_si: Join string literals back

2021-04-02 Thread Andy Shevchenko
For easy grepping on debug purposes join string literals back in the messages. No functional change. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_msghandler.c | 3 +- drivers/char/ipmi/ipmi_si_hardcode.c | 50 +--- drivers/char/ipmi/ipmi_si_hotmod.c

[PATCH v2 05/10] ipmi_si: Introduce ipmi_panic_event_str[] array

2021-04-02 Thread Andy Shevchenko
Instead of repeating twice the constant literals, introduce ipmi_panic_event_str[] array. It allows to simplify the code with help of match_string() API. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_msghandler.c | 51 +++-- 1 file changed, 19 insertions

[PATCH v2 07/10] ipmi_si: Get rid of ->addr_source_cleanup()

2021-04-02 Thread Andy Shevchenko
The ->addr_source_cleanup() callback is solely used by PCI driver and only for one purpose, i.e. to disable device. Get rid of ->addr_source_cleanup() by switching to PCI managed API. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si.h | 2 -- drivers/char/ipmi/ipmi_si_

[PATCH v2 06/10] ipmi_si: Reuse si_to_str[] array in ipmi_hardcode_init_one()

2021-04-02 Thread Andy Shevchenko
Instead of making the comparison one by one, reuse si_to_str[] array in ipmi_hardcode_init_one() in conjunction with match_string() API. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si.h | 6 +- drivers/char/ipmi/ipmi_si_hardcode.c | 23

[PATCH v2 08/10] ipmi_si: Use strstrip() to remove surrounding spaces

2021-04-02 Thread Andy Shevchenko
Instead of home grown analogue, use strstrip() from the kernel library. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_hotmod.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/char/ipmi/ipmi_si_hotmod.c b/drivers/char/ipmi

[PATCH v2 09/10] ipmi_si: Drop redundant check before calling put_device()

2021-04-02 Thread Andy Shevchenko
put_device() is NULL aware, drop redundant check before calling it. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_hotmod.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/char/ipmi/ipmi_si_hotmod.c b/drivers/char/ipmi/ipmi_si_hotmod.c index

[PATCH v2 01/10] ipmi_si: Switch to use platform_get_mem_or_io()

2021-04-02 Thread Andy Shevchenko
Switch to use new platform_get_mem_or_io() instead of home grown analogue. Note, we also introduce ipmi_set_addr_data_and_space() helper here. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_platform.c | 34 1 file changed, 14 insertions(+), 20

[PATCH v2 00/10] ipmi_si: Set of clean ups

2021-04-02 Thread Andy Shevchenko
the array - patch 6: just exported array w/o moving to header (Corey) - wrapped up cover letter Andy Shevchenko (10): ipmi_si: Switch to use platform_get_mem_or_io() ipmi_si: Remove bogus err_free label ipmi_si: Utilize temporary variable to hold device pointer ipmi_si: Use proper A

[PATCH v2 02/10] ipmi_si: Remove bogus err_free label

2021-04-02 Thread Andy Shevchenko
There is no more 'free' in the error path, so drop the label and return errors inline. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_platform.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/char/ipmi/ipmi_si_platform.c b/drivers

[PATCH v2 03/10] ipmi_si: Utilize temporary variable to hold device pointer

2021-04-02 Thread Andy Shevchenko
Introduce a temporary variable to hold a device pointer. It can be utilized in the ->probe() and save a bit of LOCs. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_platform.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/char/i

[PATCH v2 04/10] ipmi_si: Use proper ACPI macros to check error code for failures

2021-04-02 Thread Andy Shevchenko
Instead of direct comparison, use proper ACPI macros to check error code for failures. While at it, drop unneeded 'else' keyword. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_platform.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers

Re: [RESEND PATCH v4 0/3] Introduce the for_each_set_nbits macro

2021-04-02 Thread Andy Shevchenko
eric bitmap_get_value and _set_value > > drivers/gpio/gpio-thunderx.c | 13 -- > drivers/gpio/gpio-xilinx.c | 52 ++--- > drivers/gpio/gpiolib.c | 90 > drivers/gpio/gpiolib.h | 28 +++ > 4 files changed, 152 insertions(+), 31 deletions(-) > > > base-commit: e1b7033ecdac56c1cc4dff72d67cac25d449efc6 > -- > 2.29.0 > -- With Best Regards, Andy Shevchenko

Re: [PATCH] platform/x86: intel_pmc_core: export platform global_reset via sysfs.

2021-04-02 Thread Andy Shevchenko
he register in MMIO space is defined for Cannon Lake and newer PCHs. > > Cc: David E Box > Reviewed-by: Andy Shevchenko Hmm... okay, I forgot this, so my additional comments above and below. ... > +static int set_global_reset(struct pmc_dev *pmcdev) > +{ > + const st

[PATCH v1 1/1] driver core: enable trace events (devres)

2021-04-01 Thread Andy Shevchenko
Enable trace events for driver core. For now only devres is supported. Signed-off-by: Andy Shevchenko --- drivers/base/Makefile | 3 +++ drivers/base/devres.c | 12 -- drivers/base/trace.c | 10 drivers/base/trace.h | 56 +++ 4 files

Re: [PATCH] iio: adc: stm32-dfsdm: drop __func__ while using Dynamic debug

2021-04-01 Thread Andy Shevchenko
On Thu, Apr 1, 2021 at 8:48 PM Mugilraj Dhavachelvan wrote: > > dropped __func__ while using dev_dbg() and pr_debug() The commit message may be amended, from code perspective LGTM! Reviewed-by: Andy Shevchenko > Signed-off-by: Mugilraj Dhavachelvan > --- > drivers/iio/adc/st

Re: [PATCH v1 3/7] PCI: New Primary to Sideband (P2SB) bridge support library

2021-04-01 Thread Andy Shevchenko
On Sat, Mar 13, 2021 at 10:45:57AM +0100, Henning Schild wrote: > Am Mon, 8 Mar 2021 14:20:16 +0200 > schrieb Andy Shevchenko : ... > > + * pci_p2sb_bar - Get Primary to Sideband bridge (P2SB) device BAR > > + * @pdev: PCI device to get a PCI bus to communicate with > &

Re: [PATCH v1 3/7] PCI: New Primary to Sideband (P2SB) bridge support library

2021-04-01 Thread Andy Shevchenko
On Tue, Mar 09, 2021 at 09:42:52AM +0100, Henning Schild wrote: > Am Mon, 8 Mar 2021 19:42:21 -0600 > schrieb Bjorn Helgaas : > > On Mon, Mar 08, 2021 at 09:16:50PM +0200, Andy Shevchenko wrote: > > > On Mon, Mar 08, 2021 at 12:52:12PM -0600, Bjorn Helgaas wrote: > &g

Re: [PATCH v1 3/7] PCI: New Primary to Sideband (P2SB) bridge support library

2021-04-01 Thread Andy Shevchenko
On Thu, Apr 01, 2021 at 11:42:56AM -0500, Bjorn Helgaas wrote: > On Thu, Apr 01, 2021 at 06:45:02PM +0300, Andy Shevchenko wrote: > > On Tue, Mar 09, 2021 at 09:42:52AM +0100, Henning Schild wrote: > > > Am Mon, 8 Mar 2021 19:42:21 -0600 > > > schrieb Bjorn Helgaas : &

Re: [PATCH v1 3/7] PCI: New Primary to Sideband (P2SB) bridge support library

2021-04-01 Thread Andy Shevchenko
On Thu, Apr 01, 2021 at 09:06:17PM +0300, Mika Westerberg wrote: > On Thu, Apr 01, 2021 at 06:43:11PM +0300, Andy Shevchenko wrote: > > On Sat, Mar 13, 2021 at 10:45:57AM +0100, Henning Schild wrote: > > > Am Mon, 8 Mar 2021 14:20:16 +0200 > > &

[PATCH v1 2/2] iio: trigger: Fix strange (ladder-tupe) indentation

2021-04-01 Thread Andy Shevchenko
In some cases indentation looks a bit weird with starting from = sign and being in a ladder-type style. Unify it across the module. While at it, add blank line after definition block where it needed, Signed-off-by: Andy Shevchenko --- drivers/iio/industrialio-trigger.c | 25

[PATCH v1 1/2] iio: trigger: Replace explicit casting and wrong specifier with proper one

2021-04-01 Thread Andy Shevchenko
By unknown reason device name is set with an index casted from int to unsigned long while at the same time with "%ld" specifier. Both parts seems wrong to me, thus replace replace explicit casting and wrong specifier with proper one, i.e. "%u". Signed-off-by: Andy Shevchen

[PATCH v1 1/1] driver core: Replace printf() specifier and drop unneeded casting

2021-04-01 Thread Andy Shevchenko
The size_t type has very well established specifier, i.e. "%zu", use it directly instead of casting to unsigned long with "%lu". Signed-off-by: Andy Shevchenko --- drivers/base/devres.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/dev

[PATCH v1 1/1] driver core: Cast to (void *) with __force for __percpu pointer

2021-04-01 Thread Andy Shevchenko
Sparse is not happy: drivers/base/devres.c:1230:9: warning: cast removes address space '__percpu' of expression Use __force attribute to make it happy. Signed-off-by: Andy Shevchenko --- drivers/base/devres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base

Re: [PATCH v3 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-04-01 Thread Andy Shevchenko
On Thu, Apr 1, 2021 at 1:44 PM Henning Schild wrote: > > Am Wed, 31 Mar 2021 18:40:23 +0300 > schrieb Andy Shevchenko : > > > On Tue, Mar 30, 2021 at 6:33 PM Henning Schild > > wrote: > > > Am Tue, 30 Mar 2021 15:41:53 +0300 > > > schrieb Andy Shevchenko

Re: [PATCH v6 00/12] lib/find_bit: fast path for small bitmaps

2021-04-01 Thread Andy Shevchenko
On Thu, Apr 1, 2021 at 12:29 PM Arnd Bergmann wrote: > > On Thu, Apr 1, 2021 at 11:16 AM Andy Shevchenko > wrote: > > > > On Thu, Apr 1, 2021 at 3:36 AM Yury Norov wrote: > > > > > > Bitmap operations are much simpler and faster in case of small bit

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

2021-04-01 Thread Andy Shevchenko
O_CALIBBIAS: > + off = (s16)val; Redundant explicit casting. > + return i2c_smbus_write_word_swapped(data->client, > + TMP117_REG_TEMP_OFFSET, off); ... > +static const struct of_device_id tmp117_of_match[] = { > + { .compatible = "ti,tmp117", }, > + { }, No need to comma in terminator line(s). > +}; -- With Best Regards, Andy Shevchenko

Re: [PATCH] iio: adc: bcm_iproc_adc: Use %s and __func__

2021-04-01 Thread Andy Shevchenko
Second, specific to _dbg() variants, with enabled Dynamic Debug it can be chosen at run time! I recommend going through all drivers and drop __func__ near to dev_dbg() and pr_debug(). -- With Best Regards, Andy Shevchenko

Re: [PATCH v6 00/12] lib/find_bit: fast path for small bitmaps

2021-04-01 Thread Andy Shevchenko
4 +- > tools/lib/find_bit.c| 56 +--- > tools/scripts/Makefile.include | 1 + > 15 files changed, 284 insertions(+), 156 deletions(-) > > -- > 2.25.1 > -- With Best Regards, Andy Shevchenko

Re: [PATCH 10/12] lib: add fast path for find_first_*_bit() and find_last_bit()

2021-04-01 Thread Andy Shevchenko
it() functions sit. Acked-by: Andy Shevchenko > Signed-off-by: Yury Norov > Acked-by: Rasmus Villemoes > --- > include/asm-generic/bitops/find.h | 50 --- > include/linux/bitops.h| 12 > lib/find_bit.c| 12 --

Re: [PATCH 09/12] lib: add fast path for find_next_*_bit()

2021-04-01 Thread Andy Shevchenko
17c: d65f03c0ret > > find_next_bit() call is replaced with 6 instructions. find_next_bit() > itself is 41 instructions plus function call overhead. > > Despite inlining, the scripts/bloat-o-meter report smaller .text size > after applying the series: > add/r

Re: [PATCH 07/12] lib: inline _find_next_bit() wrappers

2021-04-01 Thread Andy Shevchenko
On Thu, Apr 1, 2021 at 3:42 AM Yury Norov wrote: > > lib/find_bit.c declares five single-line wrappers for _find_next_bit(). > We may turn those wrappers to inline functions. It eliminates unneeded > function calls and opens room for compile-time optimizations. Acked-by: And

Re: [PATCH 05/12] lib: extend the scope of small_const_nbits() macro

2021-04-01 Thread Andy Shevchenko
On Thu, Apr 1, 2021 at 3:41 AM Yury Norov wrote: > > find_bit would also benefit from small_const_nbits() optimizations. > The detailed comment is provided by Rasmus Villemoes. Thanks, now it looks good! Acked-by: Andy Shevchenko > Suggested-by: Rasmus Villemoes > Signed-off

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

2021-03-31 Thread Andy Lutomirski
On Wed, Mar 31, 2021 at 3:28 PM Len Brown wrote: > > On Wed, Mar 31, 2021 at 12:53 PM Andy Lutomirski wrote: > > > But this whole annotation thing will require serious compiler support. > > We already have problems with compilers inlining functions and getting > >

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

2021-03-31 Thread Andy Lutomirski
> On Mar 31, 2021, at 9:31 AM, Len Brown wrote: > > On Tue, Mar 30, 2021 at 6:01 PM David Laight wrote: > >>> Can we leave it in live registers? That would be the speed-of-light >>> signal handler approach. But we'd need to teach the signal handler to >>> not clobber it. Perhaps that

[PATCH v1 1/2] mfd: intel_quark_i2c_gpio: Convert I²C to use software nodes

2021-03-31 Thread Andy Shevchenko
-by: Andy Shevchenko --- drivers/mfd/intel_quark_i2c_gpio.c | 41 +++--- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/drivers/mfd/intel_quark_i2c_gpio.c b/drivers/mfd/intel_quark_i2c_gpio.c index 9a5f84b93776..a43993e38b6e 100644 --- a/drivers/mfd

[PATCH v1 2/2] i2c: designware: Get rid of legacy platform data

2021-03-31 Thread Andy Shevchenko
Platform data is a legacy interface to supply device properties to the driver. In this case we don't have anymore in-kernel users for it. Just remove it for good. Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-platdrv.c | 7 +-- include/linux/platform_data/i2c

Re: [PATCH v3 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-31 Thread Andy Shevchenko
On Tue, Mar 30, 2021 at 6:33 PM Henning Schild wrote: > Am Tue, 30 Mar 2021 15:41:53 +0300 > schrieb Andy Shevchenko : > > On Tue, Mar 30, 2021 at 3:35 PM Henning Schild > > wrote: > > > Am Tue, 30 Mar 2021 15:15:16 +0300 > > > schrieb Andy Shevchenko : >

[PATCH v1 1/1] driver core: platform: Declare early_platform_cleanup() prototype

2021-03-31 Thread Andy Shevchenko
early_platform_cleanup() prototype in the header to make everyone happy. Fixes: eecd37e105f0 ("drivers: Fix boot problem on SuperH") Cc: Guenter Roeck Signed-off-by: Andy Shevchenko --- include/linux/platform_device.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc

[PATCH v1 1/1] driver core: platform: Make clear error code used for missed IRQ

2021-03-31 Thread Andy Shevchenko
We have few code paths where same error code is assigned and returned for missed IRQ. Unify that under single error path. Signed-off-by: Andy Shevchenko --- drivers/base/platform.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/base/platform.c b/drivers

[PATCH v1 1/1] driver core: platform: Make platform_get_irq_optional() optional

2021-03-31 Thread Andy Shevchenko
igned-off-by: Andy Shevchenko --- drivers/base/platform.c | 55 + 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 6e1f8e0b661c..d82db3eabcd4 100644 --- a/drivers/base/platform.c +++ b/dri

Re: [PATCH v4] i2c: designware: Add driver support for AMD NAVI GPU

2021-03-31 Thread Andy Shevchenko
already in the commercial market, > hence some of the I2C parameters are statically programmed as they > can not be part of the ACPI table. Looks good enough to me, thanks. Reviewed-by: Andy Shevchenko > Reviewed-by: Shyam Sundar S K > Co-developed-by: Nehal Bakulchandra Shah > Sign

Re: [PATCH 3/3] mfd: tqmx86: add support for TQMxE40M

2021-03-31 Thread Andy Shevchenko
On Wed, Mar 31, 2021 at 4:33 PM Matthias Schiffer wrote: > On Wed, 2021-03-31 at 15:37 +0300, Andy Shevchenko wrote: > > On Wed, Mar 31, 2021 at 2:38 PM Matthias Schiffer > > wrote: ... > > > + return 24000; > > > > AFAICS it will return 24

Re: [PATCH 2/3] mfd: tqmx86: clear GPIO IRQ resource when no IRQ is set

2021-03-31 Thread Andy Shevchenko
On Wed, Mar 31, 2021 at 4:24 PM Matthias Schiffer wrote: > On Wed, 2021-03-31 at 15:35 +0300, Andy Shevchenko wrote: > > On Wed, Mar 31, 2021 at 2:39 PM Matthias Schiffer > > wrote: ... > > > + tqmx_gpio_resources[0].flags = 0; > > > >

Re: [PATCH 1/3] gpio: tqmx86: really make IRQ optional

2021-03-31 Thread Andy Shevchenko
On Wed, Mar 31, 2021 at 4:36 PM Matthias Schiffer wrote: > > On Wed, 2021-03-31 at 15:39 +0300, Andy Shevchenko wrote: > > On Wed, Mar 31, 2021 at 3:37 PM Matthias Schiffer > > wrote: > > > On Wed, 2021-03-31 at 15:29 +0300, Andy Shevchenko wrote: ... > >

Re: (EXT) Re: [PATCH 1/3] gpio: tqmx86: really make IRQ optional

2021-03-31 Thread Andy Shevchenko
On Wed, Mar 31, 2021 at 3:37 PM Matthias Schiffer wrote: > On Wed, 2021-03-31 at 15:29 +0300, Andy Shevchenko wrote: > > On Wed, Mar 31, 2021 at 2:37 PM Matthias Schiffer > > wrote: ... > > > - irq = platform_get_irq(pdev, 0); > > > -

Re: [PATCH 3/3] mfd: tqmx86: add support for TQMxE40M

2021-03-31 Thread Andy Shevchenko
return 33000; > default: > - return 0; > + return 24000; AFAICS it will return 24 MHz for "Unknown" board. Is it okay to be so brave? -- With Best Regards, Andy Shevchenko

Re: [PATCH 2/3] mfd: tqmx86: clear GPIO IRQ resource when no IRQ is set

2021-03-31 Thread Andy Shevchenko
umes the IRQ resource is first. */ > tqmx_gpio_resources[0].start = gpio_irq; > + } else { > + tqmx_gpio_resources[0].flags = 0; Please set IORESOURCE_DISABLED flag in the initial structure instead. > } -- With Best Regards, Andy Shevchenko

Re: [PATCH 1/3] gpio: tqmx86: really make IRQ optional

2021-03-31 Thread Andy Shevchenko
Also you missed a Fixes tag. -- With Best Regards, Andy Shevchenko

Re: [PATCH 1/3] gpio: tqmx86: really make IRQ optional

2021-03-31 Thread Andy Shevchenko
; 0) irq = 0; In such a case below change is not required. ... > - if (irq) { > + if (irq > 0) { > struct irq_chip *irq_chip = >irq_chip; > u8 irq_status; -- With Best Regards, Andy Shevchenko

Re: [PATCH 1/3] docs: gpio: mockup: Fix parameter name

2021-03-31 Thread Andy Shevchenko
g format for the Fixes tag. I highly recommend to add in your .gitconfig file an alias: one = show -s --pretty='format:%h (\"%s\")' `git one ` will give you proper value to refer to the commit in question. -- With Best Regards, Andy Shevchenko

Re: [PATCH 1/2] gpio: sysfs: Obey valid_mask

2021-03-31 Thread Andy Shevchenko
are real Fixes tag issues from another series. I will comment there as well to let an author know. -- With Best Regards, Andy Shevchenko

[PATCH v1 1/1] i2c: designware: Adjust bus_freq_hz when refuse high speed mode set

2021-03-31 Thread Andy Shevchenko
ot;Song Bao Hua (Barry Song)" Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-master.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c index 34bb4e21bcc3..9bfa06e31eec 100644 ---

[PATCH v2 1/1] i2c: drivers: Use generic definitions for bus frequencies (part 2)

2021-03-31 Thread Andy Shevchenko
Since we have generic definitions for bus frequencies, let's use them. Cc: Wolfram Sang Signed-off-by: Andy Shevchenko Acked-by: Khalil Blaiech --- v2: added tag (Khalil), converted one missed place in DesignWare driver drivers/i2c/busses/i2c-designware-master.c | 2 +- drivers/i2c/busses

Re: [PATCH 5/5] i2c: designware: Switch over to i2c_freq_mode_string()

2021-03-31 Thread Andy Shevchenko
On Tue, Mar 30, 2021 at 10:19:26PM +0800, Yicong Yang wrote: > From: Andy Shevchenko > > Use generic i2c_freq_mode_string() helper to print chosen bus speed. Since it will be a new version (based on Jarkko's comments), I guess you may add his Ack here that he gave against standalone s

Re: [PATCH 5/5] i2c: designware: Switch over to i2c_freq_mode_string()

2021-03-31 Thread Andy Shevchenko
ically we have to adjust timings here to reflect this change. > dev->hs_hcnt = 0; > dev->hs_lcnt = 0; > } -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/1] i2c: designware: Switch over to i2c_freq_mode_string()

2021-03-31 Thread Andy Shevchenko
On Wed, Mar 31, 2021 at 11:42 AM Jarkko Nikula wrote: > > On 3/30/21 4:46 PM, Andy Shevchenko wrote: > > Use generic i2c_freq_mode_string() helper to print chosen bus speed. > > > > Signed-off-by: Andy Shevchenko > > --- > > Depends on the "Add sup

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