Re: [PATCH v2 2/6] iio: light: stk3310: Implement vdd supply and power it off during suspend

2024-04-24 Thread Andy Shevchenko
On Wed, Apr 24, 2024 at 7:14 PM Ondřej Jirman wrote: > On Wed, Apr 24, 2024 at 06:20:41PM GMT, Andy Shevchenko wrote: > > On Wed, Apr 24, 2024 at 3:59 PM Ondřej Jirman wrote: > > > On Wed, Apr 24, 2024 at 02:16:06AM GMT, Andy Shevchenko wrote: > > > > On Wed

Re: [PATCH v2 2/6] iio: light: stk3310: Implement vdd supply and power it off during suspend

2024-04-24 Thread Andy Shevchenko
On Wed, Apr 24, 2024 at 3:59 PM Ondřej Jirman wrote: > On Wed, Apr 24, 2024 at 02:16:06AM GMT, Andy Shevchenko wrote: > > On Wed, Apr 24, 2024 at 1:41 AM Aren Moynihan > > wrote: ... > > > ret = stk3310_init(indio_dev); > > > if (ret <

Re: [PATCH v2 2/6] iio: light: stk3310: Implement vdd supply and power it off during suspend

2024-04-23 Thread Andy Shevchenko
get_drvdata() directly. Jonathan, do we have something like iio_priv_from_drvdata(struct device *dev)? Seems many drivers may utilise it. > } ... > static int stk3310_resume(struct device *dev) Ditto. -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 3/6] iio: light: stk3310: Manage LED power supply

2024-04-23 Thread Andy Shevchenko
et regulator vdd > failed\n"); > > + data->led_reg = devm_regulator_get(>dev, "leda"); > + if (IS_ERR(data->led_reg)) > + return dev_err_probe(>dev, ret, "get regulator led > failed\n"); Can't you use a bulk regulator API instead? -- With Best Regards, Andy Shevchenko

Re: [PATCH 2/4] iio: light: stk3310: Implement vdd supply and power it off during suspend

2024-04-18 Thread Andy Shevchenko
On Thu, Apr 18, 2024 at 8:50 PM Aren wrote: > On Thu, Apr 18, 2024 at 06:56:09PM +0300, Andy Shevchenko wrote: > > On Thu, Apr 18, 2024 at 6:06 PM Aren wrote: > > > On Mon, Apr 15, 2024 at 05:04:53PM +0300, Andy Shevchenko wrote: > > > > On Sun, Apr 14,

Re: [PATCH 2/4] iio: light: stk3310: Implement vdd supply and power it off during suspend

2024-04-18 Thread Andy Shevchenko
On Thu, Apr 18, 2024 at 6:06 PM Aren wrote: > On Mon, Apr 15, 2024 at 05:04:53PM +0300, Andy Shevchenko wrote: > > On Sun, Apr 14, 2024 at 8:57 PM Aren Moynihan > > wrote: ... > > > stk3310_set_state(iio_priv(indio_dev), STK3310_STATE_STANDBY); > &g

Re: [PATCH 3/4] iio: light: stk3310: log error if reading the chip id fails

2024-04-15 Thread Andy Shevchenko
de it seems that this one is strictly part of the probe phase, which means we may use return dev_err_probe(...); pattern. Yet, you may add another patch to clean up all of them: _probe(), _init(), _regmap_init() to use the same pattern everywhere. -- With Best Regards, Andy Shevchenko

Re: [PATCH 2/4] iio: light: stk3310: Implement vdd supply and power it off during suspend

2024-04-15 Thread Andy Shevchenko
heck the order of freeing resources, be sure you have no devm_*() releases happening before this call. ... > + usleep_range(1000, 2000); fsleep() -- With Best Regards, Andy Shevchenko

Re: [PATCH] [v3] module: don't ignore sysfs_create_link() failures

2024-03-26 Thread Andy Shevchenko
nd. So, we will reduce a technical debt, and not adding to it. > + goto out_detach; > + } ... > +int module_add_driver(struct module *mod, struct device_driver *drv) > { > char *driver_name; > - int no_warn; > + int ret; I would move it... > struct module_kobject *mk = NULL; ...to be here. -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/1] ACPI: NFIT: Switch to use acpi_evaluate_dsm_typed()

2024-02-02 Thread Andy Shevchenko
On Mon, Nov 20, 2023 at 07:19:44PM +0200, Andy Shevchenko wrote: > On Mon, Nov 20, 2023 at 04:11:54PM +0100, Rafael J. Wysocki wrote: > > On Mon, Nov 20, 2023 at 4:03 PM Andy Shevchenko > > wrote: > > > On Thu, Oct 19, 2023 at 06:03:28PM -0700, Dan Williams wrote: >

Re: [PATCH] tracing histograms: Simplify parse_actions() function

2024-01-08 Thread Andy Shevchenko
need data to be assigned here as well ret = -EINVAL; ... } -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 0/5] params: harden string ops and allocatio ops

2023-12-01 Thread Andy Shevchenko
On Fri, Dec 01, 2023 at 09:43:34AM -0800, Kees Cook wrote: > On Mon, 20 Nov 2023 17:11:41 +0200, Andy Shevchenko wrote: > > A couple of patches are for get the string ops, used in the module, > > slightly harden. On top a few cleanups. > > > > Since the main part i

Re: [PATCH v3 0/5] params: harden string ops and allocatio ops

