Commit 88570341 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by David S. Miller

net: rswitch: Use unsigned int for desc related array index

Array index should not be negative, so use unsigned int for
descriptors related array index.
Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c7e00223
This diff is collapsed.
...@@ -909,7 +909,7 @@ struct rswitch_ext_ts_desc { ...@@ -909,7 +909,7 @@ struct rswitch_ext_ts_desc {
} __packed; } __packed;
struct rswitch_etha { struct rswitch_etha {
int index; unsigned int index;
void __iomem *addr; void __iomem *addr;
void __iomem *coma_addr; void __iomem *coma_addr;
bool external_phy; bool external_phy;
...@@ -938,12 +938,12 @@ struct rswitch_gwca_queue { ...@@ -938,12 +938,12 @@ struct rswitch_gwca_queue {
/* Common */ /* Common */
dma_addr_t ring_dma; dma_addr_t ring_dma;
int ring_size; unsigned int ring_size;
int cur; unsigned int cur;
int dirty; unsigned int dirty;
/* For [rt]_ring */ /* For [rt]x_ring */
int index; unsigned int index;
bool dir_tx; bool dir_tx;
struct sk_buff **skbs; struct sk_buff **skbs;
struct net_device *ndev; /* queue to ndev for irq */ struct net_device *ndev; /* queue to ndev for irq */
...@@ -959,7 +959,7 @@ struct rswitch_gwca_ts_info { ...@@ -959,7 +959,7 @@ struct rswitch_gwca_ts_info {
#define RSWITCH_NUM_IRQ_REGS (RSWITCH_MAX_NUM_QUEUES / BITS_PER_TYPE(u32)) #define RSWITCH_NUM_IRQ_REGS (RSWITCH_MAX_NUM_QUEUES / BITS_PER_TYPE(u32))
struct rswitch_gwca { struct rswitch_gwca {
int index; unsigned int index;
struct rswitch_desc *linkfix_table; struct rswitch_desc *linkfix_table;
dma_addr_t linkfix_table_dma; dma_addr_t linkfix_table_dma;
u32 linkfix_table_size; u32 linkfix_table_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment