* [PATCH net-next] rocker: Drop pointless static qualifier
@ 2018-10-19 12:02 YueHaibing
2018-10-19 12:12 ` Jiri Pirko
2018-10-19 17:42 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2018-10-19 12:02 UTC (permalink / raw)
To: Jiri Pirko, davem; +Cc: YueHaibing, netdev, kernel-janitors
There is no need to have the 'struct rocker_desc_info *desc_info'
variable static since new value always be assigned before use it.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/net/ethernet/rocker/rocker_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c
index 8721c05..beb0662 100644
--- a/drivers/net/ethernet/rocker/rocker_main.c
+++ b/drivers/net/ethernet/rocker/rocker_main.c
@@ -371,7 +371,7 @@ static void rocker_desc_cookie_ptr_set(const struct rocker_desc_info *desc_info,
static struct rocker_desc_info *
rocker_desc_head_get(const struct rocker_dma_ring_info *info)
{
- static struct rocker_desc_info *desc_info;
+ struct rocker_desc_info *desc_info;
u32 head = __pos_inc(info->head, info->size);
desc_info = &info->desc_info[info->head];
@@ -402,7 +402,7 @@ static void rocker_desc_head_set(const struct rocker *rocker,
static struct rocker_desc_info *
rocker_desc_tail_get(struct rocker_dma_ring_info *info)
{
- static struct rocker_desc_info *desc_info;
+ struct rocker_desc_info *desc_info;
if (info->tail == info->head)
return NULL; /* nothing to be done between head and tail */
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next] rocker: Drop pointless static qualifier
2018-10-19 12:02 [PATCH net-next] rocker: Drop pointless static qualifier YueHaibing
@ 2018-10-19 12:12 ` Jiri Pirko
2018-10-19 17:42 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2018-10-19 12:12 UTC (permalink / raw)
To: YueHaibing; +Cc: davem, netdev, kernel-janitors
Fri, Oct 19, 2018 at 02:02:59PM CEST, yuehaibing@huawei.com wrote:
>There is no need to have the 'struct rocker_desc_info *desc_info'
>variable static since new value always be assigned before use it.
>
>Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] rocker: Drop pointless static qualifier
2018-10-19 12:02 [PATCH net-next] rocker: Drop pointless static qualifier YueHaibing
2018-10-19 12:12 ` Jiri Pirko
@ 2018-10-19 17:42 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-10-19 17:42 UTC (permalink / raw)
To: yuehaibing; +Cc: jiri, netdev, kernel-janitors
From: YueHaibing <yuehaibing@huawei.com>
Date: Fri, 19 Oct 2018 12:02:59 +0000
> There is no need to have the 'struct rocker_desc_info *desc_info'
> variable static since new value always be assigned before use it.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-20 1:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-19 12:02 [PATCH net-next] rocker: Drop pointless static qualifier YueHaibing
2018-10-19 12:12 ` Jiri Pirko
2018-10-19 17:42 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox