Skip to content

Commit 08c53ae

Browse files
committed
Merge branch 'nfc-printk-cleanup'
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 <[email protected]>
2 parents 9eb4c32 + d1c624e commit 08c53ae

File tree

7 files changed

+13
-35
lines changed

7 files changed

+13
-35
lines changed

drivers/nfc/fdp/i2c.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ static int fdp_nci_i2c_probe(struct i2c_client *client)
335335
return r;
336336
}
337337

338-
dev_dbg(dev, "I2C driver loaded\n");
339338
return 0;
340339
}
341340

drivers/nfc/microread/mei.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ static int microread_mei_probe(struct mei_cl_device *cldev,
2626
pr_info("Probing NFC microread\n");
2727

2828
phy = nfc_mei_phy_alloc(cldev);
29-
if (!phy) {
30-
pr_err("Cannot allocate memory for microread mei phy.\n");
29+
if (!phy)
3130
return -ENOMEM;
32-
}
3331

3432
r = microread_probe(phy, &mei_phy_ops, LLC_NOP_NAME,
3533
MEI_NFC_HEADER_SIZE, 0, MEI_NFC_MAX_HCI_PAYLOAD,

drivers/nfc/nfcmrvl/fw_dnld.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ static struct sk_buff *alloc_lc_skb(struct nfcmrvl_private *priv, uint8_t plen)
7676
struct nci_data_hdr *hdr;
7777

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

8482
hdr = skb_put(skb, NCI_DATA_HDR_SIZE);
8583
hdr->conn_id = NCI_CORE_LC_CONNID_PROP_FW_DL;

drivers/nfc/pn533/i2c.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ static int pn533_i2c_read(struct pn533_i2c_phy *phy, struct sk_buff **skb)
128128
static irqreturn_t pn533_i2c_irq_thread_fn(int irq, void *data)
129129
{
130130
struct pn533_i2c_phy *phy = data;
131-
struct i2c_client *client;
132131
struct sk_buff *skb = NULL;
133132
int r;
134133

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

140-
client = phy->i2c_dev;
141-
dev_dbg(&client->dev, "IRQ\n");
142-
143139
if (phy->hard_fault != 0)
144140
return IRQ_HANDLED;
145141

drivers/nfc/pn533/pn533.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,8 +1235,6 @@ static void pn533_listen_mode_timer(struct timer_list *t)
12351235
{
12361236
struct pn533 *dev = from_timer(dev, t, listen_timer);
12371237

1238-
dev_dbg(dev->dev, "Listen mode timeout\n");
1239-
12401238
dev->cancel_listen = 1;
12411239

12421240
pn533_poll_next_mod(dev);
@@ -2173,7 +2171,7 @@ void pn533_recv_frame(struct pn533 *dev, struct sk_buff *skb, int status)
21732171
}
21742172

21752173
if (skb == NULL) {
2176-
pr_err("NULL Frame -> link is dead\n");
2174+
dev_err(dev->dev, "NULL Frame -> link is dead\n");
21772175
goto sched_wq;
21782176
}
21792177

drivers/nfc/pn544/mei.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,9 @@ static int pn544_mei_probe(struct mei_cl_device *cldev,
2222
struct nfc_mei_phy *phy;
2323
int r;
2424

25-
pr_info("Probing NFC pn544\n");
26-
2725
phy = nfc_mei_phy_alloc(cldev);
28-
if (!phy) {
29-
pr_err("Cannot allocate memory for pn544 mei phy.\n");
26+
if (!phy)
3027
return -ENOMEM;
31-
}
3228

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

49-
pr_info("Removing pn544\n");
50-
5145
pn544_hci_remove(phy->hdev);
5246

5347
nfc_mei_phy_free(phy);

net/nfc/hci/llc_shdlc.c

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,7 @@ static void llc_shdlc_reset_t2(struct llc_shdlc *shdlc, int y_nr)
201201
del_timer_sync(&shdlc->t2_timer);
202202
shdlc->t2_active = false;
203203

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

214-
pr_debug
215-
("Start T2(retransmit) for remaining unacked sent frames\n");
213+
pr_debug("Start T2(retransmit) for remaining unacked sent frames\n");
216214
}
217215
}
218216

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

524522
if (shdlc->send_q.qlen)
525-
pr_debug
526-
("sendQlen=%d ns=%d dnr=%d rnr=%s w_room=%d unackQlen=%d\n",
527-
shdlc->send_q.qlen, shdlc->ns, shdlc->dnr,
528-
shdlc->rnr == false ? "false" : "true",
529-
shdlc->w - llc_shdlc_w_used(shdlc->ns, shdlc->dnr),
530-
shdlc->ack_pending_q.qlen);
523+
pr_debug("sendQlen=%d ns=%d dnr=%d rnr=%s w_room=%d unackQlen=%d\n",
524+
shdlc->send_q.qlen, shdlc->ns, shdlc->dnr,
525+
shdlc->rnr == false ? "false" : "true",
526+
shdlc->w - llc_shdlc_w_used(shdlc->ns, shdlc->dnr),
527+
shdlc->ack_pending_q.qlen);
531528

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

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

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

662658
if (shdlc->t2_active && timer_pending(&shdlc->t2_timer) == 0) {
663-
pr_debug
664-
("Handle T2(retransmit) elapsed (T2 inactive)\n");
659+
pr_debug("Handle T2(retransmit) elapsed (T2 inactive)\n");
665660

666661
shdlc->t2_active = false;
667662

0 commit comments

Comments
 (0)