Re: [PATCH 2/2] arch/powerpc: hotplug driver bridge support

2024-05-11 Thread Andy Shevchenko
_CLASS_BRIDGE_PCI) { > + slotno = PCI_SLOT(PCI_DN(dn)->devfn); > + pci_scan_slot(bus, PCI_DEVFN(slotno, 0)); > + } > + } > + > + return NULL; > +} -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/1] powerpc/52xx: Replace of_gpio.h by proper one

2024-04-05 Thread Andy Shevchenko
On Fri, Apr 05, 2024 at 10:58:55AM +1100, Michael Ellerman wrote: > Andy Shevchenko writes: > > On Wed, Mar 13, 2024 at 03:56:45PM +0200, Andy Shevchenko wrote: > >> of_gpio.h is deprecated and subject to remove. > >> The driver doesn't use it directly, replace it >

Re: [PATCH] serial/pmac_zilog: Remove flawed mitigation for rx irq flood

2024-04-04 Thread Andy Shevchenko
On Fri, Apr 5, 2024 at 6:06 AM Michael Ellerman wrote: > Andy Shevchenko writes: > > On Thu, Apr 4, 2024 at 2:57 AM Finn Thain wrote: > >> On Thu, 4 Apr 2024, Andy Shevchenko wrote: > > > >> > > Cc: Benjamin Herrenschmidt > >> > > Cc: Micha

Re: [PATCH] serial/pmac_zilog: Remove flawed mitigation for rx irq flood

2024-04-04 Thread Andy Shevchenko
On Fri, Apr 5, 2024 at 1:15 AM Finn Thain wrote: > On Thu, 4 Apr 2024, Andy Shevchenko wrote: > > > > > > --- > > > > (here is a good location for Cc:) > > > > > > Documentation/process/submitting-patches.rst indicats that it should > >

Re: [PATCH] serial/pmac_zilog: Remove flawed mitigation for rx irq flood

2024-04-04 Thread Andy Shevchenko
On Thu, Apr 4, 2024 at 2:57 AM Finn Thain wrote: > On Thu, 4 Apr 2024, Andy Shevchenko wrote: ... > > > Cc: Benjamin Herrenschmidt > > > Cc: Michael Ellerman > > > Cc: Nicholas Piggin > > > Cc: Christophe Leroy > > > Cc: "Aneesh Kum

Re: [PATCH] serial/pmac_zilog: Remove flawed mitigation for rx irq flood

2024-04-04 Thread Andy Shevchenko
On Thu, Apr 4, 2024 at 8:07 AM Jiri Slaby wrote: > On 04. 04. 24, 0:29, Andy Shevchenko wrote: > >> Cc: Benjamin Herrenschmidt > >> Cc: Michael Ellerman > >> Cc: Nicholas Piggin > >> Cc: Christophe Leroy > >> Cc: "Aneesh Kumar K.V"

Re: [PATCH] serial/pmac_zilog: Remove flawed mitigation for rx irq flood

2024-04-03 Thread Andy Shevchenko
] [<00638410>] _sinittext+0x410/0xadc > [ 14.56] First of all, please read this https://www.kernel.org/doc/html/latest/process/submitting-patches.html#backtraces-in-commit-messages and amend the commit message accordingly. > Cc: Benjamin Herrenschmidt > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: Christophe Leroy > Cc: "Aneesh Kumar K.V" > Cc: "Naveen N. Rao" > Cc: linux-m...@lists.linux-m68k.org Second, please move these Cc to be after the '---' line > Link: https://github.com/vivier/qemu-m68k/issues/44 > Link: https://lore.kernel.org/all/1078874617.9746.36.camel@gaston/ Missed Fixes tag? > Signed-off-by: Finn Thain > --- (here is a good location for Cc:) -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/1] powerpc/52xx: Replace of_gpio.h by proper one

