Re: [PATCH v4 1/3] mfd: tps6586x: add version detection

From: Lee Jones
Date: Wed Dec 04 2013 - 06:58:13 EST


> > > As I pointed out in the comment above, the struct tps6586x is in the C
> > > file, so I would need to move that too. That's why I did not made that
> > > change in the end. What do you think, should I still move (and move the
> > > struct too?)
>
> > Why would the struct have to be moved if the function is inline?
>
> If the function is in the header and trying to use a struct that's only
> defined in the C file then it's not going to build - keeping the struct
> in the C file only does seem like a worthwhile thing for encapsulation.

Yes, I just carried out my own testing and found that out. Prior to
this I was under the impression that inline functions were directly
transposed into the location of the call, were perhaps it could make
use of any resources declared within that context. It appears that
impression was not correct.

Every day continues to be a school day. :)

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org â Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/