[dpdk-dev,v5,03/20] rte_device: make driver pointer const
Checks
Commit Message
From: Stephen Hemminger <stephen@networkplumber.org>
The info in rte_device about driver is immutable and
shouldn't change.
Acked-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
lib/librte_eal/common/include/rte_dev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
2016-12-23 16:57, Jan Blunck:
> From: Stephen Hemminger <stephen@networkplumber.org>
>
> The info in rte_device about driver is immutable and
> shouldn't change.
>
> Acked-by: Jan Blunck <jblunck@infradead.org>
> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
There's no Signed-off-by
On Fri, 23 Dec 2016 16:57:54 +0100
Jan Blunck <jblunck@infradead.org> wrote:
> From: Stephen Hemminger <stephen@networkplumber.org>
>
> The info in rte_device about driver is immutable and
> shouldn't change.
>
> Acked-by: Jan Blunck <jblunck@infradead.org>
> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> ---
> lib/librte_eal/common/include/rte_dev.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
> index 1708244..b17791f 100644
> --- a/lib/librte_eal/common/include/rte_dev.h
> +++ b/lib/librte_eal/common/include/rte_dev.h
> @@ -122,7 +122,7 @@ struct rte_driver;
> */
> struct rte_device {
> TAILQ_ENTRY(rte_device) next; /**< Next device */
> - struct rte_driver *driver; /**< Associated driver */
> + const struct rte_driver *driver;/**< Associated driver */
> int numa_node; /**< NUMA node connection */
> struct rte_devargs *devargs; /**< Device user arguments */
> };
Go ahead and add missing signed-off-by. I overlooked it on the
original RFC set.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
@@ -122,7 +122,7 @@ struct rte_driver;
*/
struct rte_device {
TAILQ_ENTRY(rte_device) next; /**< Next device */
- struct rte_driver *driver; /**< Associated driver */
+ const struct rte_driver *driver;/**< Associated driver */
int numa_node; /**< NUMA node connection */
struct rte_devargs *devargs; /**< Device user arguments */
};