2024-04-03 Thread Andy Shevchenko
On Wed, Mar 13, 2024 at 03:56:45PM +0200, Andy Shevchenko wrote: > of_gpio.h is deprecated and subject to remove. > The driver doesn't use it directly, replace it > with what is really being used. Any comments on this? -- With Best Regards, Andy Shevchenko

[PATCH v1 1/1] ASoC: fsl: imx-es8328: Remove leftover gpio initialisation

2024-03-25 Thread Andy Shevchenko
The gpio field is not used anymore, remove the leftover. This also fixes the compilation error after the ... Fixes: 9855f05e5536 ("ASoC: fsl: imx-es8328: Switch to using gpiod API") Signed-off-by: Andy Shevchenko --- sound/soc/fsl/imx-es8328.c | 1 - 1 file changed, 1 deletion(-)

Re: [PATCH v2 1/1] ASoC: fsl: imx-es8328: Switch to using gpiod API

2024-03-25 Thread Andy Shevchenko
On Mon, Mar 18, 2024 at 10:07:56PM +0200, Andy Shevchenko wrote: > This updates the driver to gpiod API, and removes yet another use of > of_get_named_gpio(). This also needs a leftover removal. :-( -- With Best Regards, Andy Shevchenko

Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-03-22 Thread Andy Shevchenko
y is not needed to be fixed in a separate patch. So, please consider this. -- With Best Regards, Andy Shevchenko

Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-03-22 Thread Andy Shevchenko
= at91_twi_xfer, > + .xfer = at91_twi_xfer, Seems you made this by a script, can you check the indentations afterwards? > .functionality = at91_twi_func, > }; -- With Best Regards, Andy Shevchenko

[PATCH v2 1/1] ASoC: fsl: imx-es8328: Switch to using gpiod API

2024-03-18 Thread Andy Shevchenko
This updates the driver to gpiod API, and removes yet another use of of_get_named_gpio(). Signed-off-by: Andy Shevchenko --- v2: fixed compilation error sound/soc/fsl/imx-es8328.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sound/soc/fsl/imx-es8328.c b

Re: [PATCH v1 1/1] ASoC: fsl: imx-es8328: Switch to using gpiod API

2024-03-18 Thread Andy Shevchenko
On Mon, Mar 18, 2024 at 09:58:37PM +0200, Andy Shevchenko wrote: > This updates the driver to gpiod API, and removes yet another use of > of_get_named_gpio(). This won't compile, sorry for the noise. I'll send a v2. -- With Best Regards, Andy Shevchenko

[PATCH v1 1/1] ASoC: fsl: imx-es8328: Switch to using gpiod API

2024-03-18 Thread Andy Shevchenko
This updates the driver to gpiod API, and removes yet another use of of_get_named_gpio(). Signed-off-by: Andy Shevchenko --- sound/soc/fsl/imx-es8328.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sound/soc/fsl/imx-es8328.c b/sound/soc/fsl/imx-es8328.c

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

2024-03-14 Thread Andy Shevchenko
mutex as it's often used resource. The leds related changes (except the last one) LGTM, hence FWIW, Reviewed-by: Andy Shevchenko (for patches 2-8) > [1] > https://lore.kernel.org/lkml/8704539b-ed3b-44e6-aa82-586e2f895...@salutedevices.com/T/ > [2] > https://lore.

Re: [PATCH v6 9/9] leds: powernv: use LED_RETAIN_AT_SHUTDOWN flag for leds

2024-03-14 Thread Andy Shevchenko
implementation. So, this change is not related to the main purpose of the series... -- With Best Regards, Andy Shevchenko

Re: [PATCH v6 1/9] locking/mutex: introduce devm_mutex_init

2024-03-14 Thread Andy Shevchenko
say if there is a better (more ordered) place to squeeze a new header to. Please, check. ... After addressing the above comments Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko

[PATCH v1 1/1] powerpc/52xx: Replace of_gpio.h by proper one

2024-03-13 Thread Andy Shevchenko
of_gpio.h is deprecated and subject to remove. The driver doesn't use it directly, replace it with what is really being used. Signed-off-by: Andy Shevchenko --- arch/powerpc/platforms/52xx/mpc52xx_common.c | 2 -- arch/powerpc/platforms/52xx/mpc52xx_gpt.c| 2 +- 2 files changed, 1 insertion

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-12 Thread Andy Shevchenko
] > > On 3/7/24 13:34, Andy Shevchenko wrote: > >> On Thu, Mar 7, 2024 at 4:40 AM George Stark > >> wrote: ... > >>> Signed-off-by: George Stark > >>> Signed-off-by: Christophe Leroy > >> > >>> Hello Christophe. Hope you do

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-07 Thread Andy Shevchenko
obably add a (missing) Co-developed-by. After all you should also follow the correct order of SoBs. -- With Best Regards, Andy Shevchenko

Re: [PATCH v6 4/5] net: wan: fsl_qmc_hdlc: Add runtime timeslots changes support

2024-03-06 Thread Andy Shevchenko
On Wed, Mar 06, 2024 at 04:43:11PM +0100, Herve Codina wrote: > On Wed, 6 Mar 2024 15:43:04 +0200 > Andy Shevchenko wrote: > > On Wed, Mar 06, 2024 at 05:06:12AM -0800, Yury Norov wrote: > > > On Wed, Mar 06, 2024 at 09:07:20AM +0100, Herve Codina wrote: ... > >

Re: [PATCH v6 4/5] net: wan: fsl_qmc_hdlc: Add runtime timeslots changes support

2024-03-06 Thread Andy Shevchenko
4(slot_map) }; This looks ugly. Can we rather provide a macro that does this under the hood? Roughly: #define DEFINE_BITMAP_64(name, src) \ DECLARE_BITMAP(name, 64) = { BITMAP_FROM_U64(src) } -- With Best Regards, Andy Shevchenko

Re: [PATCH v6 3/5] lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers

2024-03-06 Thread Andy Shevchenko
erwise I can move it with bitmap-for-next. -- With Best Regards, Andy Shevchenko

Re: [PATCH v6 1/5] net: wan: Add support for QMC HDLC

2024-03-06 Thread Andy Shevchenko
; QMC_RX_FLAG_HDLC_OVF); This is harder to read. And IIUC net subsystem dislikes the proposed one (I tried to submit a patch to clarify some boolean types vs. integer ones and it was rejected because of the reason I have mentioned). -- With Best Regards, Andy Shevchenko

Re: [PATCH v5 0/5] Add support for QMC HDLC

2024-03-05 Thread Andy Shevchenko
On Tue, Mar 05, 2024 at 12:02:26PM +0100, Herve Codina wrote: > On Thu, 29 Feb 2024 17:23:32 +0200 > Andy Shevchenko wrote: ... > > I think it's a good series and next version will be final. The only > > question is > > possible use of the returned values from bitmap

Re: [kselftests/powerpc] Primitives test build failure with linux-next

2024-02-29 Thread Andy Shevchenko
owing commit > > commit 66a5c40f60f5d88ad8d47ba6a4ba05892853fa1f > kernel.h: removed REPEAT_BYTE from kernel.h Thanks for the report. What is missing here are the steps to reproduce it here. E.g., I have an x86_64 machine, I can use QEMU if required. -- With Best Regards, Andy Shevchenko

Re: [PATCH v5 0/5] Add support for QMC HDLC

2024-02-29 Thread Andy Shevchenko
k it's a good series and next version will be final. The only question is possible use of the returned values from bitmap_scatter()/bitmap_gather(), the rest are minors. Feel free to add Reviewed-by: Andy Shevchenko to patches 4 and 5. -- With Best Regards, Andy Shevchenko

Re: [PATCH v5 4/5] net: wan: fsl_qmc_hdlc: Add runtime timeslots changes support

2024-02-29 Thread Andy Shevchenko
bitmap_weight(map, 64)) { > + dev_err(qmc_hdlc->dev, "Cannot translate timeslots (%64pb, > %64pb) -> %64pb\n", > + ts_mask_avail, ts_mask, map); > + return -EINVAL; > + } Ditto. -- With Best Regards, Andy Shevchenko

Re: [PATCH v5 3/5] lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers

2024-02-29 Thread Andy Shevchenko
On Thu, Feb 29, 2024 at 03:15:51PM +0100, Herve Codina wrote: > From: Andy Shevchenko > > These helpers scatters or gathers a bitmap with the help of the mask > position bits parameter. > > bitmap_scatter() does the following: > s

Re: [PATCH v5 1/5] net: wan: Add support for QMC HDLC

2024-02-29 Thread Andy Shevchenko
de > +#include > +#include > +#include > +#include + spinlock.h + types.h With this fixed (below is up to you), Reviewed-by: Andy Shevchenko ... > +free_desc: > + qmc_chan_reset(qmc_hdlc->qmc_chan, QMC_CHAN_ALL); > + for (i = 0; i < ARRAY_SIZE(qmc_hdlc->rx_descs);

Re: [PATCH v4 5/5] net: wan: fsl_qmc_hdlc: Add framer support

2024-02-29 Thread Andy Shevchenko
On Thu, Feb 29, 2024 at 01:56:05PM +0100, Herve Codina wrote: > On Thu, 22 Feb 2024 17:49:40 +0200 > Andy Shevchenko wrote: > > On Thu, Feb 22, 2024 at 03:22:18PM +0100, Herve Codina wrote: ... > I've got an issue with guard(spinlock_irqsave). No, you got an issue with sp

Re: [PATCH v4 1/5] net: wan: Add support for QMC HDLC

2024-02-22 Thread Andy Shevchenko
On Thu, Feb 22, 2024 at 05:45:01PM +0100, Herve Codina wrote: > On Thu, 22 Feb 2024 17:29:05 +0200 > Andy Shevchenko wrote: > > On Thu, Feb 22, 2024 at 03:22:14PM +0100, Herve Codina wrote: ... > > > + spin_lock_irqsave(_hdlc->tx_lock, flags); > > > >

Re: [PATCH v4 0/5] Add support for QMC HDLC

2024-02-22 Thread Andy Shevchenko
> Compared to the previous iteration: > > https://lore.kernel.org/linux-kernel/20240212075646.19114-1-herve.cod...@bootlin.com/ > this v4 series mainly: >From my point of view after addressing the few non-critical issues the v4 will be final. Thank you! -- With Best Regards, Andy Shevchenko

Re: [PATCH v4 5/5] net: wan: fsl_qmc_hdlc: Add framer support

2024-02-22 Thread Andy Shevchenko
uot;get framer status failed (%d)\n", ret); > + goto end; > + } > + if (framer_status.link_is_on) > + netif_carrier_on(qmc_hdlc->netdev); > + else > + netif_carrier_off(qmc_hdlc->netdev); > + > +end: > + spin_unlock_irqrestore(_hdlc->carrier_lock, flags); > + return ret; > +} -- With Best Regards, Andy Shevchenko

Re: [PATCH v4 4/5] net: wan: fsl_qmc_hdlc: Add runtime timeslots changes support

2024-02-22 Thread Andy Shevchenko
const struct qmc_chan_ts_info *ts_info, u32 > *slot_map) Similar comments apply as per above function. ... > + ret = qmc_chan_get_ts_info(qmc_hdlc->qmc_chan, _info); > + if (ret) { > + dev_err(qmc_hdlc->dev, "get QMC channel ts info failed %d\n", > ret); > + return ret; return dev_err_probe(...); > + } -- With Best Regards, Andy Shevchenko

Re: [PATCH v4 3/5] lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers

2024-02-22 Thread Andy Shevchenko
On Thu, Feb 22, 2024 at 05:39:27PM +0200, Andy Shevchenko wrote: > On Thu, Feb 22, 2024 at 03:22:16PM +0100, Herve Codina wrote: > > From: Andy Shevchenko > > The original work was done by Andy Shevchenko. > > Mine SoB is enough for a credit, but thank you :-) That said, y

Re: [PATCH v4 3/5] lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers

2024-02-22 Thread Andy Shevchenko
On Thu, Feb 22, 2024 at 03:22:16PM +0100, Herve Codina wrote: > From: Andy Shevchenko > > These helpers scatters or gathers a bitmap with the help of the mask > position bits parameter. > > bitmap_scatter() does the following: > s

Re: [PATCH v4 1/5] net: wan: Add support for QMC HDLC

2024-02-22 Thread Andy Shevchenko
_hdlc_xmit; > + SET_NETDEV_DEV(qmc_hdlc->netdev, qmc_hdlc->dev); > + qmc_hdlc->netdev->tx_queue_len = ARRAY_SIZE(qmc_hdlc->tx_descs); > + qmc_hdlc->netdev->netdev_ops = _hdlc_netdev_ops; > + ret = register_hdlc_device(qmc_hdlc->netdev); > + if (ret) { > + dev_err(qmc_hdlc->dev, "failed to register hdlc device (%d)\n", > ret); > + goto free_netdev; > + } > + > + platform_set_drvdata(pdev, qmc_hdlc); > + > + return 0; > + > +free_netdev: > + free_netdev(qmc_hdlc->netdev); > + return ret; > +} -- With Best Regards, Andy Shevchenko

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

2024-02-22 Thread Andy Shevchenko
On Thu, Feb 22, 2024 at 01:05:16PM +0100, Herve Codina wrote: > On Mon, 12 Feb 2024 14:22:56 +0200 > Andy Shevchenko wrote: ... > > > +#include > > > +#include > > > +#include > > > > > +#include > > > +#include > > &g

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

2024-02-21 Thread Andy Shevchenko
On Wed, Feb 21, 2024 at 02:44:31PM +0100, Herve Codina wrote: > On Thu, 15 Feb 2024 21:17:23 +0200 > Andy Shevchenko wrote: [...] > > > Now what's the plan ? > > > Andy, do you want to send a v2 of this patch or may I get the patch, > > > modify it > >

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

2024-02-15 Thread Andy Shevchenko
an 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

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-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: [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
y and 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 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: [DMARC error][SPF error] Re: [PATCH v4 00/10] devm_led_classdev_register() usage problem

2024-02-12 Thread Andy Shevchenko
ersion 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/9/24 20:11, And

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

2024-02-09 Thread Andy Shevchenko
/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: [PATCH v4 00/10] devm_led_classdev_register() usage problem

2024-02-09 Thread Andy Shevchenko
[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/T/#mdbf572a85c33f869a553caf986b6228bb65c

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

2023-12-15 Thread Andy Shevchenko
*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 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 v3 03/11] devm-helpers: introduce devm_mutex_init

2023-12-14 Thread Andy Shevchenko
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 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-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 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 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
e-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 00/35] bitops: add atomic find_bit() operations

2023-12-04 Thread Andy Shevchenko
lers 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 04/10] leds: aw200xx: use devm API to cleanup module's resources

2023-12-04 Thread Andy Shevchenko
t; + return -ENOMEM; Do not shadow the real error code. -- 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
dev, >mutex); if (ret) return ret; ? > + return -ENOMEM; -- 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 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 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 0/8] devm_led_classdev_register() usage problem

2023-11-24 Thread Andy Shevchenko
ases 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 LED_AUTO_OFF_AT_SHUTDOWN (similar to > LED_RETAIN_AT_SHUTDOWN). NAK. Just fix the drivers by wrapping mutex_destroy() into devm, There are many doing so. You may be brave enough to introduce devm_mutex_init() somewhere in include/linux/device* -- With Best Regards, Andy Shevchenko

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

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

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

2023-07-18 Thread Andy Shevchenko
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 v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-06-05 Thread Andy Shevchenko
ot for 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 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-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 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 changes i

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 existin

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

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

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

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

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

[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

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

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

  1   2   3   4   5   >