2023-12-01 Thread Andy Shevchenko
On Mon, Nov 20, 2023 at 05:11:41PM +0200, Andy Shevchenko wrote: > A couple of patches are for get the string ops, used in the module, > slightly harden. On top a few cleanups. > > Since the main part is rather hardening, I think the Kees' tree is > the best fit for the series. I

[PATCH v3 2/5] params: Do not go over the limit when getting the string length

2023-11-20 Thread Andy Shevchenko
We can use strnlen() even on early stages and it prevents from going over the string boundaries in case it's already too long. Reviewed-by: Luis Chamberlain Reviewed-by: Kees Cook Signed-off-by: Andy Shevchenko --- kernel/params.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions

[PATCH v3 5/5] params: Fix multi-line comment style

2023-11-20 Thread Andy Shevchenko
The multi-line comment style in the file is rather arbitrary. Make it follow the standard one. Reviewed-by: Luis Chamberlain Reviewed-by: Kees Cook Signed-off-by: Andy Shevchenko --- kernel/params.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git

[PATCH v3 4/5] params: Sort headers

2023-11-20 Thread Andy Shevchenko
Sort the headers in alphabetic order in order to ease the maintenance for this part. Reviewed-by: Luis Chamberlain Reviewed-by: Kees Cook Signed-off-by: Andy Shevchenko --- kernel/params.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kernel/params.c b

[PATCH v3 1/5] params: Introduce the param_unknown_fn type

2023-11-20 Thread Andy Shevchenko
Introduce a new type for the callback to parse an unknown argument. This unifies function prototypes which takes that as a parameter. Reviewed-by: Luis Chamberlain Reviewed-by: Kees Cook Signed-off-by: Andy Shevchenko --- include/linux/moduleparam.h | 6 +++--- kernel/params.c | 8

[PATCH v3 3/5] params: Use size_add() for kmalloc()

2023-11-20 Thread Andy Shevchenko
Prevent allocations from integer overflow by using size_add(). Reviewed-by: Luis Chamberlain Reviewed-by: Kees Cook Signed-off-by: Andy Shevchenko --- kernel/params.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/params.c b/kernel/params.c index f8e3c4139854

[PATCH v3 0/5] params: harden string ops and allocatio ops

2023-11-20 Thread Andy Shevchenko
ies (Luis) Andy Shevchenko (5): params: Introduce the param_unknown_fn type params: Do not go over the limit when getting the string length params: Use size_add() for kmalloc() params: Sort headers params: Fix multi-line comment style include/linux/moduleparam.h | 6 ++-- kernel/param

Re: [PATCH v1 1/1] ACPI: NFIT: Switch to use acpi_evaluate_dsm_typed()

2023-11-20 Thread Andy Shevchenko
On Thu, Oct 19, 2023 at 06:03:28PM -0700, Dan Williams wrote: > Andy Shevchenko wrote: > > The acpi_evaluate_dsm_typed() provides a way to check the type of the > > object evaluated by _DSM call. Use it instead of open coded variant. > > Looks good to me. > > Review

Re: [PATCH v1 1/1] ACPI: NFIT: Switch to use acpi_evaluate_dsm_typed()

2023-10-19 Thread Andy Shevchenko
On Mon, Oct 02, 2023 at 04:54:58PM +0300, Andy Shevchenko wrote: > The acpi_evaluate_dsm_typed() provides a way to check the type of the > object evaluated by _DSM call. Use it instead of open coded variant. Dan, do you have any comments? -- With Best Regards, Andy Shevchenko

Re: [PATCH v2] ACPI: NFIT: Fix local use of devm_*()

2023-10-14 Thread Andy Shevchenko
for educational purposes." -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 3/6] ACPI: AC: Replace acpi_driver with platform_driver

2023-10-07 Thread Andy Shevchenko
eed to get from ac to > the underlying platform device, a pointer to it can be added to struct > acpi_ac without removing the ACPI device pointer from it. The idea behind is to eliminate data duplication. > > unsigned long long state; > > struct notifier_block battery_nb; > > }; -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 3/6] ACPI: AC: Replace acpi_driver with platform_driver

2023-10-06 Thread Andy Shevchenko
event) { > default: > - acpi_handle_debug(device->handle, "Unsupported event [0x%x]\n", > + acpi_handle_debug(ACPI_HANDLE(ac->dev), "Unsupported event > [0x%x]\n", > event); Does it makes any sense now? Basically it duplicates the ACPI_COMPANION() call as Rafael pointed out in previous version discussion. > fallthrough; -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/1] ACPI: NFIT: Switch to use acpi_evaluate_dsm_typed()

2023-10-03 Thread Andy Shevchenko
On Mon, Oct 02, 2023 at 10:27:02PM +0200, Wilczynski, Michal wrote: > On 10/2/2023 3:54 PM, Andy Shevchenko wrote: ... > > + out_obj = acpi_evaluate_dsm_typed(handle, guid, revid, func, _obj, > > ACPI_TYPE_BUFFER); > > This line is 90 characters long, wouldn't it be be

[PATCH v1 1/1] ACPI: NFIT: Switch to use acpi_evaluate_dsm_typed()

2023-10-02 Thread Andy Shevchenko
The acpi_evaluate_dsm_typed() provides a way to check the type of the object evaluated by _DSM call. Use it instead of open coded variant. Signed-off-by: Andy Shevchenko --- drivers/acpi/nfit/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/nfit

[PATCH v2 4/5] params: Sort headers

2023-10-02 Thread Andy Shevchenko
Sort the headers in alphabetic order in order to ease the maintenance for this part. Signed-off-by: Andy Shevchenko --- kernel/params.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/params.c b/kernel/params.c index c3a029fe183d..eb55b32399b4 100644

[PATCH v2 1/5] params: Introduce the param_unknown_fn type

2023-10-02 Thread Andy Shevchenko
Introduce a new type for the callback to parse an unknown argument. This unifies function prototypes which takes that as a parameter. Signed-off-by: Andy Shevchenko --- include/linux/moduleparam.h | 6 +++--- kernel/params.c | 8 ++-- 2 files changed, 5 insertions(+), 9

[PATCH v2 3/5] params: Use size_add() for kmalloc()

2023-10-02 Thread Andy Shevchenko
Prevent allocations from integer overflow by using size_add(). Signed-off-by: Andy Shevchenko --- kernel/params.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/params.c b/kernel/params.c index f8e3c4139854..c3a029fe183d 100644 --- a/kernel/params.c +++ b/kernel

[PATCH v2 0/5] params: harden string ops and allocatio ops

2023-10-02 Thread Andy Shevchenko
mit() conversion as it revealed an issue, i.e. reuse getters with non-page-aligned pointer, which would be addressed separately - added cover letter and clarified the possible route for the series (Luis) Andy Shevchenko (5): params: Introduce the param_unknown_fn type params: Do not go o

[PATCH v2 2/5] params: Do not go over the limit when getting the string length

2023-10-02 Thread Andy Shevchenko
We can use strnlen() even on early stages and it prevents from going over the string boundaries in case it's already too long. Signed-off-by: Andy Shevchenko --- kernel/params.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kernel/params.c b/kernel/params.c index

[PATCH v2 5/5] params: Fix multi-line comment style

2023-10-02 Thread Andy Shevchenko
The multi-line comment style in the file is rather arbitrary. Make it follow the standard one. Signed-off-by: Andy Shevchenko --- kernel/params.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/kernel/params.c b/kernel/params.c index eb55b32399b4

Re: [PATCH v1 2/2] ACPI: NFIT: Use modern scope based rollback

2023-10-02 Thread Andy Shevchenko
On Tue, Sep 26, 2023 at 09:45:20PM +0300, Michal Wilczynski wrote: > Change rollback in acpi_nfit_init_interleave_set() to use modern scope > based attribute __free(). This is similar to C++ RAII and is a preferred > way for handling local memory allocations. LGTM, Reviewed-by: Andy S

Re: [PATCH v1 1/2] ACPI: NFIT: Fix memory leak, and local use of devm_*()

2023-10-02 Thread Andy Shevchenko
local leak'. > > Fix this by switching from devm_kcalloc() to kcalloc(), and adding > proper rollback. LGTM, Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 9/9] ACPI: NFIT: Don't use KBUILD_MODNAME for driver name

2023-09-25 Thread Andy Shevchenko
we won't have any users outside of existing model (instantiating via ACPI ID). All the above is "strictly speaking"... -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/1] lib/string_helpers: Don't copy a tail in kstrdup_and_replace() if 'new' is \0

2023-09-14 Thread Andy Shevchenko
On Wed, Sep 13, 2023 at 12:45:57PM +0300, Andy Shevchenko wrote: > The kstrdup_and_replace() takes two characters, old and new, to replace > former with latter after the copying of the original string. But in case > when new is a NUL, there is no point to copy the rest of t

[PATCH v1 1/1] lib/string_helpers: Don't copy a tail in kstrdup_and_replace() if 'new' is \0

2023-09-13 Thread Andy Shevchenko
string and not a buffer of the size filled with a given data. With this we can optimize the memory consumption by copying only meaningful part of the original string and drop the rest. Signed-off-by: Andy Shevchenko --- The first user of this is pending: https://lore.kernel.org/platform-driver-x86

Re: [PATCH] nvdimm: Replace the usage of a variable by a direct function call in nd_pfn_validate()

2023-04-14 Thread Andy Shevchenko
th uuid_equal(). > return -ENODEV; -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/1] nvdimm/namespace: return uuid_null only once in nd_dev_to_uuid()

2022-07-14 Thread Andy Shevchenko
On Thu, Jul 14, 2022 at 11:24:05AM -0700, Dan Williams wrote: > Andy Shevchenko wrote: > > Refactor nd_dev_to_uuid() in order to make code shorter and cleaner > > by joining conditions and hence returning uuid_null only once. > > Apologies for the delay, applied for v5.20.

Re: [PATCH v1 1/1] nvdimm/namespace: drop nested variable in create_namespace_pmem()

2022-06-21 Thread Andy Shevchenko
On Tue, Jun 07, 2022 at 07:49:37PM +0300, Andy Shevchenko wrote: > Kernel build bot reported: > > namespace_devs.c:1991:10: warning: Local variable 'uuid' shadows outer > variable [shadowVariable] > > Refactor create_namespace_pmem() by dropping a nested version of > th

[PATCH v1 1/1] nvdimm/namespace: drop nested variable in create_namespace_pmem()

2022-06-07 Thread Andy Shevchenko
ernel test robot Signed-off-by: Andy Shevchenko --- drivers/nvdimm/namespace_devs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c index 0f863fda56e6..dfade66bab73 100644 --- a/drivers/nvdimm/namespace_devs.c +++ b/driv

[PATCH v1 1/1] nvdimm/namespace: drop unneeded temporary variable in size_store()

2022-06-07 Thread Andy Shevchenko
Refactor size_store() in order to remove temporary variable on stack by joining conditionals. Signed-off-by: Andy Shevchenko --- drivers/nvdimm/namespace_devs.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm

[PATCH v1 1/1] nvdimm/namespace: return uuid_null only once in nd_dev_to_uuid()

2022-06-07 Thread Andy Shevchenko
Refactor nd_dev_to_uuid() in order to make code shorter and cleaner by joining conditions and hence returning uuid_null only once. Signed-off-by: Andy Shevchenko --- drivers/nvdimm/namespace_devs.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/nvdimm

Re: [PATCH v1 1/1] ACPI: Switch to use list_entry_is_head() helper

2022-03-02 Thread Andy Shevchenko
On Wed, Mar 02, 2022 at 05:36:20PM +0100, Rafael J. Wysocki wrote: > On Wed, Mar 2, 2022 at 4:50 PM Andy Shevchenko > wrote: > > On Fri, Feb 11, 2022 at 01:04:23PM +0200, Andy Shevchenko wrote: > > > Since we got list_entry_is_head() helper in the generic header, > &g

Re: [PATCH v1 1/1] ACPI: Switch to use list_entry_is_head() helper

2022-03-02 Thread Andy Shevchenko
On Fri, Feb 11, 2022 at 01:04:23PM +0200, Andy Shevchenko wrote: > Since we got list_entry_is_head() helper in the generic header, > we may switch the ACPI modules to use it. This eliminates the > need in additional variable. In some cases it reduces critical > sections as well. Besi

[PATCH v1 1/1] ACPI: Switch to use list_entry_is_head() helper

2022-02-11 Thread Andy Shevchenko
Since we got list_entry_is_head() helper in the generic header, we may switch the ACPI modules to use it. This eliminates the need in additional variable. In some cases it reduces critical sections as well. Signed-off-by: Andy Shevchenko --- drivers/acpi/acpi_ipmi.c | 16

[PATCH v1 1/1] ACPI: NFIT: Import GUID before use

2021-12-13 Thread Andy Shevchenko
Strictly speaking the comparison between guid_t and raw buffer is not correct. Import GUID to variable of guid_t type and then compare. Signed-off-by: Andy Shevchenko --- drivers/acpi/nfit/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/nfit/core.c b

[PATCH v2 2/2] spi: Avoid undefined behaviour when counting unused native CSs

2021-04-20 Thread Andy Shevchenko
ffz(), that has been used to count unused native CSs, might cause undefined behaviour when called against ~0U. To fix that, open code it with ffs(~value) - 1. Fixes: 7d93aecdb58d ("spi: Add generic support for unused native cs with cs-gpios") Signed-off-by: Andy Shevchenko --- v2:

[PATCH v2 1/2] spi: Allow to have all native CSs in use along with GPIOs

2021-04-20 Thread Andy Shevchenko
port for unused native cs with cs-gpios") Signed-off-by: Andy Shevchenko --- v2: no changes drivers/spi/spi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 36c46feab6d4..9c3730a9f7d5 100644 --- a/drivers/spi/spi.c +++

[PATCH v2 1/1] spi: Make error handling of gpiod_count() call cleaner

2021-04-20 Thread Andy Shevchenko
() call cleaner. Note, that gpiod_count() never returns 0, take this into account as well. Signed-off-by: Andy Shevchenko --- v2: reformulated commit message and dropped Fixes tag drivers/spi/spi.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi.c

Re: [PATCH v1 2/2] spi: Avoid potential UB when counting unused native CSs

2021-04-20 Thread Andy Shevchenko
On Tue, Apr 20, 2021 at 03:56:16PM +0100, Mark Brown wrote: > On Tue, Apr 20, 2021 at 05:10:04PM +0300, Andy Shevchenko wrote: > > ffz(), that has been used to count unused native CSs, might produce UB > > Bit of an IA there... UB -- undefined behaviour. I'll decode it. Sho

Re: [RESEND v2] iommu/vt-d: Use passthrough mode for the Intel IPUs

2021-04-20 Thread Andy Shevchenko
On Tue, Apr 20, 2021 at 05:37:27PM +0300, Sakari Ailus wrote: > On Tue, Apr 20, 2021 at 02:55:33PM +0300, Andy Shevchenko wrote: > > On Tue, Apr 20, 2021 at 01:56:40PM +0300, Sakari Ailus wrote: > > > On Tue, Apr 20, 2021 at 06:34:26PM +0800, Bingbu Cao wrote: > > >

Re: [PATCH v1 1/1] spi: Don't overwrite num_chipselect with error code

2021-04-20 Thread Andy Shevchenko
On Tue, Apr 20, 2021 at 4:19 PM Andy Shevchenko wrote: > > The code currently organized in a way that num_chipselect is overwritten > each time we call spi_get_gpio_descs(). It might be potentially dangerous > in case when the gpiod_count() returns an error code. > > Note

[PATCH v1 1/2] spi: Allow to have all native CSs in use along with GPIOs

2021-04-20 Thread Andy Shevchenko
port for unused native cs with cs-gpios") Signed-off-by: Andy Shevchenko --- drivers/spi/spi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 36c46feab6d4..9c3730a9f7d5 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.

[PATCH v1 2/2] spi: Avoid potential UB when counting unused native CSs

2021-04-20 Thread Andy Shevchenko
ffz(), that has been used to count unused native CSs, might produce UB when called against ~0U. To fix that, open code it with ffs(~value) - 1. Fixes: 7d93aecdb58d ("spi: Add generic support for unused native cs with cs-gpios") Signed-off-by: Andy Shevchenko --- drivers/spi/spi.c

[PATCH v1 1/1] spi: Don't overwrite num_chipselect with error code

2021-04-20 Thread Andy Shevchenko
("spi: Optionally use GPIO descriptors for CS GPIOs") Signed-off-by: Andy Shevchenko --- drivers/spi/spi.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 74b2b1dd358b..36c46feab6d4 100644 --- a/drivers/spi/s

[PATCH v1 1/1] spi: Rename enable1 to activate in spi_set_cs()

2021-04-20 Thread Andy Shevchenko
The enable1 is confusing name. Change it to clearly show what is the intention behind it. No functional changes. Fixes: 25093bdeb6bc ("spi: implement SW control for CS times") Signed-off-by: Andy Shevchenko --- drivers/spi/spi.c | 9 - 1 file changed, 4 insertions(+), 5

Re: linux-next: Tree for Apr 20

2021-04-20 Thread Andy Shevchenko
On Tue, Apr 20, 2021 at 03:19:39PM +0300, Andy Shevchenko wrote: > On Tue, Apr 20, 2021 at 03:02:51PM +0300, Andy Shevchenko wrote: > > On Tue, Apr 20, 2021 at 07:47:18PM +1000, Stephen Rothwell wrote: ... > > I have full of build warnings / errors in x86 and iommu Fo

Re: linux-next: Tree for Apr 20

2021-04-20 Thread Andy Shevchenko
On Tue, Apr 20, 2021 at 03:02:51PM +0300, Andy Shevchenko wrote: > On Tue, Apr 20, 2021 at 07:47:18PM +1000, Stephen Rothwell wrote: > > Hi all, > > > > Changes since 20210419: > > > > The powerpc tree lost its build failure. > > > > The ftrace tre

Re: [PATCH v3 2/2] iio: accel: Add driver for Murata SCA3300 accelerometer

2021-04-20 Thread Andy Shevchenko
On Tue, Apr 20, 2021 at 2:36 PM Tomas Melin wrote: > On 4/20/21 1:47 PM, Andy Shevchenko wrote: > > On Tue, Apr 20, 2021 at 11:50 AM Tomas Melin > > wrote: ... > >>>> + for_each_set_bit(bit, indio_dev->active_scan_mask, > >>>>

Re: linux-next: Tree for Apr 20

2021-04-20 Thread Andy Shevchenko
ned int, size_t, struct iommu_iotlb_gather *)’ {aka ‘long unsigned int (*)(struct io_pgtable_ops *, long unsigned int, unsigned int, struct iommu_iotlb_gather *)’} [-Werror=incompatible-pointer-types] 551 | pgtable->iop.ops.unmap= iommu_v1_unmap_page; |^ cc1: some warnings being treated as errors Is it only me? -- With Best Regards, Andy Shevchenko

Re: [RESEND v2] iommu/vt-d: Use passthrough mode for the Intel IPUs

2021-04-20 Thread Andy Shevchenko
On Tue, Apr 20, 2021 at 01:56:40PM +0300, Sakari Ailus wrote: > On Tue, Apr 20, 2021 at 06:34:26PM +0800, Bingbu Cao wrote: > > On 4/20/21 6:20 PM, Andy Shevchenko wrote: > > > On Tue, Apr 20, 2021 at 10:48:33AM +0800, Bingbu Cao wrote: ... > > > This misses the

Re: [PATCH v3 2/2] iio: accel: Add driver for Murata SCA3300 accelerometer

2021-04-20 Thread Andy Shevchenko
On Tue, Apr 20, 2021 at 11:50 AM Tomas Melin wrote: > On 4/19/21 4:55 PM, Andy Shevchenko wrote: > > On Mon, Apr 19, 2021 at 4:26 PM Tomas Melin wrote: ... > >> +#define SCA3300_MASK_STATUSGENMASK(8, 0) > >> +#define SCA3300_MASK_RS_STATUS GENMASK(1, 0) &g

Re: [PATCH] optee: use export_uuid() to copy client UUID

2021-04-20 Thread Andy Shevchenko
fined binary representation and also add an octets field in struct > optee_msg_param in order to avoid casting. Wonderful! Thanks for fixing this! Reviewed-by: Andy Shevchenko A bit of off-topic, have you know by any chance who may consider applying this one? https://lore.kernel

Re: [RESEND v2] iommu/vt-d: Use passthrough mode for the Intel IPUs

2021-04-20 Thread Andy Shevchenko
I'm wondering if IPU MMU should be described properly in the DMAR table. -- With Best Regards, Andy Shevchenko

Re: [RESEND v2] iommu/vt-d: Use passthrough mode for the Intel IPUs

2021-04-20 Thread Andy Shevchenko
> > Fixes: 26f5689592e2 ("media: staging/intel-ipu3: mmu: Implement driver") > Signed-off-by: Bingbu Cao > --- > drivers/iommu/intel/iommu.c | 29 + This misses the changelog from v1 followed by the explanation why resent. -- With Best Regards, Andy Shevchenko

Re: [PATCH 0/2] bitmap_parselist: support 'all' semantics

2021-04-20 Thread Andy Shevchenko
y second bit in cpumask may be selected like this: > isolcpus=all:1/2 After addressing a couple of nit-picks, Reviewed-by: Andy Shevchenko > Yury Norov (2): > bitmap_parse: support 'all' semantics > rcu/tree_plugin: don't handle the case of 'all' CPU range > > Docume

Re: [PATCH 2/2] rcu/tree_plugin: don't handle the case of 'all' CPU range

2021-04-20 Thread Andy Shevchenko
mp(str, "all"))/* legacy: use "0-N" instead */ Perhaps move comment as well to new location. -- With Best Regards, Andy Shevchenko

Re: [PATCH 1/2] bitmap_parse: support 'all' semantics

2021-04-20 Thread Andy Shevchenko
t; {-EINVAL, "10-1", NULL, 8, 0}, > @@ -384,7 +391,6 @@ static const struct test_bitmap_parselist > parselist_tests[] __initconst = { > {-EINVAL, "a-31:10/1", NULL, 8, 0}, > {-EINVAL, "0-31:a/1", NULL, 8, 0}, > {-EINVAL, "0-\n", NULL, 8, 0}, > - Otherwise this change doesn't belong to the series. -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/1] pinctrl: core: Show pin numbers for the controllers with base = 0

2021-04-20 Thread Andy Shevchenko
On Tue, Apr 20, 2021 at 12:32:18AM -0700, Drew Fustini wrote: > On Thu, Apr 15, 2021 at 04:03:56PM +0300, Andy Shevchenko wrote: > > The commit f1b206cf7c57 ("pinctrl: core: print gpio in pins debugfs file") > > enabled GPIO pin number and label in debugfs fo

Re: [PATCH v1 1/1] tee: optee: Provide special parameter field for UUID values

2021-04-19 Thread Andy Shevchenko
On Mon, Apr 19, 2021 at 5:30 PM Jens Wiklander wrote: > On Mon, Apr 19, 2021 at 3:40 PM Andy Shevchenko > wrote: > > On Mon, Apr 19, 2021 at 4:30 PM Jens Wiklander > > wrote: > > > On Mon, Apr 19, 2021 at 2:01 PM Andy Shevchenko > > > wrote: > > &g

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

2021-04-19 Thread Andy Shevchenko
On Mon, Apr 19, 2021 at 5:15 PM Geert Uytterhoeven wrote: > On Mon, Apr 19, 2021 at 3:58 PM Andy Shevchenko > wrote: > Please tell me how this driver will be probed when CONFIG_ACPI > is disabled (it cannot, as nothing instantiates platform devices of the > right type, so the

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

2021-04-19 Thread Andy Shevchenko
On Mon, Apr 19, 2021 at 5:18 PM Geert Uytterhoeven wrote: > On Mon, Apr 19, 2021 at 4:14 PM Andy Shevchenko > wrote: > > On Mon, Apr 19, 2021 at 4:58 PM Andy Shevchenko > > wrote: > > > On Mon, Apr 19, 2021 at 4:54 PM Geert Uytterhoeven > > > wrote: > &g

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

2021-04-19 Thread Andy Shevchenko
On Mon, Apr 19, 2021 at 4:58 PM Andy Shevchenko wrote: > On Mon, Apr 19, 2021 at 4:54 PM Geert Uytterhoeven > wrote: > > > In any case it's not true. We have the platform drivers w/o legacy > > > users that are not dependent on OF. > > > > Example? ;-)

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

2021-04-19 Thread Andy Shevchenko
On Mon, Apr 19, 2021 at 4:54 PM Geert Uytterhoeven wrote: > On Mon, Apr 19, 2021 at 3:35 PM Andy Shevchenko > wrote: > > On Mon, Apr 19, 2021 at 4:02 PM Geert Uytterhoeven > > wrote: > > > On Thu, Apr 15, 2021 at 10:50 AM Andy Shevchenko > > > wrote: >

Re: [PATCH v3 2/2] iio: accel: Add driver for Murata SCA3300 accelerometer

2021-04-19 Thread Andy Shevchenko
(>dev, indio_dev); > + if (ret) { > + dev_err(>dev, "iio device register failed, error: %d\n", > + ret); > + return ret; > + } > + > + return ret; Deduplicate it. Simply leave the latter one. > +} ... > + No need for this blank line. > + .probe = sca3300_probe, > +}; > + Ditto. > +module_spi_driver(sca3300_driver); -- With Best Regards, Andy Shevchenko

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

2021-04-19 Thread Andy Shevchenko
On Mon, Apr 19, 2021 at 4:02 PM Geert Uytterhoeven wrote: > On Thu, Apr 15, 2021 at 10:50 AM Andy Shevchenko > wrote: > > On Thu, Apr 15, 2021 at 3:43 AM Geert Uytterhoeven > > wrote: > > > On Wed, Apr 14, 2021 at 9:14 PM Andy Shevchenko > > > wrote: > &

Re: [PATCH v1 1/1] tee: optee: Provide special parameter field for UUID values

2021-04-19 Thread Andy Shevchenko
On Mon, Apr 19, 2021 at 4:30 PM Jens Wiklander wrote: > On Mon, Apr 19, 2021 at 2:01 PM Andy Shevchenko > wrote: > > > > On Mon, Apr 19, 2021 at 01:35:51PM +0200, Jens Wiklander wrote: > > > On Thu, Apr 15, 2021 at 4:58 PM Andy Shevchenko > > > wrote: > &

Re: [PATCH v2 2/2] iio: accel: Add driver for Murata SCA3300 accelerometer

2021-04-19 Thread Andy Shevchenko
On Mon, Apr 19, 2021 at 2:36 PM Tomas Melin wrote: > On 4/19/21 2:14 PM, Andy Shevchenko wrote: > > On Mon, Apr 19, 2021 at 1:29 PM Tomas Melin wrote: > >> On 4/17/21 3:39 PM, Andy Shevchenko wrote: > >>> On Fri, Apr 16, 2021 at 5:21 PM Tomas Melin > >

Re: [PATCH v1 1/1] tee: optee: Provide special parameter field for UUID values

2021-04-19 Thread Andy Shevchenko
On Mon, Apr 19, 2021 at 01:35:51PM +0200, Jens Wiklander wrote: > On Thu, Apr 15, 2021 at 4:58 PM Andy Shevchenko > wrote: Thanks for review, my answer below. > > struct optee_msg_param_tmem tmem; > > struct optee_msg_param_rmem rmem; > >

[PATCH v1 6/6] mmc: mmc_spi: Make of_mmc_spi.c resource provider agnostic

2021-04-19 Thread Andy Shevchenko
In order to use the same driver on non-OF platforms, make of_mmc_spi.c resource provider agnostic. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/Makefile | 2 -- drivers/mmc/host/of_mmc_spi.c | 6 ++ include/linux/spi/mmc_spi.h | 9 - 3 files changed, 2 insertions(+), 15

[PATCH v1 5/6] mmc: mmc_spi: Use already parsed IRQ

2021-04-19 Thread Andy Shevchenko
SPI core already parses and maps IRQ for us if provided. Use it instead of double parsing in mmc_spi_get_pdata(). Due to above, change condition, since SPI core can hold an error pointer as invalid IRQ. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/of_mmc_spi.c | 4 ++-- 1 file changed

[PATCH v1 3/6] mmc: mmc_spi: Set up polling even if voltage-ranges is not present

2021-04-19 Thread Andy Shevchenko
: 9c43df57910b ("mmc_spi: Add support for OpenFirmware bindings") Signed-off-by: Andy Shevchenko --- Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt | 6 +++--- drivers/mmc/host/of_mmc_spi.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc

[PATCH v1 4/6] mmc: mmc_spi: Drop unused NO_IRQ definition

2021-04-19 Thread Andy Shevchenko
After the commit 073350f7b562 ("mmc: mmc_spi: Fix return value evaluation of irq_of_parse_and_map()") the NO_IRQ is not used anymore, drop it for good. Fixes: 073350f7b562 ("mmc: mmc_spi: Fix return value evaluation of irq_of_parse_and_map()") Signed-off-by: Andy Shevchen

[PATCH v1 2/6] mmc: core: Convert mmc_of_parse_voltage() to use device property API

2021-04-19 Thread Andy Shevchenko
mmc_of_parse() for a few years has been using device property API. Convert mmc_of_parse_voltage() as well. At the same time switch users to new API. Signed-off-by: Andy Shevchenko --- drivers/mmc/core/host.c| 46 +- drivers/mmc/host/mmc_spi.c

[PATCH v1 1/6] mmc: core: Correct descriptions in mmc_of_parse()

2021-04-19 Thread Andy Shevchenko
Since it has been converted to use device property API, the function and field descriptions become outdated. Correct them. Fixes: 73a47a9bb3e2 ("mmc: core: Use device_property_read instead of of_property_read") Signed-off-by: Andy Shevchenko --- drivers/mmc/core/host.c | 4 ++-- 1 fi

Re: [PATCH v2 2/2] iio: accel: Add driver for Murata SCA3300 accelerometer

2021-04-19 Thread Andy Shevchenko
On Mon, Apr 19, 2021 at 1:29 PM Tomas Melin wrote: > On 4/17/21 3:39 PM, Andy Shevchenko wrote: > > On Fri, Apr 16, 2021 at 5:21 PM Tomas Melin wrote: > >> Add initial support for Murata SCA3300 3-axis industrial > >> accelerometer with digital SPI interface. Thi

Re: [PATCH v1 1/1] pinctrl: core: Show pin numbers for the controllers with base = 0

2021-04-19 Thread Andy Shevchenko
On Thu, Apr 15, 2021 at 4:07 PM Andy Shevchenko wrote: > > The commit f1b206cf7c57 ("pinctrl: core: print gpio in pins debugfs file") > enabled GPIO pin number and label in debugfs for pin controller. However, > it limited that feature to the chips where the bas

Re: [PATCH] MAINTAINERS: adjust to removing i2c designware platform data

2021-04-19 Thread Andy Shevchenko
. > > Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: > > warning: no file matches F: include/linux/platform_data/i2c-designware.h > > Remove the file entry to this removed file as well. Oops, I was under the impression I grepped all occurrences, but I have not

Re: [PATCH v1 4/7] iio: st_sensors: Call st_sensors_power_enable() from bus drivers

2021-04-18 Thread Andy Shevchenko
On Sun, Apr 18, 2021 at 1:54 PM Jonathan Cameron wrote: > > On Wed, 14 Apr 2021 22:54:51 +0300 > Andy Shevchenko wrote: > > > In case we would initialize two IIO devices from one physical device, > > we shouldn't have a clash on regulators. That's why move > > st_se

Re: [PATCH v1 6/7] iio: st_sensors: Add lsm9ds0 IMU support

2021-04-18 Thread Andy Shevchenko
On Sun, Apr 18, 2021 at 4:49 PM Andy Shevchenko wrote: > > On Sun, Apr 18, 2021 at 2:07 PM Jonathan Cameron wrote: > > Thanks for review, my answers below. > > > On Wed, 14 Apr 2021 22:54:53 +0300 > > Andy Shevchenko wrote: > > > > > We can

Re: [PATCH v1 6/7] iio: st_sensors: Add lsm9ds0 IMU support

2021-04-18 Thread Andy Shevchenko
On Sun, Apr 18, 2021 at 2:07 PM Jonathan Cameron wrote: Thanks for review, my answers below. > On Wed, 14 Apr 2021 22:54:53 +0300 > Andy Shevchenko wrote: > > > We can utilize separate drivers for accelerometer and magnetometer, > > so here is the glue driver to enabl

Re: [PATCH v1 4/7] iio: st_sensors: Call st_sensors_power_enable() from bus drivers

2021-04-18 Thread Andy Shevchenko
On Sun, Apr 18, 2021 at 1:54 PM Jonathan Cameron wrote: > On Wed, 14 Apr 2021 22:54:51 +0300 > Andy Shevchenko wrote: > > > In case we would initialize two IIO devices from one physical device, > > we shouldn't have a clash on regulators. That's why move > > st_senso

Re: [PATCH v8 2/2] Added AMS tsl2591 device tree binding

2021-04-17 Thread Andy Shevchenko
illuminance in lux. > The driver additionally supports iio events on lower and > upper thresholds. > > This is a very-high sensitivity light-to-digital converter that > transforms light intensity into a digital signal. With subject line fixed (other comments up to you) Reviewed-by: Andy

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

2021-04-17 Thread Andy Shevchenko
t;> 8; ... > + als_upper_l = als_upper_threshold; > + als_upper_h = als_upper_threshold >> 8; Ditto. -- With Best Regards, Andy Shevchenko

Re: [PATCH v8 2/2] Added AMS tsl2591 device tree binding

2021-04-17 Thread Andy Shevchenko
illuminance in lux. > The driver additionally supports iio events on lower and > upper thresholds. > > This is a very-high sensitivity light-to-digital converter that > transforms light intensity into a digital signal. Subject should be something like dt-bindings: iio: ... -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 2/2] iio: accel: Add driver for Murata SCA3300 accelerometer

2021-04-17 Thread Andy Shevchenko
dio_dev) { > + dev_err(>dev, > + "failed to allocate memory for iio device\n"); Noice. You will get the same from user space. > + return -ENOMEM; > + } ... > + indio_dev->dev.parent = >dev; This is done by IIO core. ... > + ret = devm_iio_device_register(>dev, indio_dev); > + if (ret < 0) { > + dev_err(>dev, "iio device register failed, error: %d\n", > + ret); > + return ret; > + } > + > + return 0; return ret; > +} ... > +static const struct of_device_id sca3300_dt_ids[] = { > + { .compatible = "murata,sca3300"}, > + {}, Drop comma. No need for a terminator line. > +}; ... > +static struct spi_driver sca3300_driver = { > + .driver = { > + .name = SCA3300_ALIAS, > + .owner = THIS_MODULE, Redundant. > + .of_match_table = of_match_ptr(sca3300_dt_ids), Drop of_match_ptr(). In 99% its use is wrong. > + }, > + > + .probe = sca3300_probe, > +}; -- With Best Regards, Andy Shevchenko

Re: [PATCH 1/3] gpio: zynq: use module_platform_driver to simplify the code

2021-04-17 Thread Andy Shevchenko
On Fri, Apr 16, 2021 at 9:28 PM Bartosz Golaszewski wrote: > On Wed, Apr 14, 2021 at 4:45 PM Srinivas Neeli wrote: > > > From: Bartosz Golaszewski > > > Sent: Tuesday, April 13, 2021 4:14 PM > > > On Sat, Apr 10, 2021 at 12:08 AM Andy Shevchenko > > > wro

Re: [PATCH v1 1/1] libnvdimm: Don't use GUID APIs against raw buffer

2021-04-16 Thread Andy Shevchenko
On Fri, Apr 16, 2021 at 01:08:06PM -0700, Dan Williams wrote: > [ add Erik ] > > On Fri, Apr 16, 2021 at 10:36 AM Andy Shevchenko > wrote: > > > > On Thu, Apr 15, 2021 at 05:37:54PM +0300, Andy Shevchenko wrote: > > > Strictly speaking the compari

Re: [PATCH v1 1/1] libnvdimm: Don't use GUID APIs against raw buffer

2021-04-16 Thread Andy Shevchenko
On Thu, Apr 15, 2021 at 05:37:54PM +0300, Andy Shevchenko wrote: > Strictly speaking the comparison between guid_t and raw buffer > is not correct. Return to plain memcmp() since the data structures > haven't changed to use uuid_t / guid_t the current state of affairs > is inconsis

  1   2   3   4   5   6   7   8   9   10   >