* [dpdk-dev] [PATCH 0/2] virtio: cleanup virtio code
@ 2017-08-03 1:21 Zhiyong Yang
2017-08-03 1:21 ` [dpdk-dev] [PATCH 1/2] virtio: fix the wrong indent Zhiyong Yang
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Zhiyong Yang @ 2017-08-03 1:21 UTC (permalink / raw)
To: dev; +Cc: maxime.coquelin, yliu
This patchset has some trivial changes and make it easier
to read code.
Zhiyong Yang (2):
virtio: fix the wrong indent
virtio: use macro to replace magic number
drivers/net/virtio/virtio_pci.c | 2 +-
drivers/net/virtio/virtqueue.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--
2.13.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 1/2] virtio: fix the wrong indent
2017-08-03 1:21 [dpdk-dev] [PATCH 0/2] virtio: cleanup virtio code Zhiyong Yang
@ 2017-08-03 1:21 ` Zhiyong Yang
2017-08-03 1:21 ` [dpdk-dev] [PATCH 2/2] virtio: use macro to replace magic number Zhiyong Yang
2017-08-30 12:03 ` [dpdk-dev] [PATCH 0/2] virtio: cleanup virtio code Maxime Coquelin
2 siblings, 0 replies; 5+ messages in thread
From: Zhiyong Yang @ 2017-08-03 1:21 UTC (permalink / raw)
To: dev; +Cc: maxime.coquelin, yliu, Zhiyong Yang
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
drivers/net/virtio/virtqueue.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
index 2e1208615..9c4f96d2b 100644
--- a/drivers/net/virtio/virtqueue.h
+++ b/drivers/net/virtio/virtqueue.h
@@ -143,8 +143,8 @@ struct virtio_net_ctrl_mac {
} __attribute__((__packed__));
#define VIRTIO_NET_CTRL_MAC 1
- #define VIRTIO_NET_CTRL_MAC_TABLE_SET 0
- #define VIRTIO_NET_CTRL_MAC_ADDR_SET 1
+#define VIRTIO_NET_CTRL_MAC_TABLE_SET 0
+#define VIRTIO_NET_CTRL_MAC_ADDR_SET 1
/**
* Control VLAN filtering
--
2.13.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 2/2] virtio: use macro to replace magic number
2017-08-03 1:21 [dpdk-dev] [PATCH 0/2] virtio: cleanup virtio code Zhiyong Yang
2017-08-03 1:21 ` [dpdk-dev] [PATCH 1/2] virtio: fix the wrong indent Zhiyong Yang
@ 2017-08-03 1:21 ` Zhiyong Yang
2017-08-30 12:03 ` [dpdk-dev] [PATCH 0/2] virtio: cleanup virtio code Maxime Coquelin
2 siblings, 0 replies; 5+ messages in thread
From: Zhiyong Yang @ 2017-08-03 1:21 UTC (permalink / raw)
To: dev; +Cc: maxime.coquelin, yliu, Zhiyong Yang
To use macro instead of magic number in order to enhance code
readability.
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
drivers/net/virtio/virtio_pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index e6da6802b..55b717c03 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -553,7 +553,7 @@ get_cfg_addr(struct rte_pci_device *dev, struct virtio_pci_cap *cap)
uint32_t offset = cap->offset;
uint8_t *base;
- if (bar > 5) {
+ if (bar >= PCI_MAX_RESOURCE) {
PMD_INIT_LOG(ERR, "invalid bar: %u", bar);
return NULL;
}
--
2.13.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 0/2] virtio: cleanup virtio code
2017-08-03 1:21 [dpdk-dev] [PATCH 0/2] virtio: cleanup virtio code Zhiyong Yang
2017-08-03 1:21 ` [dpdk-dev] [PATCH 1/2] virtio: fix the wrong indent Zhiyong Yang
2017-08-03 1:21 ` [dpdk-dev] [PATCH 2/2] virtio: use macro to replace magic number Zhiyong Yang
@ 2017-08-30 12:03 ` Maxime Coquelin
2017-09-01 3:05 ` Yuanhan Liu
2 siblings, 1 reply; 5+ messages in thread
From: Maxime Coquelin @ 2017-08-30 12:03 UTC (permalink / raw)
To: Zhiyong Yang, dev; +Cc: yliu
Hi Zhiyong,
On 08/03/2017 03:21 AM, Zhiyong Yang wrote:
> This patchset has some trivial changes and make it easier
> to read code.
>
> Zhiyong Yang (2):
> virtio: fix the wrong indent
> virtio: use macro to replace magic number
>
> drivers/net/virtio/virtio_pci.c | 2 +-
> drivers/net/virtio/virtqueue.h | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
For the series:
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 0/2] virtio: cleanup virtio code
2017-08-30 12:03 ` [dpdk-dev] [PATCH 0/2] virtio: cleanup virtio code Maxime Coquelin
@ 2017-09-01 3:05 ` Yuanhan Liu
0 siblings, 0 replies; 5+ messages in thread
From: Yuanhan Liu @ 2017-09-01 3:05 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: Zhiyong Yang, dev
On Wed, Aug 30, 2017 at 02:03:52PM +0200, Maxime Coquelin wrote:
> Hi Zhiyong,
>
> On 08/03/2017 03:21 AM, Zhiyong Yang wrote:
> >This patchset has some trivial changes and make it easier
> >to read code.
> >
> >Zhiyong Yang (2):
> > virtio: fix the wrong indent
> > virtio: use macro to replace magic number
> >
> > drivers/net/virtio/virtio_pci.c | 2 +-
> > drivers/net/virtio/virtqueue.h | 4 ++--
> > 2 files changed, 3 insertions(+), 3 deletions(-)
> >
>
> For the series:
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Applied to dpdk-next-virtio.
Thanks!
--yliu
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-09-01 3:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-03 1:21 [dpdk-dev] [PATCH 0/2] virtio: cleanup virtio code Zhiyong Yang
2017-08-03 1:21 ` [dpdk-dev] [PATCH 1/2] virtio: fix the wrong indent Zhiyong Yang
2017-08-03 1:21 ` [dpdk-dev] [PATCH 2/2] virtio: use macro to replace magic number Zhiyong Yang
2017-08-30 12:03 ` [dpdk-dev] [PATCH 0/2] virtio: cleanup virtio code Maxime Coquelin
2017-09-01 3:05 ` Yuanhan Liu
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).