[lkml]   [2019]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v5 1/2] leds: tps6105x: add driver for mfd chip led mode
Thank you for the review, Dan. Some remarks below.

On Mon, Dec 9, 2019 at 9:12 AM Dan Murphy <> wrote:
> > + priv->fwnode = device_get_next_child_node(pdev->dev.parent, NULL);
> Probably need to check for NULL on the return

The driver will work without crashes or oopses even when this returns NULL:
- struct led_init_data . fwnode is optional (can be NULL)
- fwnode_handle_put() ignores NULL arguments

By not checking for NULL here, non-devicetree users can still select
led mode through platform data on the parent mfd driver, and things
will "just work".

Could I persuade you to keep this behaviour?
Perhaps I should put a comment in to clarify?

> > + ret = regmap_update_bits(tps6105x->regmap, TPS6105X_REG_0,
> Checkpatch should have warned about alignment here

I used 5.4's, but somehow it doesn't warn :(
Will fix that up.

 \ /
  Last update: 2019-12-09 16:16    [W:0.030 / U:46.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site