Skip to content

Commit a4b562b

Browse files
Jakub Kicinskidavem330
authored andcommitted
nfp: use unsigned int for vector/ring counts
Use unsigned int consistently for vector/ring counts. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 23a4e38 commit a4b562b

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

drivers/net/ethernet/netronome/nfp/nfp_net.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -528,20 +528,20 @@ struct nfp_net {
528528
struct timer_list rx_filter_stats_timer;
529529
spinlock_t rx_filter_lock;
530530

531-
int max_tx_rings;
532-
int max_rx_rings;
531+
unsigned int max_tx_rings;
532+
unsigned int max_rx_rings;
533533

534-
int num_tx_rings;
535-
int num_rx_rings;
534+
unsigned int num_tx_rings;
535+
unsigned int num_rx_rings;
536536

537537
int stride_tx;
538538
int stride_rx;
539539

540540
int txd_cnt;
541541
int rxd_cnt;
542542

543-
u8 num_irqs;
544-
u8 num_r_vecs;
543+
unsigned int num_irqs;
544+
unsigned int num_r_vecs;
545545
struct nfp_net_r_vector r_vecs[NFP_NET_MAX_R_VECS];
546546
struct msix_entry irq_entries[NFP_NET_MAX_IRQS];
547547

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

760-
struct nfp_net *nfp_net_netdev_alloc(struct pci_dev *pdev,
761-
int max_tx_rings, int max_rx_rings);
760+
struct nfp_net *
761+
nfp_net_netdev_alloc(struct pci_dev *pdev,
762+
unsigned int max_tx_rings, unsigned int max_rx_rings);
762763
void nfp_net_netdev_free(struct nfp_net *nn);
763764
int nfp_net_netdev_init(struct net_device *netdev);
764765
void nfp_net_netdev_clean(struct net_device *netdev);

drivers/net/ethernet/netronome/nfp/nfp_net_common.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ static int nfp_net_msix_alloc(struct nfp_net *nn, int nr_vecs)
318318
*/
319319
static int nfp_net_irqs_wanted(struct nfp_net *nn)
320320
{
321+
unsigned int vecs;
321322
int ncpus;
322-
int vecs;
323323

324324
ncpus = num_online_cpus();
325325

@@ -2701,7 +2701,8 @@ void nfp_net_info(struct nfp_net *nn)
27012701
* Return: NFP Net device structure, or ERR_PTR on error.
27022702
*/
27032703
struct nfp_net *nfp_net_netdev_alloc(struct pci_dev *pdev,
2704-
int max_tx_rings, int max_rx_rings)
2704+
unsigned int max_tx_rings,
2705+
unsigned int max_rx_rings)
27052706
{
27062707
struct net_device *netdev;
27072708
struct nfp_net *nn;

0 commit comments

Comments
 (0)