Skip to content

Commit

Permalink
Merge branch 'nfc-printk-cleanup'
Browse files Browse the repository at this point in the history
Krzysztof Kozlowski says:

====================
nfc: minor printk cleanup

Changes since v1:
1. Remove unused variable in pn533 (reported by kbuild).
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Sep 13, 2021
2 parents 9eb4c32 + d1c624e commit 08c53ae
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 35 deletions.
1 change: 0 additions & 1 deletion drivers/nfc/fdp/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ static int fdp_nci_i2c_probe(struct i2c_client *client)
return r;
}

dev_dbg(dev, "I2C driver loaded\n");
return 0;
}

Expand Down
4 changes: 1 addition & 3 deletions drivers/nfc/microread/mei.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ static int microread_mei_probe(struct mei_cl_device *cldev,
pr_info("Probing NFC microread\n");

phy = nfc_mei_phy_alloc(cldev);
if (!phy) {
pr_err("Cannot allocate memory for microread mei phy.\n");
if (!phy)
return -ENOMEM;
}

r = microread_probe(phy, &mei_phy_ops, LLC_NOP_NAME,
MEI_NFC_HEADER_SIZE, 0, MEI_NFC_MAX_HCI_PAYLOAD,
Expand Down
4 changes: 1 addition & 3 deletions drivers/nfc/nfcmrvl/fw_dnld.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,8 @@ static struct sk_buff *alloc_lc_skb(struct nfcmrvl_private *priv, uint8_t plen)
struct nci_data_hdr *hdr;

skb = nci_skb_alloc(priv->ndev, (NCI_DATA_HDR_SIZE + plen), GFP_KERNEL);
if (!skb) {
pr_err("no memory for data\n");
if (!skb)
return NULL;
}

hdr = skb_put(skb, NCI_DATA_HDR_SIZE);
hdr->conn_id = NCI_CORE_LC_CONNID_PROP_FW_DL;
Expand Down
4 changes: 0 additions & 4 deletions drivers/nfc/pn533/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ static int pn533_i2c_read(struct pn533_i2c_phy *phy, struct sk_buff **skb)
static irqreturn_t pn533_i2c_irq_thread_fn(int irq, void *data)
{
struct pn533_i2c_phy *phy = data;
struct i2c_client *client;
struct sk_buff *skb = NULL;
int r;

Expand All @@ -137,9 +136,6 @@ static irqreturn_t pn533_i2c_irq_thread_fn(int irq, void *data)
return IRQ_NONE;
}

client = phy->i2c_dev;
dev_dbg(&client->dev, "IRQ\n");

if (phy->hard_fault != 0)
return IRQ_HANDLED;

Expand Down
4 changes: 1 addition & 3 deletions drivers/nfc/pn533/pn533.c
Original file line number Diff line number Diff line change
Expand Up @@ -1235,8 +1235,6 @@ static void pn533_listen_mode_timer(struct timer_list *t)
{
struct pn533 *dev = from_timer(dev, t, listen_timer);

dev_dbg(dev->dev, "Listen mode timeout\n");

dev->cancel_listen = 1;

pn533_poll_next_mod(dev);
Expand Down Expand Up @@ -2173,7 +2171,7 @@ void pn533_recv_frame(struct pn533 *dev, struct sk_buff *skb, int status)
}

if (skb == NULL) {
pr_err("NULL Frame -> link is dead\n");
dev_err(dev->dev, "NULL Frame -> link is dead\n");
goto sched_wq;
}

Expand Down
8 changes: 1 addition & 7 deletions drivers/nfc/pn544/mei.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@ static int pn544_mei_probe(struct mei_cl_device *cldev,
struct nfc_mei_phy *phy;
int r;

pr_info("Probing NFC pn544\n");

phy = nfc_mei_phy_alloc(cldev);
if (!phy) {
pr_err("Cannot allocate memory for pn544 mei phy.\n");
if (!phy)
return -ENOMEM;
}

r = pn544_hci_probe(phy, &mei_phy_ops, LLC_NOP_NAME,
MEI_NFC_HEADER_SIZE, 0, MEI_NFC_MAX_HCI_PAYLOAD,
Expand All @@ -46,8 +42,6 @@ static void pn544_mei_remove(struct mei_cl_device *cldev)
{
struct nfc_mei_phy *phy = mei_cldev_get_drvdata(cldev);

pr_info("Removing pn544\n");

pn544_hci_remove(phy->hdev);

nfc_mei_phy_free(phy);
Expand Down
23 changes: 9 additions & 14 deletions net/nfc/hci/llc_shdlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ static void llc_shdlc_reset_t2(struct llc_shdlc *shdlc, int y_nr)
del_timer_sync(&shdlc->t2_timer);
shdlc->t2_active = false;

pr_debug
("All sent frames acked. Stopped T2(retransmit)\n");
pr_debug("All sent frames acked. Stopped T2(retransmit)\n");
}
} else {
skb = skb_peek(&shdlc->ack_pending_q);
Expand All @@ -211,8 +210,7 @@ static void llc_shdlc_reset_t2(struct llc_shdlc *shdlc, int y_nr)
msecs_to_jiffies(SHDLC_T2_VALUE_MS));
shdlc->t2_active = true;

pr_debug
("Start T2(retransmit) for remaining unacked sent frames\n");
pr_debug("Start T2(retransmit) for remaining unacked sent frames\n");
}
}

Expand Down Expand Up @@ -522,12 +520,11 @@ static void llc_shdlc_handle_send_queue(struct llc_shdlc *shdlc)
unsigned long time_sent;

if (shdlc->send_q.qlen)
pr_debug
("sendQlen=%d ns=%d dnr=%d rnr=%s w_room=%d unackQlen=%d\n",
shdlc->send_q.qlen, shdlc->ns, shdlc->dnr,
shdlc->rnr == false ? "false" : "true",
shdlc->w - llc_shdlc_w_used(shdlc->ns, shdlc->dnr),
shdlc->ack_pending_q.qlen);
pr_debug("sendQlen=%d ns=%d dnr=%d rnr=%s w_room=%d unackQlen=%d\n",
shdlc->send_q.qlen, shdlc->ns, shdlc->dnr,
shdlc->rnr == false ? "false" : "true",
shdlc->w - llc_shdlc_w_used(shdlc->ns, shdlc->dnr),
shdlc->ack_pending_q.qlen);

while (shdlc->send_q.qlen && shdlc->ack_pending_q.qlen < shdlc->w &&
(shdlc->rnr == false)) {
Expand Down Expand Up @@ -649,8 +646,7 @@ static void llc_shdlc_sm_work(struct work_struct *work)
llc_shdlc_handle_send_queue(shdlc);

if (shdlc->t1_active && timer_pending(&shdlc->t1_timer) == 0) {
pr_debug
("Handle T1(send ack) elapsed (T1 now inactive)\n");
pr_debug("Handle T1(send ack) elapsed (T1 now inactive)\n");

shdlc->t1_active = false;
r = llc_shdlc_send_s_frame(shdlc, S_FRAME_RR,
Expand All @@ -660,8 +656,7 @@ static void llc_shdlc_sm_work(struct work_struct *work)
}

if (shdlc->t2_active && timer_pending(&shdlc->t2_timer) == 0) {
pr_debug
("Handle T2(retransmit) elapsed (T2 inactive)\n");
pr_debug("Handle T2(retransmit) elapsed (T2 inactive)\n");

shdlc->t2_active = false;

Expand Down

0 comments on commit 08c53ae

Please sign in to comment.