[dpdk-dev] [PATCH] fix static variables
Zhang, Tianfei
tianfei.zhang at intel.com
Wed Oct 10 08:23:14 CEST 2018
> diff --git a/drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c
> b/drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c
> index f0939dc32..848e5183a 100644
> --- a/drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c
> +++ b/drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c
> @@ -104,14 +104,14 @@ static struct feature_info port_features[] = {
> .resource_size = sizeof(struct feature_port_header),
> .feature_index = PORT_FEATURE_ID_HEADER,
> .revision_id = PORT_HEADER_REVISION,
> - .ops = &port_hdr_ops,
> + .ops = &ifpga_rawdev_port_hdr_ops,
> },
> {
> .name = PORT_FEATURE_ERR,
> .resource_size = sizeof(struct feature_port_error),
> .feature_index = PORT_FEATURE_ID_ERROR,
> .revision_id = PORT_ERR_REVISION,
> - .ops = &port_error_ops,
> + .ops = &ifpga_rawdev_port_error_ops,
> },
> {
> .name = PORT_FEATURE_UMSG,
> @@ -124,14 +124,14 @@ static struct feature_info port_features[] = {
> .resource_size = sizeof(struct feature_port_uint),
> .feature_index = PORT_FEATURE_ID_UINT,
> .revision_id = PORT_UINT_REVISION,
> - .ops = &port_uint_ops,
> + .ops = &ifpga_rawdev_port_uint_ops,
> },
> {
> .name = PORT_FEATURE_STP,
> .resource_size = PORT_FEATURE_STP_REGION_SIZE,
> .feature_index = PORT_FEATURE_ID_STP,
> .revision_id = PORT_STP_REVISION,
> - .ops = &port_stp_ops,
> + .ops = &ifpga_rawdev_port_stp_ops,
> },
> {
> .name = PORT_FEATURE_UAFU,
> diff --git a/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h
> b/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h
> index 7a39a580c..4391f2fdf 100644
> --- a/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h
> +++ b/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h
> @@ -156,10 +156,10 @@ struct fpga_uafu_irq_set {
>
> int port_set_irq(struct ifpga_port_hw *port, u32 feature_id, void *irq_set);
>
> -extern struct feature_ops port_hdr_ops;
> -extern struct feature_ops port_error_ops;
> -extern struct feature_ops port_stp_ops;
> -extern struct feature_ops port_uint_ops;
> +extern struct feature_ops ifpga_rawdev_port_hdr_ops;
> +extern struct feature_ops ifpga_rawdev_port_error_ops;
> +extern struct feature_ops ifpga_rawdev_port_stp_ops;
> +extern struct feature_ops ifpga_rawdev_port_uint_ops;
>
> /* help functions for feature ops */
> int fpga_msix_set_block(struct feature *feature, unsigned int start,
> diff --git a/drivers/raw/ifpga_rawdev/base/ifpga_port.c
> b/drivers/raw/ifpga_rawdev/base/ifpga_port.c
> index a962f5b45..8b5668d49 100644
> --- a/drivers/raw/ifpga_rawdev/base/ifpga_port.c
> +++ b/drivers/raw/ifpga_rawdev/base/ifpga_port.c
> @@ -326,7 +326,7 @@ static int port_hdr_set_prop(struct feature *feature,
> struct feature_prop *prop)
> return -ENOENT;
> }
>
> -struct feature_ops port_hdr_ops = {
> +struct feature_ops ifpga_rawdev_port_hdr_ops = {
> .init = port_hdr_init,
> .uinit = port_hdr_uinit,
> .get_prop = port_hdr_get_prop,
> @@ -354,7 +354,7 @@ static void port_stp_uinit(struct feature *feature)
> dev_info(NULL, "port stp uinit.\n");
> }
>
> -struct feature_ops port_stp_ops = {
> +struct feature_ops ifpga_rawdev_port_stp_ops = {
> .init = port_stp_init,
> .uinit = port_stp_uinit,
> };
> @@ -382,7 +382,7 @@ static void port_uint_uinit(struct feature *feature)
> dev_info(NULL, "PORT UINT UInit.\n");
> }
>
> -struct feature_ops port_uint_ops = {
> +struct feature_ops ifpga_rawdev_port_uint_ops = {
> .init = port_uint_init,
> .uinit = port_uint_uinit,
> };
> diff --git a/drivers/raw/ifpga_rawdev/base/ifpga_port_error.c
> b/drivers/raw/ifpga_rawdev/base/ifpga_port_error.c
> index 23db562b8..9dd1cf590 100644
> --- a/drivers/raw/ifpga_rawdev/base/ifpga_port_error.c
> +++ b/drivers/raw/ifpga_rawdev/base/ifpga_port_error.c
> @@ -136,7 +136,7 @@ static int port_error_set_prop(struct feature
> *feature,
> return -ENOENT;
> }
>
> -struct feature_ops port_error_ops = {
> +struct feature_ops ifpga_rawdev_port_error_ops = {
> .init = port_error_init,
> .uinit = port_error_uinit,
> .get_prop = port_error_get_prop,
This patch is the same as " [PATCH v2 2/4] drivers: prefix global variables with module name ",
I have acked at that patch.
More information about the dev
mailing list