Re: [PATCH 11/13] mfd: pm8008: rework driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 06, 2024 at 10:18:58PM +0300, Andy Shevchenko wrote:
> Mon, May 06, 2024 at 05:08:28PM +0200, Johan Hovold kirjoitti:

> > +static void devm_irq_domain_fwnode_release(void *res)
> > +{
> 
> > +	struct fwnode_handle *fwnode = res;
> 
> Unneeded line, can be
> 
> static void devm_irq_domain_fwnode_release(void *fwnode)
> 
> > +	irq_domain_free_fwnode(fwnode);
> > +}

I think I prefer it this way for clarity and for type safety in the
unlikely even that the argument to irq_domain_free_fwnode() would ever
change.

> > +	name = devm_kasprintf(dev, GFP_KERNEL, "%pOF-internal", dev->of_node);
> 
> You are using fwnode for IRQ domain and IRQ domain core uses fwnode, why OF here?
> 
> 	name = devm_kasprintf(dev, GFP_KERNEL, "%pfw-internal", dev_fwnode(dev));

This driver only support OF so why bother.

Johan




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux