linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: lee@kernel.org, broonie@kernel.org, alsa-devel@alsa-project.org,
	 patches@opensource.cirrus.com, linux-kernel@vger.kernel.org,
	 linux-spi@vger.kernel.org
Subject: Re: [PATCH v2 2/6] mfd: cs42l43: Tidy up header includes
Date: Wed, 24 Jan 2024 22:57:49 +0200	[thread overview]
Message-ID: <CAHp75Vea6odZHUKQrFuOg-Nj1UXuj_+X9qKJZJ58dQa+R78OFw@mail.gmail.com> (raw)
In-Reply-To: <20240124153016.1541616-2-ckeepax@opensource.cirrus.com>

On Wed, Jan 24, 2024 at 5:30 PM Charles Keepax
<ckeepax@opensource.cirrus.com> 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

  reply	other threads:[~2024-01-24 20:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 15:30 [PATCH v2 1/6] spi: cs42l43: Tidy up header includes Charles Keepax
2024-01-24 15:30 ` [PATCH v2 2/6] mfd: " Charles Keepax
2024-01-24 20:57   ` Andy Shevchenko [this message]
2024-01-24 15:30 ` [PATCH v2 3/6] mfd: cs42l43: Use __u8 type rather than u8 for firmware interface Charles Keepax
2024-01-24 20:51   ` Andy Shevchenko
2024-01-24 15:30 ` [PATCH v2 4/6] mfd: cs42l43: Add time postfixes on defines Charles Keepax
2024-01-24 15:30 ` [PATCH v2 5/6] mfd: cs42l43: Add some missing dev_err_probes Charles Keepax
2024-01-24 20:55   ` Andy Shevchenko
2024-01-24 15:30 ` [PATCH v2 6/6] mfd: cs42l43: Handle error from devm_pm_runtime_enable Charles Keepax
2024-01-24 21:01 ` [PATCH v2 1/6] spi: cs42l43: Tidy up header includes Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHp75Vea6odZHUKQrFuOg-Nj1UXuj_+X9qKJZJ58dQa+R78OFw@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).