Re: [PATCH v2 4/4] gpio: aspeed: Add interfaces for co-processor to grab GPIOs

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

 



On Tue, 2018-06-19 at 00:38 +1000, Benjamin Herrenschmidt wrote:
> On Mon, 2018-06-18 at 23:53 +0930, Andrew Jeffery wrote:
> > 
> > >   static inline int irqd_to_aspeed_gpio_data(struct irq_data *d,
> > > -           struct aspeed_gpio **gpio,
> > > -           const struct aspeed_gpio_bank **bank,
> > > -           u32 *bit)
> > > +                                      struct aspeed_gpio **gpio,
> > > +                                      const struct aspeed_gpio_bank **bank,
> > > +                                      u32 *bit, int *offset)
> > >   {
> > > -   int offset;
> > >      struct aspeed_gpio *internal;
> > >   
> > > -   offset = irqd_to_hwirq(d);
> > > +   *offset = irqd_to_hwirq(d);
> > 
> > Nit: Did you intend to set this out parameter before potentially returning an error? I had tried to avoid that up until now.
> 
> Yeah it's constant-ish, I don't see why not

I mean it's a pure function of the input, it's not like there's any
special side effect that one may want to avoid in case of error.

Cheers,
Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux