mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brian Daniels <briandaniels@google.com>
To: "Bryan O'Donoghue" <bod@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Brian Daniels <briandaniels@google.com>,
	acourbot@google.com, adelva@google.com,  aesteve@redhat.com,
	changyeon@google.com, daniel.almeida@collabora.com,
	 eperezma@redhat.com, gnurou@gmail.com,
	gurchetansingh@google.com,  hverkuil@xs4all.nl,
	jasowang@redhat.com, linux-kernel@vger.kernel.org,
	 linux-media@vger.kernel.org, mst@redhat.com,
	nicolas.dufresne@collabora.com,  virtualization@lists.linux.dev,
	xuanzhuo@linux.alibaba.com
Subject: Re: [PATCH v4 2/8] media: virtio: Add virtio-media driver structs and function declarations
Date: Thu, 25 Jun 2026 16:25:46 -0400	[thread overview]
Message-ID: <20260625202549.2988460-1-briandaniels@google.com> (raw)
In-Reply-To: <ce63d29a-8c76-4a3d-ad8f-144f8b709cfa@kernel.org>

> > +extern char *virtio_media_driver_name;
> > +extern bool virtio_media_allow_userptr;
> 
> This looks a bit funny to me - why do you have externs in your header ?
> 
> ➜   grep -r virtio * | grep extern
> arch/mips/include/asm/mach-loongson64/builtin_dtbs.h:extern u32 
> __dtb_loongson64v_4core_virtio_begin[];
> Documentation/virt/kvm/api.rst:    - virtio external interrupt; external 
> interrupt
> drivers/gpu/drm/virtio/virtgpu_drv.h:extern struct drm_ioctl_desc 
> virtio_gpu_ioctls[DRM_VIRTIO_NUM_IOCTLS];
> drivers/net/wireless/virtual/mac80211_hwsim.c:extern int 
> hwsim_tx_virtio(struct mac80211_hwsim_data *data,
> include/linux/virtio_anchor.h:extern bool 
> (*virtio_check_mem_acc_cb)(struct virtio_device *dev);

You're command will only return lines that contain both `virtio` and `extern`.
If you instead wanted to find all header files that contain externs, I believe
you would want something like:

  find -type f -name '*.h' | xargs grep extern

When I run this I find many examples of `extern` in header files.

That all being said, the reason the `extern`s are in the header file is so
files that include said header file can access those variables. In this case,
these variables are used for different module parameters. We may be
removing them though, check the other discussion thread.

  reply	other threads:[~2026-06-25 20:26 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-22 20:43 [PATCH v4 0/8] media: add virtio-media driver Brian Daniels
2026-06-22 20:43 ` [PATCH v4 1/8] media: virtio: Add protocol Brian Daniels
2026-06-22 21:05   ` Michael S. Tsirkin
2026-06-25 19:50     ` Brian Daniels
2026-06-23  0:57   ` Bryan O'Donoghue
2026-06-25 20:24     ` Brian Daniels
2026-06-26  0:50       ` Bryan O'Donoghue
2026-06-26 15:50         ` Brian Daniels
2026-07-12  7:28   ` Mauro Carvalho Chehab
2026-06-22 20:43 ` [PATCH v4 2/8] media: virtio: Add virtio-media driver structs and function declarations Brian Daniels
2026-06-22 21:08   ` Michael S. Tsirkin
2026-07-17 19:46     ` Brian Daniels
2026-06-23  1:09   ` Bryan O'Donoghue
2026-06-25 20:25     ` Brian Daniels [this message]
2026-06-22 20:43 ` [PATCH v4 3/8] media: virtio: Add virtio-media session related structures Brian Daniels
2026-06-22 20:43 ` [PATCH v4 4/8] media: virtio: Add scatterlist_builder Brian Daniels
2026-06-22 20:43 ` [PATCH v4 5/8] media: virtio: Add virtio_media_ioctls Brian Daniels
2026-06-22 20:43 ` [PATCH v4 6/8] media: virtio: Add virtio_media_driver Brian Daniels
2026-06-22 21:21   ` Michael S. Tsirkin
2026-06-25 20:18     ` Brian Daniels
2026-07-12  6:57       ` Mauro Carvalho Chehab
2026-07-17 20:58       ` Brian Daniels
2026-06-26 13:33   ` Markus Elfring
2026-06-22 20:43 ` [PATCH v4 7/8] media: virtio: Add virtio-media to the build system Brian Daniels
2026-06-22 20:43 ` [PATCH v4 8/8] media: virtio: Add MAINTAINERS entry Brian Daniels
2026-06-22 21:23   ` Michael S. Tsirkin
2026-06-25 20:20     ` Brian Daniels
2026-06-22 21:09 ` [PATCH v4 0/8] media: add virtio-media driver Michael S. Tsirkin
2026-06-25 20:21   ` Brian Daniels
2026-07-10 20:44     ` Brian Daniels
2026-07-11  9:02       ` Michael S. Tsirkin
2026-07-12  7:10 ` Mauro Carvalho Chehab
2026-07-13  7:00   ` Albert Esteve

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=20260625202549.2988460-1-briandaniels@google.com \
    --to=briandaniels@google.com \
    --cc=acourbot@google.com \
    --cc=adelva@google.com \
    --cc=aesteve@redhat.com \
    --cc=bod@kernel.org \
    --cc=changyeon@google.com \
    --cc=daniel.almeida@collabora.com \
    --cc=eperezma@redhat.com \
    --cc=gnurou@gmail.com \
    --cc=gurchetansingh@google.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mst@redhat.com \
    --cc=nicolas.dufresne@collabora.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.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