[PATCH v1 1/1] xen/xenbus: Use *-y instead of *-objs in Makefile

2024-05-08 Thread Andy Shevchenko
*-objs suffix is reserved rather for (user-space) host programs while usually *-y suffix is used for kernel drivers (although *-objs works for that purpose for now). Let's correct the old usages of *-objs in Makefiles. Signed-off-by: Andy Shevchenko --- Note, the original approach is wei

Re: [PATCH 1/2] x86/xen/pvh: Set up percpu for stack canary in 32-bit kernel entry

2023-10-23 Thread Andy Shevchenko
ter is 0x10 for QEMU, which is the same as $PVH_DS_SEL. > %However, for added safety, the percpu should be set up explicitly > %before calling xen_prepare_pvh(), which accesses the stack canary. Stray leading % in two lines above. -- With Best Regards, Andy Shevchenko

Re: [PATCH 00/24] ALSA: Generic PCM copy ops using sockptr_t

2023-08-07 Thread Andy Shevchenko
On Mon, Aug 07, 2023 at 05:22:18PM +0200, Takashi Iwai wrote: > On Tue, 01 Aug 2023 19:51:39 +0200, Andy Shevchenko wrote: > > On Tue, Aug 01, 2023 at 02:54:45PM +0200, Takashi Iwai wrote: ... > I rather wonder why it can't be simple strncpy(). This is obvious. To avoid compile

Re: [PATCH 00/24] ALSA: Generic PCM copy ops using sockptr_t

2023-08-01 Thread Andy Shevchenko
> size) > +{ > + if (!uniptr_is_kernel(src)) Why not to align all the functions to use same conditional (either always positive or negative)? > + return check_zeroed_user(src.user + offset, size); > + return memchr_inv(src.kernel + offset, 0, size) == NULL; > +} ... Taking all remarks into account I would rather go with sockptr.h being untouched for now, just a big /* DO NOT USE, it's obsolete, use uniptr.h instead! */ to be added. -- With Best Regards, Andy Shevchenko

Re: [PATCH 00/24] ALSA: Generic PCM copy ops using sockptr_t

2023-08-01 Thread Andy Shevchenko
_t as a > > > "universal" pointer, inspired by the recent patch from Andy > > > Shevchenko: > > > > > > https://lore.kernel.org/r/20230721100146.67293-1-andriy.shevche...@linux.intel.com > > > > > Even though it sounds a bit weird, soc

Re: [PATCH v3 0/4] Make sscanf() stricter

2023-06-12 Thread Andy Shevchenko
orvalds’s > suggestion of using ! to allow overflow. As Rasmus articulated, NAK w.o. test cases being added to all parts where your changes touch. -- 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 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 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 00/20] x86: address -Wmissing-prototype warnings

2023-05-19 Thread Andy Shevchenko
7.48510-1-andriy.shevche...@linux.intel.com/ I dunno why. -- With Best Regards, Andy Shevchenko

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-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 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 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 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_

[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

[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 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 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 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 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

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/

Re: [PATCH v7 6/6] PCI: Make use of pci_resource_n()

2023-03-24 Thread Andy Shevchenko
On Fri, Mar 24, 2023 at 10:08:39AM +0100, Philippe Mathieu-Daudé wrote: > On 23/3/23 18:36, Andy Shevchenko wrote: > > Replace open-coded implementations of pci_resource_n() in pci.h. ... > > #define pci_resource_n(dev, bar) (&(dev)->resource[(bar)]) > > -#define

Re: [PATCH v7 4/6] EISA: Convert to use less arguments in pci_bus_for_each_resource()

2023-03-24 Thread Andy Shevchenko
On Fri, Mar 24, 2023 at 10:02:15AM +0100, Philippe Mathieu-Daudé wrote: > On 23/3/23 18:36, Andy Shevchenko wrote: > > 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 defini

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

2023-03-23 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 --

[PATCH v7 5/6] pcmcia: Convert to use less arguments in pci_bus_for_each_resource()

2023-03-23 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

[PATCH v7 6/6] PCI: Make use of pci_resource_n()

2023-03-23 Thread Andy Shevchenko
Replace open-coded implementations of pci_resource_n() in pci.h. Signed-off-by: Andy Shevchenko --- include/linux/pci.h | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index 70a4684d5f26..9539cf63fe5e 100644 --- a

[PATCH v7 0/6] Add pci_dev_for_each_resource() helper and update users

2023-03-23 Thread Andy Shevchenko
Mika, see above - added tag to 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 (5): kernel.h: Split out COUNT_ARGS() and CONCATENATE() PCI: Allow pci_bus_for_each_resource

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

2023-03-23 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 v7 4/6] EISA: Convert to use less arguments in pci_bus_for_each_resource()

2023-03-23 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 --- drivers/eisa/pci_eisa.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v7 2/6] PCI: Introduce pci_dev_for_each_resource()

2023-03-23 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

Re: [PATCH v6 1/4] PCI: Introduce pci_dev_for_each_resource()

2023-03-23 Thread Andy Shevchenko
On Thu, Mar 23, 2023 at 10:02:38AM -0500, Bjorn Helgaas wrote: > On Thu, Mar 23, 2023 at 04:30:01PM +0200, Andy Shevchenko wrote: ... > I poked around looking for similar patterns elsewhere with: > > git grep "#define.*for_each_.*_p(" > git grep "#define.*f

Re: [PATCH v6 1/4] PCI: Introduce pci_dev_for_each_resource()

2023-03-23 Thread Andy Shevchenko
On Wed, Mar 22, 2023 at 02:28:04PM -0500, Bjorn Helgaas wrote: > On Mon, Mar 20, 2023 at 03:16:30PM +0200, Andy Shevchenko wrote: ... > > + pci_dev_for_each_resource_p(dev, r) { > > /* zap the 2nd function of the winbond chip */ > > - if (d

[PATCH v6 0/4] Add pci_dev_for_each_resource() helper and update users

2023-03-20 Thread Andy Shevchenko
existing pci_bus_for_each_resource() in the same way and convert users Andy Shevchenko (3): PCI: Split pci_bus_for_each_resource_p() out of pci_bus_for_each_resource() EISA: Convert to use pci_bus_for_each_resource_p() pcmcia: Convert to use pci_bus_for_each_resource_p() Mika Westerberg

[PATCH v6 3/4] EISA: Convert to use pci_bus_for_each_resource_p()

2023-03-20 Thread Andy Shevchenko
The pci_bus_for_each_resource_p() hides 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 --- drivers/eisa/pci_eisa.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v6 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2023-03-20 Thread Andy Shevchenko
The pci_bus_for_each_resource_p() hides 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

[PATCH v6 2/4] PCI: Split pci_bus_for_each_resource_p() out of pci_bus_for_each_resource()

2023-03-20 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 -

[PATCH v6 1/4] PCI: Introduce pci_dev_for_each_resource()

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

[PATCH v5 1/4] PCI: Introduce pci_dev_for_each_resource()

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

[PATCH v5 0/4] PCI: Add pci_dev_for_each_resource() helper and update users

2023-03-14 Thread Andy Shevchenko
convert users Andy Shevchenko (3): PCI: Split pci_bus_for_each_resource_p() out of pci_bus_for_each_resource() EISA: Convert to use pci_bus_for_each_resource_p() pcmcia: Convert to use pci_bus_for_each_resource_p() Mika Westerberg (1): PCI: Introduce pci_dev_for_each_resource() .clang

[PATCH v5 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2023-03-14 Thread Andy Shevchenko
The pci_bus_for_each_resource_p() hides 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

[PATCH v5 3/4] EISA: Convert to use pci_bus_for_each_resource_p()

2023-03-14 Thread Andy Shevchenko
The pci_bus_for_each_resource_p() hides 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 --- drivers/eisa/pci_eisa.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v5 2/4] PCI: Split pci_bus_for_each_resource_p() out of pci_bus_for_each_resource()

2023-03-14 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 -

Re: [PATCH v4 1/4] PCI: Introduce pci_dev_for_each_resource()

2023-03-14 Thread Andy Shevchenko
> > 059b4a086017fb Mika Westerberg 2023-03-10 249 > resource_size(r) == 0) > 0509ad5e1a7d92 Bjorn Helgaas 2008-03-11 250 > continue; Thanks, I'll fix in v5. -- With Best Regards, Andy Shevchenko

Re: [PATCH v4 1/4] PCI: Introduce pci_dev_for_each_resource()

2023-03-14 Thread Andy Shevchenko
On Fri, Mar 10, 2023 at 03:15:38PM -0700, Keith Busch wrote: > On Fri, Mar 10, 2023 at 07:14:13PM +0200, Andy Shevchenko wrote: ... > > +#define pci_dev_for_each_resource_p(dev, res) > > \ > > + __pci_dev_for_each_resource(dev, res, i, unsign

[PATCH v4 2/4] PCI: Split pci_bus_for_each_resource_p() out of pci_bus_for_each_resource()

2023-03-10 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 -

[PATCH v4 1/4] PCI: Introduce pci_dev_for_each_resource()

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

[PATCH v4 3/4] EISA: Convert to use pci_bus_for_each_resource_p()

2023-03-10 Thread Andy Shevchenko
The pci_bus_for_each_resource_p() hides 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 --- drivers/eisa/pci_eisa.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v4 0/4] PCI: Add pci_dev_for_each_resource() helper and update users

2023-03-10 Thread Andy Shevchenko
above - added tag to 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 (3): PCI: Split pci_bus_for_each_resource_p() out of pci_bus_for_each_resource() EISA: Convert to use

[PATCH v4 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2023-03-10 Thread Andy Shevchenko
The pci_bus_for_each_resource_p() hides 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

[PATCH v3 1/4] PCI: Introduce pci_dev_for_each_resource()

2022-11-14 Thread Andy Shevchenko
. Suggested-by: Andy Shevchenko Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko --- .clang-format| 2 ++ arch/alpha/kernel/pci.c | 5 ++--- arch/arm/kernel/bios32.c | 16 +++- arch/mips/pci/pci-legacy.c | 3 +-- arch/powerpc

[PATCH v3 0/4] PCI: Add pci_dev_for_each_resource() helper and

2022-11-14 Thread Andy Shevchenko
...@linux.intel.com Changelog v3: - rebased on top of v2 by Mika, see above - added tag to 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 (3): PCI: Split

[PATCH v3 3/4] EISA: Convert to use pci_bus_for_each_resource_p()

2022-11-14 Thread Andy Shevchenko
The pci_bus_for_each_resource_p() hides the iterator loop since it may be not used otherwise. With this, we may drop that iterator variable definition. Signed-off-by: Andy Shevchenko --- drivers/eisa/pci_eisa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/eisa

[PATCH v3 2/4] PCI: Split pci_bus_for_each_resource_p() out of pci_bus_for_each_resource()

2022-11-14 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 --- .clang-format

[PATCH v3 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2022-11-14 Thread Andy Shevchenko
The pci_bus_for_each_resource_p() hides the iterator loop since it may be not used otherwise. With this, we may drop that iterator variable definition. Signed-off-by: Andy Shevchenko Acked-by: Dominik Brodowski --- drivers/pcmcia/rsrc_nonstatic.c | 9 +++-- drivers/pcmcia/yenta_socket.c

Re: [PATCH v3] platform/x86: don't unconditionally attach Intel PMC when virtualized

2022-11-10 Thread Andy Shevchenko
provided to the VM. > > Make an exception for the Xen initial domain, which does have full > hardware access, and hence can attach to the PMC if present. Reviewed-by: Andy Shevchenko > Fixes: 21ae43570940 ('platform/x86: intel_pmc_core: Substitute PCI with CPUID > en

Re: [PATCH v2] platform/x86: don't unconditionally attach Intel PMC when virtualized

2022-11-10 Thread Andy Shevchenko
off-by: Roger Pau Monné > Acked-by: David E. Box > Cc: Rajneesh Bhardwaj > Cc: David E Box > Cc: Hans de Goede > Cc: Mark Gross > Cc: Andy Shevchenko > Cc: Srinivas Pandruvada > Cc: Juergen Gross > Cc: platform-driver-...@vger.kernel.org > Cc: xen-devel@lists.xenpr

Re: [PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Andy Shevchenko
sidering this is done, can you issue your conditional tag so I will > > > incorporate it in v3? > > > > No need, really. Again, unless Dominik thinks otherwise. > > Ah, thanks for the correction. Then v2 is perfectly fine. I'm fine with either, thanks! -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Andy Shevchenko
with what is there already - unless I am also reading > the current implementation wrong. But it wouldn't be harmful either. > That said, Dominik is the maintainer of PCMCIA driver, so his is the last > word, so to speak. :) > > > Considering this is done, can you issue your conditional tag so I will > > incorporate it in v3? > > No need, really. Again, unless Dominik thinks otherwise. I think that what is wanted to have to get his tag. Thanks for review, both of you, guys! -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Andy Shevchenko
On Thu, Nov 03, 2022 at 06:25:45PM +0100, Dominik Brodowski wrote: > Am Thu, Nov 03, 2022 at 07:12:45PM +0200 schrieb Andy Shevchenko: > > On Thu, Nov 03, 2022 at 06:03:24PM +0100, Dominik Brodowski wrote: ... > > Considering this is done, can you issue your conditiona

Re: [PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Andy Shevchenko
On Thu, Nov 03, 2022 at 06:03:24PM +0100, Dominik Brodowski wrote: > Am Thu, Nov 03, 2022 at 06:46:44PM +0200 schrieb Andy Shevchenko: ... > > - > > - for (i = 0; i < PCI_BRIDGE_RESOURCE_NUM; i++) { > > - res = s->cb_dev->bus->resource[i]; > > -

[PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Andy Shevchenko
The pci_bus_for_each_resource_p() hides the iterator loop since it may be not used otherwise. With this, we may drop that iterator variable definition. Signed-off-by: Andy Shevchenko --- drivers/pcmcia/rsrc_nonstatic.c | 9 +++-- drivers/pcmcia/yenta_socket.c | 3 +-- 2 files changed, 4

[PATCH v2 3/4] EISA: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Andy Shevchenko
The pci_bus_for_each_resource_p() hides the iterator loop since it may be not used otherwise. With this, we may drop that iterator variable definition. Signed-off-by: Andy Shevchenko --- drivers/eisa/pci_eisa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/eisa

[PATCH v2 0/4] PCI: Add pci_dev_for_each_resource() helper and refactor bus one

2022-11-03 Thread Andy Shevchenko
-mika.westerb...@linux.intel.com/ Changelog v2: - refactor to have two macros - refactor existing pci_bus_for_each_resource() in the same way and convert users Andy Shevchenko (3): PCI: Split pci_bus_for_each_resource_p() out of pci_bus_for_each_resource() EISA: Convert to use

[PATCH v2 2/4] PCI: Split pci_bus_for_each_resource_p() out of pci_bus_for_each_resource()

2022-11-03 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 --- .clang-format

[PATCH v2 1/4] PCI: Introduce pci_dev_for_each_resource()

2022-11-03 Thread Andy Shevchenko
. Suggested-by: Andy Shevchenko Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko --- .clang-format| 2 ++ arch/alpha/kernel/pci.c | 5 ++--- arch/arm/kernel/bios32.c | 16 +++- arch/mips/pci/pci-legacy.c | 3 +-- arch/powerpc

Re: [PATCH v3 7/8] genirq: Return a const cpumask from irq_data_get_affinity_mask

2022-07-03 Thread Andy Shevchenko
ta_update_affinity, this commit updates the remaining code that > either did not modify the cpumask or immediately passed the modified > mask to irq_set_affinity. When we refer to functions, we use parentheses, e.g. func(). -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 03/45] notifier: Add atomic/blocking_notifier_has_unique_priority()

2021-10-28 Thread Andy Shevchenko
&& (*nl)->priority >= n->priority) { ' != NULL' is not needed. > + if ((*nl)->priority == n->priority && (*nl) != n) { > + ret = false; > + break; > + } > + > + nl = &((*nl)->next); > + } -- With Best Regards, Andy Shevchenko

Re: [PATCH v6 00/11] PCI: Drop duplicated tracking of a pci_dev's bound driver

2021-10-15 Thread Andy Shevchenko
On Fri, Oct 15, 2021 at 7:46 PM Bjorn Helgaas wrote: > On Wed, Oct 13, 2021 at 04:23:09PM +0300, Andy Shevchenko wrote: ... > so compared to Uwe's v6, I restored that section to the original code. > My goal here was to make the patch as simple and easy to review as > poss

Re: [PATCH v6 00/11] PCI: Drop duplicated tracking of a pci_dev's bound driver

2021-10-13 Thread Andy Shevchenko
On Wed, Oct 13, 2021 at 06:33:56AM -0500, Bjorn Helgaas wrote: > On Wed, Oct 13, 2021 at 12:26:42PM +0300, Andy Shevchenko wrote: > > On Wed, Oct 13, 2021 at 2:33 AM Bjorn Helgaas wrote: > > > On Mon, Oct 04, 2021 at 02:59:24PM +0200, Uwe Kleine-König wrote: ... > > I

Re: [PATCH v6 00/11] PCI: Drop duplicated tracking of a pci_dev's bound driver

2021-10-13 Thread Andy Shevchenko
gt; pci_dev_put(pcidev); > - return result; > + return PCI_ERS_RESULT_NONE; > } > pdrv = to_pci_driver(pcidev->dev.driver); What about splitting the conditional to two with clear error message in each and use pci_err() in the second one? ... > default: > dev_err(&pdev->xdev->dev, > - "bad request in aer recovery " > - "operation!\n"); > + "bad request in AER recovery operation!\n"); Stray change? Or is it in a separate patch in your tree? -- With Best Regards, Andy Shevchenko

Re: [PATCH v15 10/12] swiotlb: Add restricted DMA pool initialization

2021-08-26 Thread Andy Shevchenko
urn -EINVAL; > + } > + > + rmem->ops = &rmem_swiotlb_ops; > + pr_info("Reserved memory: created restricted DMA pool at %pa, size > %ld MiB\n", > + &rmem->base, (unsigned long)rmem->size / SZ_1M); Oh là là, besides explicit casting that I believe can be avoided, %ld != unsigned long. Can you check the printk-formats.rst document? > + return 0; > +} > + > +RESERVEDMEM_OF_DECLARE(dma, "restricted-dma-pool", rmem_swiotlb_setup); > #endif /* CONFIG_DMA_RESTRICTED_POOL */ -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 5/6] PCI: Adapt all code locations to not use struct pci_dev::driver directly

2021-08-03 Thread Andy Shevchenko
n't remember if it's a checkpatch who complains on this. > + return (pdev && (pdrv = pci_driver_of_dev(pdev))) ? pdrv->name : > ""; -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 4/6] PCI: Provide wrapper to access a pci_dev's bound driver

2021-08-03 Thread Andy Shevchenko
TAB instead of space after #define. Not sure if it's good to have them different. -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 0/5] PCI: Drop duplicated tracking of a pci_dev's bound driver

2021-07-30 Thread Andy Shevchenko
open to restructure this series if this simplifies things. E.g. the > use of the new wrapper in drivers/pci could be squashed into the patch > introducing the wrapper. Patch 4 could be split by maintainer tree or > squashed into patch 3 completely. I see only patch 4 and this cover letter... -- With Best Regards, Andy Shevchenko

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

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

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

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

Re: [PATCH v3] intel/pinctrl: check REVID register value for device presence

2021-03-25 Thread Andy Shevchenko
PCI device BAR or marked as reserved in > the host memory map. Applied for fixes, thanks! > 91d898e51e60 ('pinctrl: intel: Convert capability list to features') > Suggested-by: Andy Shevchenko > Signed-off-by: Roger Pau Monné > --- > Changes since v2: > - Return ENODEV.

Re: [PATCH RESEND] intel/pinctrl: check capability offset is between MMIO region

2021-03-25 Thread Andy Shevchenko
On Thu, Mar 25, 2021 at 09:46:46AM +0100, Roger Pau Monné wrote: > On Wed, Mar 24, 2021 at 06:57:12PM +0200, Andy Shevchenko wrote: > > On Wed, Mar 24, 2021 at 04:13:59PM +0100, Roger Pau Monné wrote: > > > On Wed, Mar 24, 2021 at 04:22:44PM +0200, Andy Shevchenko wrote: >

Re: [PATCH v2 2/2] intel/pinctrl: check capability offset is between MMIO region

2021-03-24 Thread Andy Shevchenko
ms > from crashing the kernel if the capability linked list is somehow > broken. I don't think we need a dead code in the kernel. If you have a hardware to show this issue, I eagerly want to know this! -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 1/2] intel/pinctrl: check REVID register value for device presence

2021-03-24 Thread Andy Shevchenko
; region(s) are not exposed on a PCI device BAR or marked as reserved in > the host memory map. Any particular point that we can use in the Fixes tag? ... > Suggested-by: Andy Shevchenko Hmm... was it that address I have used? In any case I think my @linux.intel.com is better. ... >

Re: [PATCH RESEND] intel/pinctrl: check capability offset is between MMIO region

2021-03-24 Thread Andy Shevchenko
On Wed, Mar 24, 2021 at 04:13:59PM +0100, Roger Pau Monné wrote: > On Wed, Mar 24, 2021 at 04:22:44PM +0200, Andy Shevchenko wrote: > > On Wed, Mar 24, 2021 at 02:55:15PM +0100, Roger Pau Monné wrote: > > > On Wed, Mar 24, 2021 at 02:58:07PM +0200, Andy Shevchenko wrote: >

Re: [PATCH RESEND] intel/pinctrl: check capability offset is between MMIO region

