Skip to content

Commit

Permalink
jme: remove an unnecessary indirection
Browse files Browse the repository at this point in the history
Remove a define which looks like a OS abstraction layer
and makes spatch conversions on this driver problematic.

Link: https://lore.kernel.org/r/20220504163939.551231-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jakub Kicinski committed May 5, 2022
1 parent 6bff3ff commit fd49f8e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/jme.c
Original file line number Diff line number Diff line change
Expand Up @@ -3009,7 +3009,7 @@ jme_init_one(struct pci_dev *pdev,
jwrite32(jme, JME_APMC, apmc);
}

NETIF_NAPI_SET(netdev, &jme->napi, jme_poll, NAPI_POLL_WEIGHT)
netif_napi_add(netdev, &jme->napi, jme_poll, NAPI_POLL_WEIGHT);

spin_lock_init(&jme->phy_lock);
spin_lock_init(&jme->macaddr_lock);
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/ethernet/jme.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,6 @@ struct jme_ring {
#define DECLARE_NET_DEVICE_STATS

#define DECLARE_NAPI_STRUCT struct napi_struct napi;
#define NETIF_NAPI_SET(dev, napis, pollfn, q) \
netif_napi_add(dev, napis, pollfn, q);
#define JME_NAPI_HOLDER(holder) struct napi_struct *holder
#define JME_NAPI_WEIGHT(w) int w
#define JME_NAPI_WEIGHT_VAL(w) w
Expand Down

0 comments on commit fd49f8e

Please sign in to comment.