Skip to content

Commit

Permalink
nfp: use unsigned int for vector/ring counts
Browse files Browse the repository at this point in the history
Use unsigned int consistently for vector/ring counts.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed Nov 1, 2016
1 parent 23a4e38 commit a4b562b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
17 changes: 9 additions & 8 deletions drivers/net/ethernet/netronome/nfp/nfp_net.h
Original file line number Diff line number Diff line change
Expand Up @@ -528,20 +528,20 @@ struct nfp_net {
struct timer_list rx_filter_stats_timer;
spinlock_t rx_filter_lock;

int max_tx_rings;
int max_rx_rings;
unsigned int max_tx_rings;
unsigned int max_rx_rings;

int num_tx_rings;
int num_rx_rings;
unsigned int num_tx_rings;
unsigned int num_rx_rings;

int stride_tx;
int stride_rx;

int txd_cnt;
int rxd_cnt;

u8 num_irqs;
u8 num_r_vecs;
unsigned int num_irqs;
unsigned int num_r_vecs;
struct nfp_net_r_vector r_vecs[NFP_NET_MAX_R_VECS];
struct msix_entry irq_entries[NFP_NET_MAX_IRQS];

Expand Down Expand Up @@ -757,8 +757,9 @@ extern const char nfp_net_driver_version[];
void nfp_net_get_fw_version(struct nfp_net_fw_version *fw_ver,
void __iomem *ctrl_bar);

struct nfp_net *nfp_net_netdev_alloc(struct pci_dev *pdev,
int max_tx_rings, int max_rx_rings);
struct nfp_net *
nfp_net_netdev_alloc(struct pci_dev *pdev,
unsigned int max_tx_rings, unsigned int max_rx_rings);
void nfp_net_netdev_free(struct nfp_net *nn);
int nfp_net_netdev_init(struct net_device *netdev);
void nfp_net_netdev_clean(struct net_device *netdev);
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/ethernet/netronome/nfp/nfp_net_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ static int nfp_net_msix_alloc(struct nfp_net *nn, int nr_vecs)
*/
static int nfp_net_irqs_wanted(struct nfp_net *nn)
{
unsigned int vecs;
int ncpus;
int vecs;

ncpus = num_online_cpus();

Expand Down Expand Up @@ -2701,7 +2701,8 @@ void nfp_net_info(struct nfp_net *nn)
* Return: NFP Net device structure, or ERR_PTR on error.
*/
struct nfp_net *nfp_net_netdev_alloc(struct pci_dev *pdev,
int max_tx_rings, int max_rx_rings)
unsigned int max_tx_rings,
unsigned int max_rx_rings)
{
struct net_device *netdev;
struct nfp_net *nn;
Expand Down

0 comments on commit a4b562b

Please sign in to comment.