From: Harald Mommer <harald.mommer@oss.qualcomm.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>,
Haixu Cui <quic_haixcui@quicinc.com>
Cc: quic_msavaliy@quicinc.com, broonie@kernel.org,
virtio-dev@lists.linux.dev, viresh.kumar@linaro.org,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
hdanton@sina.com, qiang4.zhang@linux.intel.com,
alex.bennee@linaro.org, quic_ztu@quicinc.com,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH v9 3/3] SPI: Add virtio SPI driver
Date: Tue, 2 Sep 2025 17:54:39 +0200 [thread overview]
Message-ID: <be8961be-2964-4571-9818-b5a23867b27e@oss.qualcomm.com> (raw)
In-Reply-To: <aLWMZH3NTfM8qOUy@smile.fi.intel.com>
Hello,
On 9/1/25 14:07, Andy Shevchenko wrote:
> On Thu, Aug 28, 2025 at 05:34:51PM +0800, Haixu Cui wrote:
>> This is the virtio SPI Linux kernel driver.
>
> ...
>
>> +#include <linux/completion.h>
>> +#include <linux/interrupt.h>
>> +#include <linux/io.h>
>> +#include <linux/module.h>
>> +#include <linux/spi/spi.h>
>> +#include <linux/stddef.h>
>
> A lot of headers are still missing. See below.
The driver should compile with the set of included headers.
>
> ...
>
>
>> +struct virtio_spi_priv {
>> + /* The virtio device we're associated with */
>> + struct virtio_device *vdev;
>> + /* Pointer to the virtqueue */
>> + struct virtqueue *vq;
>> + /* Copy of config space mode_func_supported */
>> + u32 mode_func_supported;
>
> uXX (in particular u32) is defined in types.h.
>
>> + /* Copy of config space max_freq_hz */
>> + u32 max_freq_hz;
>> +};
u32 is for sure defined in types.h. But looking into another device (gpio-virtio.c) I see that there is also u8 and u32 used and I don't see that there types.h is included directly in the C file. It must be included indirectly as the driver compiles. Same happens here.
I'm not aware of a requirement in the style guide for the Linux kernel that all used headers have to be included directly in the C file but this does not mean that such a requirement does not exist. Can anyone point my nose on it?
Regards
Harald Mommer
next prev parent reply other threads:[~2025-09-02 15:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-28 9:34 [PATCH v9 0/3] Virtio SPI Linux driver Haixu Cui
2025-08-28 9:34 ` [PATCH v9 1/3] virtio: Add ID for virtio SPI Haixu Cui
2025-09-10 9:39 ` Alex Bennée
2025-08-28 9:34 ` [PATCH v9 2/3] virtio-spi: Add virtio-spi.h Haixu Cui
2025-09-10 9:43 ` Alex Bennée
2025-08-28 9:34 ` [PATCH v9 3/3] SPI: Add virtio SPI driver Haixu Cui
2025-09-01 12:07 ` Andy Shevchenko
2025-09-02 15:54 ` Harald Mommer [this message]
2025-09-02 16:28 ` Mark Brown
2025-09-03 9:04 ` Haixu Cui
2025-09-03 10:27 ` Andy Shevchenko
2025-09-10 3:51 ` Haixu Cui
2025-09-11 7:48 ` 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=be8961be-2964-4571-9818-b5a23867b27e@oss.qualcomm.com \
--to=harald.mommer@oss.qualcomm.com \
--cc=alex.bennee@linaro.org \
--cc=andriy.shevchenko@intel.com \
--cc=broonie@kernel.org \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=qiang4.zhang@linux.intel.com \
--cc=quic_haixcui@quicinc.com \
--cc=quic_msavaliy@quicinc.com \
--cc=quic_ztu@quicinc.com \
--cc=viresh.kumar@linaro.org \
--cc=virtio-dev@lists.linux.dev \
--cc=virtualization@lists.linux-foundation.org \
/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
all inboxes | Powered by JetHome®