2021-03-24 Thread Andy Shevchenko
On Wed, Mar 24, 2021 at 02:55:15PM +0100, Roger Pau Monné wrote: > On Wed, Mar 24, 2021 at 02:58:07PM +0200, Andy Shevchenko wrote: > > On Wed, Mar 24, 2021 at 01:31:18PM +0100, Roger Pau Monne wrote: ... > What could be done is check whether reading REVID returns ~0 and exit > at

Re: [PATCH RESEND] intel/pinctrl: check capability offset is between MMIO region

2021-03-24 Thread Andy Shevchenko
n to avoid loading these drivers or check with something like pci_device_is_present() approach. > Fixes: 91d898e51e60 ('pinctrl: intel: Convert capability list to features') > Signed-off-by: Roger Pau Monné > --- > Cc: Mika Westerberg > Cc: Andy Shevchenko > Cc: Linus

Re: [patch 03/30] genirq: Move irq_set_lockdep_class() to core

2020-12-12 Thread Andy Shevchenko
On Sat, Dec 12, 2020 at 12:07 AM Thomas Gleixner wrote: > > On Fri, Dec 11 2020 at 22:08, Thomas Gleixner wrote: > > > On Fri, Dec 11 2020 at 19:53, Andy Shevchenko wrote: > > > >> On Thu, Dec 10, 2020 at 10:14 PM Thomas Gleixner > >> wrote: > >

Re: [patch 16/30] mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc

2020-12-11 Thread Andy Shevchenko
;line, > + line + irq_first, >num_interrupts[line], > num_wake_interrupts[line]); -- With Best Regards, Andy Shevchenko

Re: [patch 03/30] genirq: Move irq_set_lockdep_class() to core

2020-12-11 Thread Andy Shevchenko
dif -- With Best Regards, Andy Shevchenko

Re: [SPECIFICATION RFC] The firmware and bootloader log specification

2020-12-03 Thread Andy Shevchenko
c, e.g. as a part of OASIS Standards. The former seems better but is > not perfect too... With all respect... https://xkcd.com/927/ -- With Best Regards, Andy Shevchenko

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-25 Thread Andy Shevchenko
ually needed for such patches. That's why I don't like churn produced by people who often even didn't compile their useful contributions. -- With Best Regards, Andy Shevchenko

Re: [Xen-devel] [PATCH 0/2] Remove support for deprecated %pf and %pF in vsprintf

2019-03-25 Thread Andy Shevchenko
; be ok with addressing this in another set? If it looks better that way, I have no objection. -- With Best Regards, Andy Shevchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 0/2] Remove support for deprecated %pf and %pF in vsprintf

2019-03-24 Thread Andy Shevchenko
On Sun, Mar 24, 2019 at 11:10:08PM +0200, Sakari Ailus wrote: > On Fri, Mar 22, 2019 at 07:05:50PM +0200, Andy Shevchenko wrote: > > On Fri, Mar 22, 2019 at 03:53:50PM +0200, Sakari Ailus wrote: > > > > > Porting a patch > > > forward should have no issues

Re: [Xen-devel] [PATCH 0/2] Remove support for deprecated %pf and %pF in vsprintf

2019-03-22 Thread Andy Shevchenko
atch, it makes sense to convert to an error for a while. People are tending read documentation on internet and thus might have outdated one. And yes, the compiler doesn't tell a thing about it. P.S. Though, if majority of people will tell that I'm wrong, then it's okay to remove.

[Xen-devel] [PATCH v2] xen/ACPI: Switch to bitmap_zalloc()

2019-03-04 Thread Andy Shevchenko
Switch to bitmap_zalloc() to show clearly what we are allocating. Besides that it returns pointer of bitmap type instead of opaque void *. Signed-off-by: Andy Shevchenko --- - added one more missed conversion drivers/xen/xen-acpi-processor.c | 22 +++--- 1 file changed, 11

[Xen-devel] [PATCH v1] xen/ACPI: Switch to bitmap_zalloc()

2019-03-04 Thread Andy Shevchenko
Switch to bitmap_zalloc() to show clearly what we are allocating. Besides that it returns pointer of bitmap type instead of opaque void *. Signed-off-by: Andy Shevchenko --- drivers/xen/xen-acpi-processor.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a

Re: [Xen-devel] [PATCH v3 0/3] xen: re-enable booting as Xen PVH guest

2018-02-19 Thread Andy Shevchenko
| 7 +++ >> 6 files changed, 43 insertions(+), 4 deletions(-) >> > The series is fine by me: > > Acked-by: Rafael J. Wysocki Don't know much about Xen, though the ACPI / x86 stubs are exactly what I'm wanting! Thanks. Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v2 1/2] x86/acpi: add retrieval function for rsdp address

2018-02-01 Thread Andy Shevchenko
On Thu, Feb 1, 2018 at 9:57 AM, Rafael J. Wysocki wrote: > On Wed, Jan 31, 2018 at 4:43 PM, Andy Shevchenko > wrote: >> On Mon, Jan 29, 2018 at 5:02 AM, Rafael J. Wysocki wrote: >>> On Sun, Jan 28, 2018 at 4:04 PM, Andy Shevchenko >>> wrote: >> Ins

Re: [Xen-devel] [PATCH v2 1/2] x86/acpi: add retrieval function for rsdp address

2018-01-31 Thread Andy Shevchenko
On Mon, Jan 29, 2018 at 5:02 AM, Rafael J. Wysocki wrote: > On Sun, Jan 28, 2018 at 4:04 PM, Andy Shevchenko > wrote: >> On Fri, Jan 26, 2018 at 8:21 PM, Juergen Gross wrote: >>> On 26/01/18 19:08, Andy Shevchenko wrote: >>>> On Thu, Jan 25, 2018 at 4:36 PM

Re: [Xen-devel] [PATCH v2 1/2] x86/acpi: add retrieval function for rsdp address

2018-01-31 Thread Andy Shevchenko
On Mon, Jan 29, 2018 at 5:01 AM, Rafael J. Wysocki wrote: > On Fri, Jan 26, 2018 at 7:08 PM, Andy Shevchenko > wrote: >> I have stumbled on the similar stuff and realize that. >> >> Perhaps, one of the solution is to have an additional struct under >> x86_init t

  1   2   >