lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 29 Mar 2023 21:18:26 -0700 From: Jakub Kicinski <kuba@...nel.org> To: Xuan Zhuo <xuanzhuo@...ux.alibaba.com> Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, "Michael S. Tsirkin" <mst@...hat.com>, Jason Wang <jasowang@...hat.com>, Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, Jesper Dangaard Brouer <hawk@...nel.org>, John Fastabend <john.fastabend@...il.com>, virtualization@...ts.linux-foundation.org, bpf@...r.kernel.org Subject: Re: [PATCH 02/16] virtio_net: move struct to header file On Tue, 28 Mar 2023 17:28:33 +0800 Xuan Zhuo wrote: > diff --git a/drivers/net/virtio/virtnet.h b/drivers/net/virtio/virtnet.h > new file mode 100644 > index 000000000000..778a0e6af869 > --- /dev/null > +++ b/drivers/net/virtio/virtnet.h > @@ -0,0 +1,184 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > + > +#ifndef __VIRTNET_H__ > +#define __VIRTNET_H__ > + > +#include <linux/ethtool.h> > +#include <linux/average.h> I don't want to nit pick too much but this header is missing a lot of includes / forward declarations. At the same time on a quick look I didn't spot anything that'd require linux/ethtool.h > diff --git a/drivers/net/virtio/virtnet.c b/drivers/net/virtio/virtnet.c > index e2560b6f7980..5ca354e29483 100644 > --- a/drivers/net/virtio/virtnet.c > +++ b/drivers/net/virtio/virtnet.c > @@ -6,7 +6,6 @@ > //#define DEBUG > #include <linux/netdevice.h> > #include <linux/etherdevice.h> > -#include <linux/ethtool.h> > #include <linux/module.h> > #include <linux/virtio.h> > #include <linux/virtio_net.h> > @@ -16,13 +15,14 @@ > #include <linux/if_vlan.h> > #include <linux/slab.h> > #include <linux/cpu.h> > -#include <linux/average.h> > #include <linux/filter.h> > #include <linux/kernel.h> > #include <net/route.h> > #include <net/xdp.h> > #include <net/net_failover.h> And you shouldn't remove includes if the code needs them just because they get pulled in indirectly.
Powered by blists - more mailing lists