return __xchg(_chain->p_prod_elem,
> + (void *)(((u8 *)p_chain->p_prod_elem) +
> p_chain->elem_size));
Wondering if you still need a (void *) casting after the change. Ditto for the
rest of similar cases.
> }
...
Btw, is it done by coccinelle? If no, why not providing the script?
--
With Best Regards,
Andy Shevchenko
set_value(par->gpio.led[0], polarity);
?
--
With Best Regards,
Andy Shevchenko
pped - it was only used for debug.
> Signed-off-by: Sam Ravnborg
> Cc: Stephen Kitt
> Cc: Greg Kroah-Hartman
> Cc: Daniel Thompson
> Cc: Andy Shevchenko
> Cc: linux-fb...@vger.kernel.org
Not sure why you have this (at least) explicitly mentioned as get_maintainer.pl
ca
_switch(dev, sw, switch_desc, data,
mux_set);
if (ret)
goto err_unregister_typec_switches;
return 0;
err_unregister_typec_switches:
of_node_put(sw);
drm_dp_unregister_typec_switches(switch_desc);
dev_err(dev, "Failed to register mode switch: %d\n", ret);
return ret;
--
With Best Regards,
Andy Shevchenko
->of_node)
I would use if (dev_of_node(dev)), but it's up to you and maintainers.
> + device_for_each_child_node(dev, fwnode)
> + fw_devlink_purge_absent_suppliers(fwnode);
--
With Best Regards,
Andy Shevchenko
> > behavior on EFI systems, by selecting the mapping type
> > based on if the framebuffer region intersects with system RAM. If it does,
> > it's
> > common sense that it should be in RAM as a whole, and so the system RAM
> > mapping is
> > used. It was tested to be w
IW,
Reviewed-by: Andy Shevchenko
> Signed-off-by: Andrzej Hajda
> ---
> include/linux/non-atomic/xchg.h | 19 +++
> 1 file changed, 19 insertions(+)
> create mode 100644 include/linux/non-atomic/xchg.h
>
> diff --git a/include/linux/non-atomic/xchg.h b/include/l
On Wed, Dec 14, 2022 at 05:53:52PM +0200, Andy Shevchenko wrote:
> On Wed, Dec 14, 2022 at 04:15:49PM +0100, Eric Dumazet wrote:
> > On Wed, Dec 14, 2022 at 1:34 PM Stanislaw Gruszka
> > wrote:
> > > On Mon, Dec 12, 2022 at 03:35:20PM +0100, Jason A. Donenfeld wro
for casual readers.
P.S. I believe you applied a common sense and in some cases
the renames are necessary.
--
With Best Regards,
Andy Shevchenko
On Tue, Dec 13, 2022 at 11:09:12AM +0100, Andrzej Hajda wrote:
> On 09.12.2022 19:56, Andy Shevchenko wrote:
> > On Fri, Dec 09, 2022 at 04:48:39PM +0100, Andrzej Hajda wrote:
...
> > > I hope there will be place for such tiny helper in kernel.
> > > Quick cocci anal
;
Isn't it too many "random":s encoded in the name?
I would leave either "rng" or "[p]random".
> rand %= (i + 1);
> swap_free_obj(slab, i, rand);
> }
--
With Best Regards,
Andy Shevchenko
On Sat, Dec 10, 2022 at 11:41:54PM +0100, Uwe Kleine-König wrote:
> On Sat, Dec 10, 2022 at 10:57:16PM +0200, Andy Shevchenko wrote:
> > On Sat, Dec 10, 2022 at 10:18:33AM +0100, Uwe Kleine-König wrote:
> > > On Fri, Dec 09, 2022 at 11:47:54PM +0200, Andy Shevchenko wrote:
>
On Sat, Dec 10, 2022 at 10:18:33AM +0100, Uwe Kleine-König wrote:
> On Fri, Dec 09, 2022 at 11:47:54PM +0200, Andy Shevchenko wrote:
> > On Wed, Nov 30, 2022 at 04:21:37PM +0100, Uwe Kleine-König wrote:
...
> > I'm wondering why we didn't see a compiler warning about mi
now see the same as if .get_state wasn't implemented at all.
I'm wondering why we didn't see a compiler warning about mistyped function
prototypes in some drivers.
P.S. The series is good thing to do, thank you.
--
With Best Regards,
Andy Shevchenko
On Fri, Dec 09, 2022 at 08:56:28PM +0200, Andy Shevchenko wrote:
> On Fri, Dec 09, 2022 at 04:48:39PM +0100, Andrzej Hajda wrote:
...
> > I hope there will be place for such tiny helper in kernel.
> > Quick cocci analyze shows there is probably few thousands places
> > w
non-atomic/xchg.h, dunno.
Btw, have you looked if Ingo's gigantic series have done anything to cmpxchg.h
and related headers? Maybe some ideas can be taken from there?
--
With Best Regards,
Andy Shevchenko
On Thu, Dec 08, 2022 at 02:14:54PM +0100, Greg Kroah-Hartman wrote:
> On Thu, Dec 08, 2022 at 02:54:45PM +0200, Andy Shevchenko wrote:
> > On Wed, Nov 30, 2022 at 03:48:35PM +0200, Andy Shevchenko wrote:
> > > Some of the existing users, and definitely will be new ones, w
On Wed, Nov 30, 2022 at 03:48:35PM +0200, Andy Shevchenko wrote:
> Some of the existing users, and definitely will be new ones, want to
> count existing nodes in the list. Provide a generic API for that by
> moving code from i915 to list.h.
Greg, I believe this one is ready to be taken.
The list API provides the list_count_nodes() to help with counting
existing nodes in the list. Utilise it.
Signed-off-by: Andy Shevchenko
---
v5: used renamed API (LKP)
v4: no change
v3: no change
v2: no change
drivers/usb/gadget/udc/bcm63xx_udc.c | 11 +++
1 file changed, 3 insertions
The list API provides the list_count_nodes() to help with counting
existing nodes in the list. Utilise it.
Signed-off-by: Andy Shevchenko
---
v5: used renamed API (LKP)
v4: no change
v3: fixed typo in the commit message (Fabio
Some of the existing users, and definitely will be new ones, want to
count existing nodes in the list. Provide a generic API for that by
moving code from i915 to list.h.
Reviewed-by: Lucas De Marchi
Acked-by: Jani Nikula
Signed-off-by: Andy Shevchenko
---
v5: added tag (Lucas), renamed API
The list API provides the list_count_nodes() to help with counting
existing nodes in the list. Utilise it.
Acked-by: Mathias Nyman
Signed-off-by: Andy Shevchenko
---
v5: used renamed API (LKP)
v4: added tag (Mathias)
v3: no change
v2: no change
drivers/usb/host/xhci-ring.c | 7 ++-
1 file
e to avoid a deadlock in switch probe (the
> switch mistakenly
> + * assumes the connector is a supplier).
> + */
A bit too long lines...
> + if (dev->of_node)
Why do you need this check?
> + device_for_each_child_node(dev, fwnode)
> + fw_devlink_purge_absent_suppliers(fwnode);
--
With Best Regards,
Andy Shevchenko
p;& port_num != dp_lanes[i] / 2) {
> + dev_err(dev, "Invalid data lane numbers\n");
> + return -EINVAL;
> + }
As per previous patch comments.
> + port_num = dp_lanes[i] / 2;
> + }
The above seems like tons of duplicating code that drivers need to implement.
Can we shrink that burden by adding some library functions?
--
With Best Regards,
Andy Shevchenko
GFP_KERNEL);
> + if (!ctx->typec_ports)
> + return -ENOMEM;
...
> +struct anx7625_port_data {
> + bool dp_connected;
You can save some bytes on some architectures if move this to be last field.
> + struct typec_mux_dev *typec_mux;
> + struct anx7625_data *ctx;
> +};
--
With Best Regards,
Andy Shevchenko
The list API now provides the list_count() to help with counting
existing nodes in the list. Utilise it.
Signed-off-by: Andy Shevchenko
---
v4: no change
v3: fixed typo in the commit message (Fabio)
v2: no change
drivers/usb/gadget/legacy/hid.c | 7 ++-
1 file changed, 2 insertions(+), 5
The list API now provides the list_count() to help with counting
existing nodes in the list. Utilise it.
Signed-off-by: Andy Shevchenko
---
v4: no change
v3: no change
v2: no change
drivers/usb/gadget/udc/bcm63xx_udc.c | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
diff
Some of the existing users, and definitely will be new ones, want to
count existing nodes in the list. Provide a generic API for that by
moving code from i915 to list.h.
Signed-off-by: Andy Shevchenko
Acked-by: Jani Nikula
---
v4: fixed prototype when converting to static inline
v3: added tag
The list API now provides the list_count() to help with counting
existing nodes in the list. Utilise it.
Signed-off-by: Andy Shevchenko
Acked-by: Mathias Nyman
---
v4: added tag (Mathias)
v3: no change
v2: no change
drivers/usb/host/xhci-ring.c | 7 ++-
1 file changed, 2 insertions(+), 5
On Tue, Nov 22, 2022 at 05:35:13PM +0200, Andy Shevchenko wrote:
> Some of the existing users, and definitely will be new ones, want to
> count existing nodes in the list. Provide a generic API for that by
> moving code from i915 to list.h.
Sorry for the noise, forgot to squash one
The list API now provides the list_count() to help with counting
existing nodes in the list. Utilise it.
Signed-off-by: Andy Shevchenko
---
v3: no change
v2: no change
drivers/usb/host/xhci-ring.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/host/xhci
The list API now provides the list_count() to help with counting
existing nodes in the list. Utilise it.
Signed-off-by: Andy Shevchenko
---
v3: fixed typo in the commit message (Fabio)
v2: no change
drivers/usb/gadget/legacy/hid.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions
The list API now provides the list_count() to help with counting
existing nodes in the list. Utilise it.
Signed-off-by: Andy Shevchenko
---
v3: no change
v2: no change
drivers/usb/gadget/udc/bcm63xx_udc.c | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers
Some of the existing users, and definitely will be new ones, want to
count existing nodes in the list. Provide a generic API for that by
moving code from i915 to list.h.
Signed-off-by: Andy Shevchenko
Acked-by: Jani Nikula
---
v3: added tag (Jani), changed to be static inline (Mike)
v2: dropped
On Tue, Nov 15, 2022 at 05:46:28PM +0200, Jani Nikula wrote:
> On Mon, 14 Nov 2022, Andy Shevchenko
> wrote:
> > Some of the existing users, and definitely will be new ones, want to
> > count existing nodes in the list. Provide a generic API for that by
> > moving
On Mon, Nov 14, 2022 at 04:15:35PM -0300, Fabio Estevam wrote:
> On Mon, Nov 14, 2022 at 1:22 PM Andy Shevchenko
> wrote:
> >
> > The list API now provides the list_count() to help with counting
> > existing nodes in the list. Uilise it.
>
> s/Uilise/Utilise
Fixed
ove. However, I'm fine with the inline.
--
With Best Regards,
Andy Shevchenko
The list API now provides the list_count() to help with counting
existing nodes in the list. Uilise it.
Signed-off-by: Andy Shevchenko
---
v2: no change
drivers/usb/gadget/udc/bcm63xx_udc.c | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/gadget/udc
The list API now provides the list_count() to help with counting
existing nodes in the list. Uilise it.
Signed-off-by: Andy Shevchenko
---
v2: no change
drivers/usb/host/xhci-ring.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers
Some of the existing users, and definitely will be new ones, want to
count existing nodes in the list. Provide a generic API for that by
moving code from i915 to list.h.
Signed-off-by: Andy Shevchenko
---
v2: dropped the duplicate code in i915 (LKP)
drivers/gpu/drm/i915/gt/intel_engine_cs.c
The list API now provides the list_count() to help with counting
existing nodes in the list. Uilise it.
Signed-off-by: Andy Shevchenko
---
v2: no change
drivers/usb/gadget/legacy/hid.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/gadget/legacy/hid.c b
pwm_disable() and pwm_put() are NULL-aware, no need to
duplicate the check in the caller.
Signed-off-by: Andy Shevchenko
---
drivers/video/fbdev/ssd1307fb.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev
that select GPIOLIB.
Fixes: a2ed00da5047 ("drivers/video: add support for the Solomon SSD1307 OLED
Controller")
Signed-off-by: Andy Shevchenko
---
drivers/video/fbdev/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index a9
ace all those dev_dbg():s by trace events/points?
--
With Best Regards,
Andy Shevchenko
struct drm_gem_shmem_object base;
> +
> + uint32_t handle;
Not u32 or __u32? Is it a subsystem requirement to have uint32_t? Or
your driver, then why are you not using similar types elsewhere?
> +};
--
With Best Regards,
Andy Shevchenko
On Thu, Oct 20, 2022 at 10:00 PM Andy Shevchenko
wrote:
> On Thu, Oct 20, 2022 at 8:57 PM Maciej Kwapulinski
> wrote:
...
> > + desc_size = round_up(gna_priv->info.desc_info.desc_size, PAGE_SIZE);
>
> PFN_UP() ?
Or PFN_ALIGN() ?
--
With Best Regards,
Andy Shevchenko
a comma at the end. Same for all similar declarations.
> +};
...
> +#define INTEL_GNA_DEVICE(hwid, info) \
> + { PCI_VDEVICE(INTEL, hwid), (kernel_ulong_t)(info) }
Drop this and use PCI_DEVICE_DATA() instead.
--
With Best Regards,
Andy Shevchenko
"20211201"
Really?
...
> +#include
Are you sure?
> +struct gna_dev_info {
> + u32 hwid;
> + u32 num_pagetables;
> + u32 num_page_entries;
> + u32 max_layer_count;
> + u64 max_hw_mem;
> +};
--
With Best Regards,
Andy Shevchenko
) += sprd/
> +obj-$(CONFIG_DRM_GNA) += gna/
Ditto.
...
> +config DRM_GNA
> + tristate "Intel(R) Gaussian & Neural Accelerator (Intel(R) GNA)"
> + depends on X86 && PCI
No compile test for the rest of possible options?
--
With Best Regards,
Andy Shevchenko
On Tue, Oct 18, 2022 at 08:26:17PM +, Zack Rusin wrote:
> > On Oct 18, 2022, at 4:20 PM, Andy Shevchenko
> > wrote:
> > On Tue, Oct 18, 2022 at 12:11:51PM -0400, Zack Rusin wrote:
> >> From: Zack Rusin
> >>
> >> v2: Thomas and Lauren
se = pci_resource_start(pdev, 0);
Unused pdev.
> if (ast->chip == AST2100 ||
> ast->chip == AST2200 ||
I suggest to compile with `make W=1 C=1` on your side before sending v3 and
address all compiler complaints.
--
With Best Regards,
Andy Shevchenko
ULT;
> >> 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
; 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
catch. 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
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
32000
> > > +#define MT6370_STRBTO_MAX_US 2432000
>
> Hi Jingoo,
>
> This coding style is in accordance with Andy's opinion in this mail:
> https://lore.kernel.org/linux-arm-kernel/CAHp75Vciq4M4kVrabNV9vTLLcd1vR=bme8jledaf9mkrtpc...@mail.gmail.com/
True.
--
With Best Regards,
Andy Shevchenko
On Mon, Sep 05, 2022 at 03:07:48PM -0700, Guenter Roeck wrote:
> On 9/5/22 12:55, Andy Shevchenko wrote:
> > On Mon, Sep 5, 2022 at 10:51 PM Dmitry Torokhov
> > wrote:
> > > On Mon, Sep 05, 2022 at 10:41:40PM +0300, Andy Shevchenko wrote:
> > > > On Mon, Sep
On Mon, Sep 5, 2022 at 10:51 PM Dmitry Torokhov
wrote:
> On Mon, Sep 05, 2022 at 10:41:40PM +0300, Andy Shevchenko wrote:
> > On Mon, Sep 5, 2022 at 10:40 PM Dmitry Torokhov
> > wrote:
> > > On Mon, Sep 05, 2022 at 01:59:44PM +0300, Andy Shevchenko wrote:
> > >
On Mon, Sep 5, 2022 at 10:40 PM Dmitry Torokhov
wrote:
> On Mon, Sep 05, 2022 at 01:59:44PM +0300, Andy Shevchenko wrote:
> > On Mon, Sep 5, 2022 at 9:32 AM Dmitry Torokhov
> > wrote:
...
> > > - gpiod = devm_gpiod_g
On Mon, Sep 5, 2022 at 6:13 PM Guenter Roeck wrote:
> On 9/5/22 04:09, Andy Shevchenko wrote:
> > On Mon, Sep 5, 2022 at 9:33 AM Dmitry Torokhov
> > wrote:
...
> >> + count = device_property_count_u32(dev->parent,
> >> "rohm,hw-timeout-
On Mon, Sep 5, 2022 at 4:19 PM Matti Vaittinen wrote:
> On 9/5/22 13:40, Andy Shevchenko wrote:
> > On Mon, Sep 5, 2022 at 9:33 AM Dmitry Torokhov
> > wrote:
...
> >> + vout_mode = device_property_read_bool(pdev->dev.parent,
> >> +
I'm in favour of the series, but some comments would be good to be addressed.
--
With Best Regards,
Andy Shevchenko
- hw_margin_min = hw_margin[0];
> + if (count == 1)
> + hw_margin_max = hw_margin[0];
> +
> + if (count == 2) {
> + hw_margin_max = hw_margin[1];
> + hw_margin_min = hw_margin[0];
> + }
> }
--
With Best Regards,
Andy Shevchenko
GPIO: %d\n", err);
> return err;
> }
--
With Best Regards,
Andy Shevchenko
handling secondary fwnodes when gpiolib is taught to handle
> gpios described by swnodes.
I would remove this sentence from all commit messages since it's a
debatable thing and might even not happen, so the above is a pure
speculation.
--
With Best Regards,
Andy Shevchenko
On Mon, Sep 5, 2022 at 1:53 PM Pali Rohár wrote:
> On Monday 05 September 2022 13:49:21 Andy Shevchenko wrote:
...
> > It's not the same dev and its node in this case. There is one reset
> > for _all_ ports, here is the reset on _per port_ basis.
>
> aardvark is singl
On Mon, Sep 5, 2022 at 1:49 PM Andy Shevchenko
wrote:
>
> On Mon, Sep 5, 2022 at 10:23 AM Pali Rohár wrote:
> > On Sunday 04 September 2022 23:30:53 Dmitry Torokhov wrote:
>
> ...
>
> > > - rp->reset_gpio = devm
eset-gpio you have used
> devm_gpiod_get_optional() and here in pci-tegra.c you have used
> devm_fwnode_gpiod_get()? I think that PERST# logic is same in both
> drivers.
It's not the same dev and its node in this case. There is one reset
for _all_ ports, here is the reset on _per port_ basis.
--
With Best Regards,
Andy Shevchenko
name(pcie->reset_gpio, "pcie1-reset");
> > + if (ret) {
> > + dev_err(dev, "Failed to set reset gpio name: %d\n", ret);
> > + return ret;
> > }
Ditto.
--
With Best Regards,
Andy Shevchenko
On Mon, Sep 5, 2022 at 9:33 AM Dmitry Torokhov
wrote:
>
> I would like to stop exporting OF-specific devm_gpiod_get_from_of_node()
> so that gpiolib can be cleaned a bit, so let's switch to the generic
> fwnode property API.
Special thanks for using dev_fwnode().
Reviewed-by: And
to read properties in
> bd957x_probe() to the generic device property API as well.
With or without below addressed,
Reviewed-by: Andy Shevchenko
> Signed-off-by: Dmitry Torokhov
>
> diff --git a/drivers/regulator/bd9576-regulator.c
> b/drivers/regulator/bd9576-regulator.c
> ind
e added a macro to the for declaring the
> linear_range struct simply (see patch v9-0005) and made some changes for
> MT6370 drivers (see v9 section of the change log below).
Your cover letter is dangling. Make sure you are using --cover-letter --thread
when preparing the series.
--
With Best Regards,
Andy Shevchenko
ing devm_regulator_get_enable()
> hwmon: adm1177: simplify using devm_regulator_get_enable()
hwmon uses a different pattern for the Subject line.
--
With Best Regards,
Andy Shevchenko
s the resources in the right order. These devres helpers give
> a false sense of security to driver authors and they will end up
> introducing problems, the same way that devm_kzalloc() makes it
> outrageously easy to crash the kernel by disconnecting a device that is
> in use.
--
With Best Regards,
Andy Shevchenko
e already in trouble?
--
With Best Regards,
Andy Shevchenko
ource/drivers/staging/fbtft/fb_pcd8544.c
[2]: https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/solomon
--
With Best Regards,
Andy Shevchenko
if ((x >> (7 - n)) & 1)
> + memset(dst, 0xff, (info.depth / 8));
Too many parentheses.
> + else
> + memset(dst, 0, (info.depth / 8));
Ditto.
> + dst += (info.depth / 8);
Ditto.
> + }
> +}
--
With Best Regards,
Andy Shevchenko
On Sat, Aug 6, 2022 at 6:37 PM Markuss Broks wrote:
>
> The "node" argument is actually an offset, and it's also
> an "int", and not "unsigned long". Correct the of_setup_earlycon
> function.
Suggested-by: Greg KH?
> Signed-off-by: Markuss Broks
--
With Best Regards,
Andy Shevchenko
o check the style
* of multi-line comments like
* this one.
*/
> +*/
--
With Best Regards,
Andy Shevchenko
use different mask, shift and default
> +* maxiimum brightness value.
Use spell-checker for all your patches.
> +*/
--
With Best Regards,
Andy Shevchenko
e_property_read_string(init_data->fwnode, "default-state",
> + _str);
> + if (!ret) {
> + ret = match_string(states, ARRAY_SIZE(states), stat_str);
> + if (ret < 0)
> + ret = STATE_OFF;
> +
> + led->default_state = ret;
> + }
Replace this by using led_init_default_state_get().
--
With Best Regards,
Andy Shevchenko
switching battery
> charger, a USB Type-C & Power Delivery (PD) controller, dual
> Flash LED current sources, a RGB LED driver, a backlight WLED driver,
> a display bias driver and a general LDO for portable devices.
>
> Add a support for the Type-C & Power Delivery contr
cklight WLED driver,
> a display bias driver and a general LDO for portable devices.
>
> Add a support for the Type-C & Power Delivery controller in
> MediaTek MT6370 IC.
Reviewed-by: Andy Shevchenko
> Reviewed-by: AngeloGioacchino Del Regno
>
> Signed-off-by: ChiaEn Wu
>
al
> Flash LED current sources, a RGB LED driver, a backlight WLED driver,
> a display bias driver and a general LDO for portable devices.
>
> Add a support for the Type-C & Power Delivery controller in
> MediaTek MT6370 IC.
Reviewed-by: Andy Shevchenko
> Reviewed-b
On Sat, Jul 30, 2022 at 10:55 AM Markuss Broks wrote:
> On 7/29/22 00:19, Andy Shevchenko wrote:
> > On Thu, Jul 28, 2022 at 4:32 PM Markuss Broks
> > wrote:
...
> I suppose we could use something like:
>
> if (region_intersects() == REGION_INTERSECTS)
Yes.
...
&
On Fri, Jul 29, 2022 at 9:57 AM Greg Kroah-Hartman
wrote:
> On Thu, Jul 28, 2022 at 11:04:24PM +0200, Andy Shevchenko wrote:
> > On Thu, Jul 28, 2022 at 4:41 PM Greg Kroah-Hartman
> > wrote:
> > > On Thu, Jul 28, 2022 at 05:28:18PM +0300, Markuss Broks wrote:
...
>
On Fri, Jul 29, 2022 at 8:17 AM szuni chen wrote:
> Andy Shevchenko 於 2022年7月25日 週一 下午4:51寫道:
> > On Fri, Jul 22, 2022 at 12:25 PM ChiaEn Wu wrote:
> > >
> > > From: Alice Chen
...
> > > Signed-off-by: Alice Chen
> >
> > This SoB chain
else
> + memset(dst, 0, (info.depth / 8));
> + dst += (info.depth / 8);
> + }
> +}
Wondering if we already have something like this in DRM/fbdev and can
split into a generic helper.
...
> + ret = sscanf(device->options, "%u,%u,%u", , ,
> );
> + if (ret != 3)
> + return -ENODEV;
Don't we have some standard template of this, something like XxYxD,
where X, Y, and D are respective decimal numbers?
--
With Best Regards,
Andy Shevchenko
vers/video/fbdev/earlycon.c
> >
> > That should be a rename, not a delete/create, right?
>
> Should this change be split into two separate commits,
> one for moving the file and the second for making changes?
I think it's a pointer to use `git format-patch -M -C ...` when
preparing patches.
--
With Best Regards,
Andy Shevchenko
nter, but what puzzles me, why it can't be declared as a such:
struct device_node *node;
?
> And it's not really a "node" but an "offset", right?
Seems no.
--
With Best Regards,
Andy Shevchenko
On Wed, Jul 27, 2022 at 9:37 AM ChiaEn Wu wrote:
> On Tue, Jul 26, 2022 at 8:18 PM Andy Shevchenko
> wrote:
>
> ...
>
> > > Just for saving memory space.
> > > Because these led_classdevs do not be used at the same time.
> > > Or do you think i
On Tue, Jul 26, 2022 at 1:46 PM ChiaEn Wu wrote:
> On Mon, Jul 25, 2022 at 4:41 PM Andy Shevchenko
> wrote:
...
> > > +struct mt6370_led {
> > > + union {
> > > + struct led_classdev isink;
> > > + struct led_clas
cription to
> "For the flash to turn on/off, need to wait for 5ms/500us analog settling
> time.
> If any flash led is already used, then the analog is settled done, we
> don't need to wait again."
> is it answer the question?
No. I'm talking from the Linux APIs perspective. There is a huge
difference between those branches. Please, conduct research, read
documentation to understand what my question is about.
--
With Best Regards,
Andy Shevchenko
On Mon, Jul 25, 2022 at 11:06 AM ChiaEn Wu wrote:
> On Mon, Jul 25, 2022 at 4:43 PM Andy Shevchenko
> wrote:
...
> > > > > +#define MT6370_REG_DEV_INFO0x100
> > > > > +#define MT6370_REG_CHG_IRQ10x1C0
> > > > > +#define MT6370_R
GPIOD_OUT_HIGH);
> + if (IS_ERR(priv->enable_gpio))
> + dev_err(dev, "Failed to get 'enable' gpio\n");
What does this mean? Shouldn't be
return dev_err_probe()?
--
With Best Regards,
Andy Shevchenko
else if (prev && !curr)
> + udelay(500);
This still remains unanswered, why in the first place we allow
switching, and a busy loop in the other place?
--
With Best Regards,
Andy Shevchenko
if (ret)
> + goto unlock;
> + }
> + }
> +
> + ret = regmap_update_bits(priv->regmap, MT6370_REG_FLEDEN,
> +enable_mask, val);
> + if (ret)
> + goto unlock;
> +
> + priv->fled_torch_used = curr;
> +
> +unlock:
> + mutex_unlock(>lock);
> + return ret;
> +}
...
> + struct v4l2_flash_config v4l2_config = {0};
0 is not needed.
--
With Best Regards,
Andy Shevchenko
On Mon, Jul 25, 2022 at 10:30 AM ChiaEn Wu wrote:
> On Mon, Jul 25, 2022 at 4:00 PM Andy Shevchenko
> wrote:
...
> > > +#define MT6370_REG_DEV_INFO0x100
> > > +#define MT6370_REG_CHG_IRQ10x1C0
> > > +#define MT6370_REG_CHG_MASK1 0x1E0
> &g
+ break;
> + }
> +
> + mutex_unlock(>priv->lock);
> +
> + return ret;
> +}
...
> + if (!fwnode_property_read_string(init_data->fwnode, "default-state",
> +_str)) {
ret = fwnode_...(...);
if (!ret)
> + ret = match_string(states, ARRAY_SIZE(states), stat_str);
> + if (ret < 0)
> + ret = STATE_OFF;
> +
> + led->default_state = ret;
> + }
...
> + int i = 0, ret;
unsigned int i = 0;
int ret;
--
With Best Regards,
Andy Shevchenko
dev_name(priv->dev), priv);
> +
Redundant blank line.
> + if (ret < 0)
> + return dev_err_probe(priv->dev, ret,
> + "Failed to request irq %s\n",
> +mt6370_chg_irqs[i].name);
> + }
--
With Best Regards,
Andy Shevchenko
301 - 400 of 959 matches
Mail list logo