Re: [PATCH v2 2/6] mfd: cs42l43: Tidy up header includes

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

 



On Wed, Jan 24, 2024 at 5:30 PM Charles Keepax
<ckeepax@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Use more forward declarations, move header guards to cover other
> includes, and rely less on including headers through other headers.

Thanks for doing this!
My comments below.

...

> +++ b/drivers/mfd/cs42l43.h

> -#include <linux/pm.h>
> -#include <linux/regmap.h>

> +struct dev_pm_ops;
> +struct reg_default;
> +
>  extern const struct dev_pm_ops cs42l43_pm_ops;
>  extern const struct reg_default cs42l43_reg_default[CS42L43_N_DEFAULTS];

As far as I understand C, these two changes are incorrect as the
header _is_ the user of them, i.e. it needs to know the definitions of
the used data types because they are not POD (plain old data) types.
But I will learn something new if I'm mistaken.

--
With Best Regards,
Andy Shevchenko




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux