Re: [PATCH 2/3] i2c: slave-mqueue: add a slave backend to receive and queue messages

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

 



On Wed, Jun 5, 2019 at 5:32 PM Eduardo Valentin <eduval@xxxxxxxxxx> wrote:
> On Wed, Jun 05, 2019 at 11:25:39AM +0300, Andy Shevchenko wrote:
> > On Wed, Jun 5, 2019 at 6:30 AM Eduardo Valentin <eduval@xxxxxxxxxx> wrote:

> Well, yes, but the point is you would be switching from a simple AND (&) operation
> to a division...
>
> I am keeping the power of 2 dep so that we can keep this with a simple &.

Works for me.

> > > > > +           .of_match_table = of_match_ptr(i2c_slave_mqueue_of_match),
> > > >
> > > > Wouldn't compiler warn you due to unused data?
> > > > Perhaps drop of_match_ptr() for good...
> > >
> > > Not sure what you meant here. I dont see any compiler warning.
> > > Also, of_match_ptr seams to be well spread in the kernel.
> >
> > If this will be compiled with CONFIG_OF=n...
>
> I see.. I obviously did not test with that config..
>
> > Though I didn't check all dependencies to see if it even possible. In
> > any case of_match_ptr() is redundant in both cases here.
> > Either you need to protect i2c_slave_mqueue_of_match with #ifdef
> > CONFIG_OF, or drop the macro use.
>
> I will wrap it into CONFIG_OF..

Would be this expected to work in the case of CONFIG_OF=n?
If no, why to introduce ugly #ifdef:s and additional macros?
Wouldn't be better to have
  depends on OF || COMPILE_TEST
?

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux