Re: [PATCH v2 45/45] drivers: tty: serial: mux: use devm_* functions

2019-03-15 Thread Andy Shevchenko
- iounmap(port->membase); > + devm_iounmap(port->dev, port->membase); > } > > - release_mem_region(dev->hpa.start + MUX_OFFSET, port_count * > MUX_LINE_OFFSET); > + devm_release_mem_region(&dev->dev, > + dev->hpa.start + MUX_OFFSET, > + port_count * MUX_LINE_OFFSET); > return 0; > } -- With Best Regards, Andy Shevchenko

Re: serial driver cleanups v2

2019-03-15 Thread Andy Shevchenko
and anounce here as an RFC, since this was neither tested nor correct. And selling point for many of them is not true: it doesn't make any difference in the size in code, but increases a time to run (devm_ioremap_resource() does more than plain devm_iomap() call). -- With Best Regards, Andy Shevchenko

Re: serial driver cleanups v2

2019-03-15 Thread Andy Shevchenko
On Fri, Mar 15, 2019 at 11:12 AM Andy Shevchenko wrote: > On Fri, Mar 15, 2019 at 12:40 AM Enrico Weigelt, metux IT consult > wrote: > > > here's v2 of my serial cleanups queue - part I: > > > > essentially using helpers to code more compact and switching to

Re: serial driver cleanups v2

2019-03-15 Thread Andy Shevchenko
On Fri, Mar 15, 2019 at 11:36:04AM +0100, Enrico Weigelt, metux IT consult wrote: > On 15.03.19 10:12, Andy Shevchenko wrote: > > >> Part II will be about moving the mmio range from mapbase and > >> mapsize (which are used quite inconsistently) to a struct resource &g

Re: serial driver cleanups v2

2019-03-15 Thread Andy Shevchenko
On Fri, Mar 15, 2019 at 8:44 PM Enrico Weigelt, metux IT consult wrote: > On 15.03.19 19:11, Andy Shevchenko wrote: > OTOH, the name, IMHO, is a bit misleading. Any chance of ever changing > it to a more clear name (eg. devm_request_and_ioremap_resource()) ? Compare iomap vs

Re: [PATCH 0/5] simple sort swap function usage improvements

2019-03-30 Thread Andy Shevchenko
ifs: find.c: replace swap function with built-in one > Lib: sort.h: replace int size with size_t size in the swap function You have to do something about Cc list. 50 people is complete overkill. Seems as your series is a set of independent fixes. Why not to split and Cc based on individual case? -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 5/5] Lib: sort.h: replace int size with size_t size in the swap function

2019-04-01 Thread Andy Shevchenko
gt; else > - swap_func(a, b, (int)size); > + swap_func(a, b, size); > } > > /** > @@ -187,7 +187,7 @@ static size_t parent(size_t i, unsigned int lsbit, size_t > size) > */ > void sort(void *base, size_t num, size_t size, >

Re: [PATCH v2 5/5] Lib: sort.h: replace int size with size_t size in the swap function

2019-04-01 Thread Andy Shevchenko
On Mon, Apr 01, 2019 at 09:56:07AM +, George Spelvin wrote: > On Mon, 1 Apr 2019 at 12:35:55 +0300, Andy Shevchenko wrote: > > Hmm... If (*swap)() is called recursively it means the change might increase > > stack usage on 64-bit platforms. > > > > Am I missing

Re: [PATCH v3 5/5] Lib: sort.h: remove the size argument from the swap function

2019-04-03 Thread Andy Shevchenko
; Signed-off-by: Andrey Abramov > Reviewed by: George Spelvin FWIW, Reviewed-by: Andy Shevchenko > --- > arch/x86/kernel/unwind_orc.c | 2 +- > include/linux/sort.h | 2 +- > kernel/jump_label.c | 2 +- > lib/extable.c| 2 +- > lib/sort.c

Re: [PATCH v11 4/8] powerpc/perf: consolidate valid_user_sp

2020-03-19 Thread Andy Shevchenko
is_32bit_task()) { if (sp & 0x03) return 0; if (sp > STACK_TOP - 16) return 0; } else { ... } return 1; Other possibility: unsigned long align = is_32bit_task() ? 3 : 7; unsigned long top = STACK_TOP - (is_32bit_task() ? 16 : 32); return !(!sp || (sp & align) || sp > top); -- With Best Regards, Andy Shevchenko

Re: [PATCH v11 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-19 Thread Andy Shevchenko
/*/* > F: arch/*/events/* > F: arch/*/events/*/* > F: tools/perf/ Had you run parse-maintainers.pl? -- With Best Regards, Andy Shevchenko

Re: [PATCH v11 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-19 Thread Andy Shevchenko
On Thu, Mar 19, 2020 at 03:00:08PM +0100, Michal Suchánek wrote: > On Thu, Mar 19, 2020 at 03:37:03PM +0200, Andy Shevchenko wrote: > > On Thu, Mar 19, 2020 at 2:21 PM Michal Suchanek wrote: > > > > > > Signed-off-by: Michal Suchanek > > > --- > > >

Re: [PATCH v12 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-20 Thread Andy Shevchenko
nt.h > F: arch/*/kernel/perf_callchain.c > -F: arch/*/events/* > -F: arch/*/events/*/* > +F: arch/*/events/ > +F: arch/*/perf/ > F: tools/perf/ > > PERFORMANCE EVENTS SUBSYSTEM ARM64 PMU EVENTS -- With Best Regards, Andy Shevchenko

Re: [PATCH v12 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-20 Thread Andy Shevchenko
On Fri, Mar 20, 2020 at 12:23:38PM +0100, Michal Suchánek wrote: > On Fri, Mar 20, 2020 at 12:33:50PM +0200, Andy Shevchenko wrote: > > On Fri, Mar 20, 2020 at 11:20:19AM +0100, Michal Suchanek wrote: > > > While at it also simplify the existing perf patterns. > > And

Re: [PATCH v12 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-20 Thread Andy Shevchenko
On Fri, Mar 20, 2020 at 07:42:03AM -0700, Joe Perches wrote: > On Fri, 2020-03-20 at 14:42 +0200, Andy Shevchenko wrote: > > On Fri, Mar 20, 2020 at 12:23:38PM +0100, Michal Suchánek wrote: > > > On Fri, Mar 20, 2020 at 12:33:50PM +0200, Andy Shevchenko wrote: > > > >

Re: [PATCH v12 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-20 Thread Andy Shevchenko
On Fri, Mar 20, 2020 at 05:42:04PM +0100, Michal Suchánek wrote: > On Fri, Mar 20, 2020 at 06:31:57PM +0200, Andy Shevchenko wrote: > > On Fri, Mar 20, 2020 at 07:42:03AM -0700, Joe Perches wrote: > > > On Fri, 2020-03-20 at 14:42 +0200, Andy Shevchenko wrote: > > > >

Re: [patch V3 05/20] acpi: Remove header dependency

2020-03-21 Thread Andy Shevchenko
On Sat, Mar 21, 2020 at 1:34 PM Thomas Gleixner wrote: > > From: Peter Zijlstra > > In order to avoid future header hell, remove the inclusion of > proc_fs.h from acpi_bus.h. All it needs is a forward declaration of a > struct. > Acked-by: Andy Shevchenko # for PDx86 &

Re: [PATCH 0/2] powerpc: Remove support for ppc405/440 Xilinx platforms

2020-03-27 Thread Andy Shevchenko
is used > through the fsp2 platform, > and can not be deprecated at least until that is known to have stopped > getting kernel > updates. > > Arnd -- With Best Regards, Andy Shevchenko

Re: [PATCH 0/2] powerpc: Remove support for ppc405/440 Xilinx platforms

2020-03-27 Thread Andy Shevchenko
On Fri, Mar 27, 2020 at 03:10:26PM +0200, Andy Shevchenko wrote: > On Fri, Mar 27, 2020 at 01:54:33PM +0100, Arnd Bergmann wrote: > > On Fri, Mar 27, 2020 at 1:12 PM Michal Simek > > wrote: > > > > > > recently we wanted to update xilinx intc driver and we f

Re: [PATCH 0/2] powerpc: Remove support for ppc405/440 Xilinx platforms

2020-03-27 Thread Andy Shevchenko
On Fri, Mar 27, 2020 at 02:22:55PM +0100, Arnd Bergmann wrote: > On Fri, Mar 27, 2020 at 2:15 PM Andy Shevchenko > wrote: > > On Fri, Mar 27, 2020 at 03:10:26PM +0200, Andy Shevchenko wrote: > > > On Fri, Mar 27, 2020 at 01:54:33PM +0100, Arnd Bergmann wrote: > > >

Re: [PATCH] lib/test_hexdump: fix failure on big endian cpu

2018-08-08 Thread Andy Shevchenko
.$}.4...1.L...C...' > [ 16.786763] test_hexdump: failed 801 out of 1184 tests > > This patch fixes it. I like this approach because in the future we might introduce something to print be data on le cpu or otherwise and thus test data will be used independently of cpu endianess. R

Re: [PATCH] lib/test_hexdump: fix failure on big endian cpu

2018-08-09 Thread Andy Shevchenko
> it because you never merged it :P Hmm... I (as an author of the test case) never saw that patch. > Sorry, I wasn't sure who should merge it, and never followed up. lib/* most of the time under Andrew's responsibility, though since it's orphaned in MAINTAINERS, anyone can

Re: [PATCH v2 1/8] seq_file: introduce seq_open_data helper

2018-08-19 Thread Andy Shevchenko
On Sat, Aug 18, 2018 at 4:26 PM Rasmus Villemoes wrote: > > There are quite a few callers of seq_open that could be simplified by > setting the ->private member via the seq_open call instead of fetching > file->private_data afterwards. > I like this series, Reviewed-by:

Re: [PATCH] sound: Convert to using %pOFn instead of device_node.name

2018-08-28 Thread Andy Shevchenko
return 0; > + if (strncmp(np, "i2s-", 4)) > return 0; Shouldn't be node_name here? -- With Best Regards, Andy Shevchenko

Re: [PATCH] ASoC: Convert to using %pOFn instead of device_node.name

2018-08-28 Thread Andy Shevchenko
mp;pdev->dev, "%pOFn sync own reference\n", > + np); One line? -- With Best Regards, Andy Shevchenko

Re: [PATCH 0/9] PCI hotplug diet

2018-08-30 Thread Andy Shevchenko
; If that patch is not accepted or other pciehp-related patches are merged > before this series, I'll have to rebase patch [4/9] ("PCI: pciehp: Unify > controller and slot structs"). No big deal, just a heads-up. > Acked-by: Andy Shevchenko for PDx86 bits > Thanks,

Re: [PATCH 0/7] serial: Finish kgdb on qcom_geni; fix many lockdep splats w/ kgdb

2018-10-30 Thread Andy Shevchenko
8250/8250_omap.c | 6 +++- > drivers/tty/serial/8250/8250_port.c | 8 ++--- > drivers/tty/serial/qcom_geni_serial.c | 10 -- > include/linux/kgdb.h| 9 ++--- > include/linux/serial_core.h | 38 - > kernel/debug/debug_core.c | 2 +- > kernel/smp.c| 4 ++- > 18 files changed, 80 insertions(+), 53 deletions(-) > > -- > 2.19.1.568.g152ad8e336-goog > -- With Best Regards, Andy Shevchenko

[PATCH v1] PCI/AER: use match_string() helper to simplify the code

2019-01-28 Thread Andy Shevchenko
match_string() returns the index of an array for a matching string, which can be used intead of open coded implementation. Signed-off-by: Andy Shevchenko --- drivers/pci/pcie/aer.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci

Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-06-12 Thread Andy Shevchenko
/* not completely contained */ Usually we are expecting real eeror codes. > + if (firstpp == NULL) > + firstpp = pp; > + } > + if (firstpp == NULL) > + return -1; /* didn't find any conflicting entries? */ Ditto. > +} > +EXPORT_SYMBOL(reparent_resources); -- With Best Regards, Andy Shevchenko

Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-06-12 Thread Andy Shevchenko
On Tue, Jun 12, 2018 at 12:38 PM, Baoquan He wrote: > On 06/12/18 at 11:29am, Andy Shevchenko wrote: >> On Tue, Jun 12, 2018 at 6:28 AM, Baoquan He wrote: >> > +{ >> >> > + for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling)

Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-06-12 Thread Andy Shevchenko
On Tue, Jun 12, 2018 at 5:20 PM, Andy Shevchenko wrote: > On Tue, Jun 12, 2018 at 12:38 PM, Baoquan He wrote: >> On 06/12/18 at 11:29am, Andy Shevchenko wrote: >>> On Tue, Jun 12, 2018 at 6:28 AM, Baoquan He wrote: > >>> > +{ >>> >>> > +

Re: [PATCHv3 2/4] drivers/base: utilize device tree info to shutdown devices

2018-07-03 Thread Andy Shevchenko
; + device_for_each_child_shutdown(dev); > } > spin_unlock(&devices_kset->list_lock); > + device_links_read_unlock(idx); > } > > /* > diff --git a/include/linux/device.h b/include/linux/device.h > index 055a69d..8a0f784 100644 > --- a/include/linux/device.h > +++ b/include/linux/device.h > @@ -1003,6 +1003,7 @@ struct device { > booloffline:1; > boolof_node_reused:1; > booldma_32bit_limit:1; > + boolshutdown:1; /* one direction: false->true */ > }; > > static inline struct device *kobj_to_dev(struct kobject *kobj) > -- > 2.7.4 > -- With Best Regards, Andy Shevchenko

Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-07-03 Thread Andy Shevchenko
On Tue, Jul 3, 2018 at 5:55 PM, Baoquan He wrote: > On 06/12/18 at 05:24pm, Andy Shevchenko wrote: >> On Tue, Jun 12, 2018 at 5:20 PM, Andy Shevchenko >> wrote: >> > I briefly looked at the code and error codes we have, so, my proposal >> > is one of the followi

Re: [PATCH v6 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-07-04 Thread Andy Shevchenko
On Wed, Jul 4, 2018 at 7:10 AM, Baoquan He wrote: > reparent_resources() is duplicated in arch/microblaze/pci/pci-common.c > and arch/powerpc/kernel/pci-common.c, so move it to kernel/resource.c > so that it's shared. With couple of comments below, Reviewed-by: Andy Shevchenko

Re: [PATCH v6 2/4] resource: Use list_head to link sibling resource

2018-07-08 Thread Andy Shevchenko
pci_mem2 >> 73b4390f Ralf Baechle 2008-07-16 58 }; >> 73b4390f Ralf Baechle 2008-07-16 59 >> >> :: The code at line 57 was first introduced by commit >> :: 73b4390fb23456964201abda79f1210fe337d01a [MIPS] Routerboard 532: >> Support for base system >> >> :: TO: Ralf Baechle >> :: CC: Ralf Baechle >> >> --- >> 0-DAY kernel test infrastructureOpen Source Technology Center >> https://lists.01.org/pipermail/kbuild-all Intel Corporation > > -- With Best Regards, Andy Shevchenko

Re: [PATCH v7 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-07-18 Thread Andy Shevchenko
;, > +p->name, p, res->name); Now, PCI is a bit confusing here. > + } > + return 0; > +} > +EXPORT_SYMBOL(reparent_resources); > + > static void __init __reserve_region_with_split(struct resource *root, > resource_size_t start, resource_size_t end, > const char *name) > -- > 2.13.6 > -- With Best Regards, Andy Shevchenko

Re: [PATCH v7 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-07-18 Thread Andy Shevchenko
On Wed, Jul 18, 2018 at 7:36 PM, Andy Shevchenko wrote: > On Wed, Jul 18, 2018 at 5:49 AM, Baoquan He wrote: >> reparent_resources() is duplicated in arch/microblaze/pci/pci-common.c >> and arch/powerpc/kernel/pci-common.c, so move it to kernel/resource.c >> so that it'

[PATCH v1 1/2] PCI/AER: Use for_each_set_bit()

2019-08-27 Thread Andy Shevchenko
This simplifies and standardizes slot manipulation code by using for_each_set_bit() library function. Signed-off-by: Andy Shevchenko --- drivers/pci/pcie/aer.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie

[PATCH v1 2/2] PCI/AER: Update parameter descriptions to satisfy kernel-doc validator

2019-08-27 Thread Andy Shevchenko
ter or member 'context' not described in 'aer_isr' aer.c:1209: warning: Excess function parameter 'work' description in 'aer_isr' Fix the above accordingly. Signed-off-by: Andy Shevchenko --- drivers/pci/pcie/aer.c | 4 +++- 1 file changed, 3 insertions(+), 1

Re: [PATCH v1 2/2] PCI/AER: Update parameter descriptions to satisfy kernel-doc validator

2019-08-28 Thread Andy Shevchenko
On Tue, Aug 27, 2019 at 10:06:54AM -0700, Kuppuswamy Sathyanarayanan wrote: > > On 8/27/19 8:18 AM, Andy Shevchenko wrote: > > Kernel-doc validator complains: > > > > aer.c:207: warning: Function parameter or member 'str' not described in > > '

Re: [PATCH v1 1/2] PCI/AER: Use for_each_set_bit()

2019-09-30 Thread Andy Shevchenko
On Fri, Sep 27, 2019 at 07:39:13AM -0500, Bjorn Helgaas wrote: > On Tue, Aug 27, 2019 at 06:18:22PM +0300, Andy Shevchenko wrote: > > This simplifies and standardizes slot manipulation code > > by using for_each_set_bit() library function. > > + unsigned long status = info-

Re: [PATCH] platforms: 52xx: Remove space after '(' and before ')'

2023-07-18 Thread Andy Shevchenko
e == PCI_DEVICE_ID_MOTOROLA_MPC5200B)) { Also note, you can move this to use pci_match_id(). That kind of patch might be approved. -- With Best Regards, Andy Shevchenko

Re: [PATCH v7 3/6] PCI: Allow pci_bus_for_each_resource() to take less arguments

2023-03-30 Thread Andy Shevchenko
d671ebbaebfc2 ("[PATCH v7 3/6] PCI: Allow > pci_bus_for_each_resource() to take less arguments") > url: > https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/kernel-h-Split-out-COUNT_ARGS-and-CONCATENATE/20230324-013857 > base: https://git.kernel.org/cgit/

[PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-03-30 Thread Andy Shevchenko
pcmcia patch (Dominik) Changelog v2: - refactor to have two macros - refactor existing pci_bus_for_each_resource() in the same way and convert users Andy Shevchenko (6): kernel.h: Split out COUNT_ARGS() and CONCATENATE() PCI: Introduce pci_resource_n() PCI: Document pci_bus_for_each_resource

[PATCH v8 2/7] PCI: Introduce pci_resource_n()

2023-03-30 Thread Andy Shevchenko
Introduce pci_resource_n() and replace open-coded implementations of it in pci.h. Signed-off-by: Andy Shevchenko Reviewed-by: Philippe Mathieu-Daudé --- include/linux/pci.h | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/include/linux/pci.h b/include/linux

[PATCH v8 1/7] kernel.h: Split out COUNT_ARGS() and CONCATENATE()

2023-03-30 Thread Andy Shevchenko
kernel.h is being used as a dump for all kinds of stuff for a long time. The COUNT_ARGS() and CONCATENATE() macros may be used in some places without need of the full kernel.h dependency train with it. Here is the attempt on cleaning it up by splitting out these macros(). Signed-off-by: Andy

[PATCH v8 3/7] PCI: Introduce pci_dev_for_each_resource()

2023-03-30 Thread Andy Shevchenko
. Suggested-by: Andy Shevchenko Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko Reviewed-by: Krzysztof Wilczyński --- .clang-format | 1 + arch/alpha/kernel/pci.c | 5 ++-- arch/arm/kernel/bios32.c | 16 ++--- arch

[PATCH v8 4/7] PCI: Document pci_bus_for_each_resource() to avoid confusion

2023-03-30 Thread Andy Shevchenko
There might be a confusion with the implementation of the pci_bus_for_each_resources() due to side effect of Logical OR. Document entire macro and explain how it works and why the conditional needs to be like that. Signed-off-by: Andy Shevchenko --- include/linux/pci.h | 20

[PATCH v8 6/7] EISA: Convert to use less arguments in pci_bus_for_each_resource()

2023-03-30 Thread Andy Shevchenko
The pci_bus_for_each_resource() can hide the iterator loop since it may be not used otherwise. With this, we may drop that iterator variable definition. Signed-off-by: Andy Shevchenko Reviewed-by: Krzysztof Wilczyński Reviewed-by: Philippe Mathieu-Daudé --- drivers/eisa/pci_eisa.c | 4 ++-- 1

[PATCH v8 5/7] PCI: Allow pci_bus_for_each_resource() to take less arguments

2023-03-30 Thread Andy Shevchenko
Refactor pci_bus_for_each_resource() in the same way as it's done in pci_dev_for_each_resource() case. This will allow to hide iterator inside the loop, where it's not used otherwise. No functional changes intended. Signed-off-by: Andy Shevchenko Reviewed-by: Krzysztof Wilczyński R

[PATCH v8 7/7] pcmcia: Convert to use less arguments in pci_bus_for_each_resource()

2023-03-30 Thread Andy Shevchenko
The pci_bus_for_each_resource() can hide the iterator loop since it may be not used otherwise. With this, we may drop that iterator variable definition. Signed-off-by: Andy Shevchenko Reviewed-by: Krzysztof Wilczyński Acked-by: Dominik Brodowski --- drivers/pcmcia/rsrc_nonstatic.c | 9

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-04-05 Thread Andy Shevchenko
On Tue, Apr 04, 2023 at 11:11:01AM -0500, Bjorn Helgaas wrote: > On Thu, Mar 30, 2023 at 07:24:27PM +0300, Andy Shevchenko wrote: > > Provide two new helper macros to iterate over PCI device resources and > > convert users. > > > > Looking at it, refactor existing pci_

Re: [PATCH v8 7/7] pcmcia: Convert to use less arguments in pci_bus_for_each_resource()

2023-04-05 Thread Andy Shevchenko
On Thu, Mar 30, 2023 at 07:24:34PM +0300, Andy Shevchenko wrote: ... > @@ -960,12 +960,9 @@ static int nonstatic_autoadd_resources(struct > pcmcia_socket *s) >*/ > if (s->cb_dev->bus->number == 0) > return -EINVAL; > - > - for (i =

Re: [PATCH v8 5/7] PCI: Allow pci_bus_for_each_resource() to take less arguments

2023-04-05 Thread Andy Shevchenko
On Thu, Mar 30, 2023 at 07:24:32PM +0300, Andy Shevchenko wrote: > Refactor pci_bus_for_each_resource() in the same way as it's done in > pci_dev_for_each_resource() case. This will allow to hide iterator > inside the loop, where it's not used otherwise. > > No functional

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-04-06 Thread Andy Shevchenko
On Wed, Apr 05, 2023 at 03:18:32PM -0500, Bjorn Helgaas wrote: > On Wed, Apr 05, 2023 at 11:28:27AM +0300, Andy Shevchenko wrote: > > On Tue, Apr 04, 2023 at 11:11:01AM -0500, Bjorn Helgaas wrote: > > > On Thu, Mar 30, 2023 at 07:24:27PM +0300, Andy Shevchenko wrote: ..

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-05-12 Thread Andy Shevchenko
On Tue, May 09, 2023 at 01:21:22PM -0500, Bjorn Helgaas wrote: > On Tue, Apr 04, 2023 at 11:11:01AM -0500, Bjorn Helgaas wrote: > > On Thu, Mar 30, 2023 at 07:24:27PM +0300, Andy Shevchenko wrote: > > > Provide two new helper macros to iterate over PCI device resources and &

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-06-01 Thread Andy Shevchenko
On Wed, May 31, 2023 at 08:48:35PM +0200, Jonas Gorski wrote: > On Tue, 30 May 2023 at 23:34, Bjorn Helgaas wrote: > > On Fri, May 12, 2023 at 02:48:51PM -0500, Bjorn Helgaas wrote: > > > On Fri, May 12, 2023 at 01:56:29PM +0300, Andy Shevchenko wrote: > > > > On T

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-06-01 Thread Andy Shevchenko
On Thu, Jun 01, 2023 at 07:25:46PM +0300, Andy Shevchenko wrote: > On Wed, May 31, 2023 at 08:48:35PM +0200, Jonas Gorski wrote: > > On Tue, 30 May 2023 at 23:34, Bjorn Helgaas wrote: > > > On Fri, May 12, 2023 at 02:48:51PM -0500, Bjorn Helgaas wrote: ... > > > Whe

Re: [PATCH v3 2/2] serial: 8250: Apply FSL workarounds also without SERIAL_8250_CONSOLE

2023-06-05 Thread Andy Shevchenko
sl.o[1]. > > So in my book a bool SERIAL_8250_FSL that modifies 8250_base.ko (with > > SERIAL_8250=m) is fine. > > [1] 8250_port.o uses fsl8250_handle_irq() from 8250_fsl.o > > Is that after some fix which isn't in tty-next? I see only these: > > $ git grep -l fsl8250_handle_irq > arch/powerpc/kernel/legacy_serial.c > drivers/tty/serial/8250/8250_fsl.c > drivers/tty/serial/8250/8250_of.c > include/linux/serial_8250.h > > No users of fsl8250_handle_irq in 8250_port.c. > >, and 8250_fsl.o uses serial8250_modem_status from 8250_port.o. I don't like 8250_base to be fattened by some stuff that has no generic meaning. Can we avoid putting every quirk there? -- With Best Regards, Andy Shevchenko

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-06-05 Thread Andy Shevchenko
looking into this! I think you're right, and I think > the rewritten expression is more logical as well. Do you want to post > a patch for it? Gimme some time, I was on a long leave and now it's a pile to handle. -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 0/2] Fix console probe delay when stdout-path isn't set

2022-09-27 Thread Andy Shevchenko
e, the kernel has always > assumed if there is a device described, then there is or will be a > driver for it. The result is you can't use new DTs (if they add > providers) with older kernels. > > We've ended up with a timeout because no one has come up with a better > way to handle it. What the kernel needs is userspace saying "I'm done > loading modules", but it's debatable whether that's a good solution > too. In my opinion the deferred probe is a big hack and that is the root cause of the issues we have here and there. It has to be redesigned to be mathematically robust. It was an attempt by Andrzej Hajda to solve this [1]. [1]: https://events19.linuxfoundation.org/wp-content/uploads/2017/12/Deferred-Problem-Issues-With-Complex-Dependencies-Between-Devices-in-Linux-Kernel-Andrzej-Hajda-Samsung.pdf -- With Best Regards, Andy Shevchenko

[PATCH v1 2/2] soc: fsl: qe: Switch to use fwnode instead of of_node

2022-10-05 Thread Andy Shevchenko
The OF node in the GPIO library is deprecated and soon will be removed. GPIO library now accepts fwnode as a firmware node, so switch the driver to use it. Signed-off-by: Andy Shevchenko --- drivers/soc/fsl/qe/gpio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a

[PATCH v1 1/2] device property: Introduce fwnode_device_is_compatible() helper

2022-10-05 Thread Andy Shevchenko
The fwnode_device_is_compatible() helper searches for the given string in the "compatible" string array property and, if found, returns true. Signed-off-by: Andy Shevchenko --- include/linux/property.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/property.h

Re: [PATCH v1 1/2] device property: Introduce fwnode_device_is_compatible() helper

2022-10-05 Thread Andy Shevchenko
On Wed, Oct 05, 2022 at 05:38:11PM +0300, Andy Shevchenko wrote: > The fwnode_device_is_compatible() helper searches for the > given string in the "compatible" string array property and, > if found, returns true. Scratch this, it has some flaws. -- With Best Regards, Andy Shevchenko

[PATCH v2 0/2] gpiolib: more cleanups to get rid of of_node

2022-10-05 Thread Andy Shevchenko
of_device_is_compatible() with analogous fwnode API. Changelog v2: - placed new helper correctly in the property.h Andy Shevchenko (2): device property: Introduce fwnode_device_is_compatible() helper soc: fsl: qe: Switch to use fwnode instead of of_node drivers/soc/fsl/qe/gpio.c | 4

[PATCH v2 1/2] device property: Introduce fwnode_device_is_compatible() helper

2022-10-05 Thread Andy Shevchenko
The fwnode_device_is_compatible() helper searches for the given string in the "compatible" string array property and, if found, returns true. Signed-off-by: Andy Shevchenko --- include/linux/property.h | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/inc

[PATCH v2 2/2] soc: fsl: qe: Switch to use fwnode instead of of_node

2022-10-05 Thread Andy Shevchenko
The OF node in the GPIO library is deprecated and soon will be removed. GPIO library now accepts fwnode as a firmware node, so switch the driver to use it. Signed-off-by: Andy Shevchenko --- drivers/soc/fsl/qe/gpio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a

Re: [PATCH v1 1/2] device property: Introduce fwnode_device_is_compatible() helper

2022-10-05 Thread Andy Shevchenko
git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: > https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/device-property-Introdu

Re: [PATCH v2 1/2] device property: Introduce fwnode_device_is_compatible() helper

2022-10-06 Thread Andy Shevchenko
On Wed, Oct 05, 2022 at 09:05:54PM +, Sakari Ailus wrote: > On Wed, Oct 05, 2022 at 06:29:46PM +0300, Andy Shevchenko wrote: ... > fwnode_property_match_string() returns zero on success, therefore >= 0 is > not needed. I'd just use !fwnode_property_match_string(...). No

Re: [PATCH v1 3/5] treewide: use get_random_u32() when possible

2022-10-06 Thread Andy Shevchenko
at'd work, but again it's not more clear. Authors here are going for > a 24-bit number, and masking seems like a clear way to express that. We have some 24-bit APIs (and 48-bit) already in kernel, why not to have get_random_u24() ? -- With Best Regards, Andy Shevchenko

Re: [f2fs-dev] [PATCH v1 3/5] treewide: use get_random_u32() when possible

2022-10-06 Thread Andy Shevchenko
. I'll move these to patch #1. I believe coccinelle is able to handle this kind of code as well, so Kees' proposal to use it seems more plausible since it's less error prone and more flexible / powerful. -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/5] treewide: use prandom_u32_max() when possible

2022-10-06 Thread Andy Shevchenko
e stuff can > have a chance to flow through subsystem trees. +1 to all arguments for the splitting. I looked a bit into the code I have the interest to, but I won't spam people with not-so-important questions / comments / tags, etc. -- With Best Regards, Andy Shevchenko

Re: [PATCH v4 2/6] treewide: use prandom_u32_max() when possible

2022-10-08 Thread Andy Shevchenko
gt; expression add_one.RESULT; > >> identifier FUNC; > >> @@ > >> > >> - (FUNC()@p & (LITERAL)) > >> + prandom_u32_max(RESULT) > > > >Oh that's pretty cool. I can do the saturation check in python, since > >`value` holds the parsed result. Neat. > > It is (at least how I have it here) just the string, so YMMV. ... > >Thanks a bunch for the guidance. > > Sure thing! I was pleased to figure out how to do the python bit. I believe it can be optimized -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 0/2] gpiolib: more cleanups to get rid of of_node

2022-10-21 Thread Andy Shevchenko
On Wed, Oct 05, 2022 at 06:29:45PM +0300, Andy Shevchenko wrote: > One more user outside of GPIO library and pin control folders needs > to be updated to use fwnode instead of of_node. To make this easier > introduce a helper in property.h and convert the user. > > Note, the helper

Re: [PATCH v2 0/2] gpiolib: more cleanups to get rid of of_node

2022-11-02 Thread Andy Shevchenko
On Fri, Oct 21, 2022 at 10:01:34PM +0300, Andy Shevchenko wrote: > On Wed, Oct 05, 2022 at 06:29:45PM +0300, Andy Shevchenko wrote: > > One more user outside of GPIO library and pin control folders needs > > to be updated to use fwnode instead of of_node. To make this easier > &g

Re: [PATCH 0/8] devm_led_classdev_register() usage problem

2023-11-24 Thread Andy Shevchenko
uickly reading it seems to be a wrong approach (or wrong end to start solving the issue from). -- With Best Regards, Andy Shevchenko

Re: [PATCH 0/8] devm_led_classdev_register() usage problem

2023-11-24 Thread Andy Shevchenko
_unregister() and put a warning to dmesg if it's not. > Actually in many cases it doesn't really need to turn off the leds manually > one-by-one > if driver shutdowns whole led controller. For the last case to disable the > warning > new flag can be brought in e.g LE

Re: [PATCH 0/8] devm_led_classdev_register() usage problem

2023-11-27 Thread Andy Shevchenko
On Sat, Nov 25, 2023 at 03:47:41AM +0300, George Stark wrote: > On 11/24/23 18:28, Andy Shevchenko wrote: > > On Wed, Oct 25, 2023 at 04:07:29PM +0300, George Stark wrote: > > > Lots of drivers use devm_led_classdev_register() to register their led > > > objects &g

Re: [PATCH v2 01/10] devm-helpers: introduce devm_mutex_init

2023-12-04 Thread Andy Shevchenko
ed when driver is detached. the driver Have you run scripts/kernel-doc -v -Wall -none ... against this file? I'm pretty sure it will complain. > + */ -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 02/10] leds: aw2013: unlock mutex before destroying it

2023-12-04 Thread Andy Shevchenko
ee to add Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 03/10] leds: aw2013: use devm API to cleanup module's resources

2023-12-04 Thread Andy Shevchenko
be ret = devm_mutex_init(&client->dev, &chip->mutex); if (ret) return ret; ? > + return -ENOMEM; -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 04/10] leds: aw200xx: use devm API to cleanup module's resources

2023-12-04 Thread Andy Shevchenko
->dev, &chip->mutex)) > + return -ENOMEM; Do not shadow the real error code. -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 00/35] bitops: add atomic find_bit() operations

2023-12-04 Thread Andy Shevchenko
our compilers are sane and generate better code against > properly annotated data, the above discrepancy doesn't look weird. When > running on non-volatile bitmaps, plain find_bit() outperforms atomic > find_and_bit(), and vice-versa. ... In some cases the better improvements can be achieved by switching the (very) old code to utilise IDA framework. -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 01/10] devm-helpers: introduce devm_mutex_init

2023-12-07 Thread Andy Shevchenko
https://lore.kernel.org/lkml/070c174c-057a-46de-ae8e-836e9e20e...@salutedevices.com/T/#mb42e1d7760816b0cedd3130e08f29690496b5ac2 > > > > Looking at it closer, I have the feeling that you want to do similar to > > devm_gpio_request() in linux/gpio.h : > > > > In linux/mutex.h, add a prototype for devm_mutex_init() when > > CONFIG_DEBUG_MUTEXES is defined and an empty static inline otherwise. > > Then define devm_mutex_init() in kernel/locking/mutex-debug.c > > Yes, this would be almost perfect decision. BTW just as in linux/gpio.h > we wouldn't have to include whole "linux/device.h" into mutex.h, only > add forward declaration of struct device; > > > Wouldn't that work ? No. It will require inclusion of device.h (which is a twisted hell from the header perspective) into mutex.h. Completely unappreciated move. -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 01/10] devm-helpers: introduce devm_mutex_init

2023-12-07 Thread Andy Shevchenko
in linux/gpio.h > we wouldn't have to include whole "linux/device.h" into mutex.h, only > add forward declaration of struct device; In case you place it into a C-file. Otherwise you need a header for the API and that is not acceptable for mutex.h. -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 01/10] devm-helpers: introduce devm_mutex_init

2023-12-07 Thread Andy Shevchenko
On Thu, Dec 7, 2023 at 2:31 PM Christophe Leroy wrote: > Le 07/12/2023 à 12:59, Andy Shevchenko a écrit : > > On Thu, Dec 7, 2023 at 1:23 AM George Stark > > wrote: > >> On 12/7/23 01:37, Christophe Leroy wrote: > >>> Le 06/12/2023 à 23:14, Christophe Leroy

Re: [PATCH v3 03/11] devm-helpers: introduce devm_mutex_init

2023-12-13 Thread Andy Shevchenko
dev, struct mutex *lock) > +{ > + mutex_init(lock); > +#ifdef mutex_destroy > + return devm_add_action_or_reset(dev, devm_mutex_release, lock); > +#else > + return 0; > +#endif > +} If this is going to be accepted, you may decrease the amount of ifdeffery. #

Re: [PATCH v3 03/11] devm-helpers: introduce devm_mutex_init

2023-12-13 Thread Andy Shevchenko
On Thu, Dec 14, 2023 at 12:36 AM Andy Shevchenko wrote: > On Thu, Dec 14, 2023 at 12:30 AM George Stark > wrote: > > > > Using of devm API leads to a certain order of releasing resources. > > So all dependent resources which are not devm-wrapped should be deleted

Re: [PATCH v3 03/11] devm-helpers: introduce devm_mutex_init

2023-12-14 Thread Andy Shevchenko
ementation to be in the very same _C_-file where mutex_destroy() is defined. mutex.h in this case indeed requires the only forward declaration and hence doesn't need to include device.h. -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 04/11] leds: aw2013: use devm API to cleanup module's resources

2023-12-14 Thread Andy Shevchenko
series #3 are online. Nikita is right. This patch was the last in the mailing lists. Fix your mail gateways, it quite likely the mail server in your organisation filters out some mails as spam or so. I highly recommend to escalate this with your IT department. -- With Best Regards, Andy Shevchenko

Re: [PATCH RFC v4-bis] locking: introduce devm_mutex_init

2023-12-15 Thread Andy Shevchenko
utex *lock); > +int devm_mutex_init(struct device *dev, struct mutex *lock); > +#else > +static inline void mutex_destroy(struct mutex *lock) {} > + > +static inline int devm_mutex_init(struct device *dev, struct mutex *lock) > +{ > + mutex_init(lock); > + return 0; > +} > +#endif -- With Best Regards, Andy Shevchenko

Re: [PATCH v4 00/10] devm_led_classdev_register() usage problem

2024-02-09 Thread Andy Shevchenko
2f895...@salutedevices.com/T/ > > [2] > > https://lore.kernel.org/lkml/8704539b-ed3b-44e6-aa82-586e2f895...@salutedevices.com/T/#mc132b9b350fa51931b4fcfe14705d9f06e91421f > > [3] > > https://lore.kernel.org/lkml/8704539b-ed3b-44e6-aa82-586e2f895...@salutedevices.com/

Re: [PATCH v4 00/10] devm_led_classdev_register() usage problem

2024-02-09 Thread Andy Shevchenko
14705d9f06e91421f > [3] > https://lore.kernel.org/lkml/8704539b-ed3b-44e6-aa82-586e2f895...@salutedevices.com/T/#mdbf572a85c33f869a553caf986b6228bb65c8383 Are you going to send an updated version with the amended second patch? -- With Best Regards, Andy Shevchenko

Re: [DMARC error][SPF error] Re: [PATCH v4 00/10] devm_led_classdev_register() usage problem

2024-02-12 Thread Andy Shevchenko
updated version into your series. Am I wrong? > Sure I can single out the fix-only patch I'll do it tomorrow. I believe it can be handled without issuing it separately. `b4` tool is capable of selective choices. It was rather Q to Lee if he can/want to apply it right away. > On 2/

Re: [PATCH v3 RESEND 1/6] net: wan: Add support for QMC HDLC

2024-02-12 Thread Andy Shevchenko
these are being used, am I right? What's is missing OTOH is the mod_devicetable.h. > +#include > +#include + Blank line? > +#include -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 RESEND 3/6] bitmap: Make bitmap_onto() available to users

2024-02-12 Thread Andy Shevchenko
d exporting for > modules. Wondering if you are trying to have something like https://lore.kernel.org/lkml/20230926052007.3917389-1-andriy.shevche...@linux.intel.com/ -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 RESEND 3/6] bitmap: Make bitmap_onto() available to users

2024-02-12 Thread Andy Shevchenko
On Mon, Feb 12, 2024 at 02:37:53PM +0100, Herve Codina wrote: > On Mon, 12 Feb 2024 14:27:16 +0200 > Andy Shevchenko wrote: > > On Mon, Feb 12, 2024 at 08:56:31AM +0100, Herve Codina wrote: > > > Currently the bitmap_onto() is available only for CONFIG_NUMA=y case, >

Re: [PATCH v3 RESEND 3/6] bitmap: Make bitmap_onto() available to users

2024-02-12 Thread Andy Shevchenko
On Mon, Feb 12, 2024 at 03:20:22PM +0100, Herve Codina wrote: > On Mon, 12 Feb 2024 16:01:38 +0200 > Andy Shevchenko wrote: ... > Agree, the bitmap_onto() code is simpler to understand than its help. > > I introduced bitmap_off() to be the "reverse" bitmap_onto() ope

Re: [DMARC error][SPF error] Re: [PATCH v4 00/10] devm_led_classdev_register() usage problem

2024-02-13 Thread Andy Shevchenko
On Tue, Feb 13, 2024 at 2:14 AM George Stark wrote: > > Hello Andy > > On 2/12/24 12:53, Andy Shevchenko wrote: > > On Mon, Feb 12, 2024 at 1:52 AM George Stark > > wrote: > >> I haven't lose hope for the devm_mutex thing and keep pinging those guys &

Re: [PATCH v3 RESEND 3/6] bitmap: Make bitmap_onto() available to users

2024-02-15 Thread Andy Shevchenko
), perhaps in a separate patch we can replace it with bitmap_scatter() (IIUC) with explanation that the former 1) uses atomic ops while being non-atomic as a whole, and b) having quite hard to get documentation. At least that's how I see it, I mean that I would like to leave bitmap_onto() alone and address it separately. > Yury, any preferences ? -- With Best Regards, Andy Shevchenko

<    1   2   3   4   5   >