Skip to content

Commit

Permalink
nfc: pn533: drop ftrace-like debugging messages
Browse files Browse the repository at this point in the history
Now that the kernel has ftrace, any debugging calls that just do "made
it to this function!" and "leaving this function!" can be removed.
Better to use standard debugging tools.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210531073902.7111-2-krzysztof.kozlowski@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Krzysztof Kozlowski authored and Jakub Kicinski committed Jun 1, 2021
1 parent e3bf553 commit 62f6441
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 55 deletions.
5 changes: 0 additions & 5 deletions drivers/nfc/pn533/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,6 @@ static int pn533_i2c_probe(struct i2c_client *client,
struct pn533 *priv;
int r = 0;

dev_dbg(&client->dev, "%s\n", __func__);
dev_dbg(&client->dev, "IRQ: %d\n", client->irq);

if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
nfc_err(&client->dev, "Need I2C_FUNC_I2C\n");
return -ENODEV;
Expand Down Expand Up @@ -239,8 +236,6 @@ static int pn533_i2c_remove(struct i2c_client *client)
{
struct pn533_i2c_phy *phy = i2c_get_clientdata(client);

dev_dbg(&client->dev, "%s\n", __func__);

free_irq(client->irq, phy);

pn53x_unregister_nfc(phy->priv);
Expand Down
46 changes: 0 additions & 46 deletions drivers/nfc/pn533/pn533.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,8 +1075,6 @@ static int pn533_tm_get_data_complete(struct pn533 *dev, void *arg,
u8 status, ret, mi;
int rc;

dev_dbg(dev->dev, "%s\n", __func__);

if (IS_ERR(resp)) {
skb_queue_purge(&dev->resp_q);
return PTR_ERR(resp);
Expand Down Expand Up @@ -1124,8 +1122,6 @@ static void pn533_wq_tm_mi_recv(struct work_struct *work)
struct sk_buff *skb;
int rc;

dev_dbg(dev->dev, "%s\n", __func__);

skb = pn533_alloc_skb(dev, 0);
if (!skb)
return;
Expand All @@ -1148,8 +1144,6 @@ static void pn533_wq_tm_mi_send(struct work_struct *work)
struct sk_buff *skb;
int rc;

dev_dbg(dev->dev, "%s\n", __func__);

/* Grab the first skb in the queue */
skb = skb_dequeue(&dev->fragment_skb);
if (skb == NULL) { /* No more data */
Expand Down Expand Up @@ -1186,8 +1180,6 @@ static void pn533_wq_tg_get_data(struct work_struct *work)
struct sk_buff *skb;
int rc;

dev_dbg(dev->dev, "%s\n", __func__);

skb = pn533_alloc_skb(dev, 0);
if (!skb)
return;
Expand All @@ -1206,8 +1198,6 @@ static int pn533_init_target_complete(struct pn533 *dev, struct sk_buff *resp)
size_t gb_len;
int rc;

dev_dbg(dev->dev, "%s\n", __func__);

if (resp->len < ATR_REQ_GB_OFFSET + 1)
return -EINVAL;

Expand Down Expand Up @@ -1260,8 +1250,6 @@ static int pn533_rf_complete(struct pn533 *dev, void *arg,
{
int rc = 0;

dev_dbg(dev->dev, "%s\n", __func__);

if (IS_ERR(resp)) {
rc = PTR_ERR(resp);

Expand All @@ -1283,8 +1271,6 @@ static void pn533_wq_rf(struct work_struct *work)
struct sk_buff *skb;
int rc;

dev_dbg(dev->dev, "%s\n", __func__);

skb = pn533_alloc_skb(dev, 2);
if (!skb)
return;
Expand Down Expand Up @@ -1360,8 +1346,6 @@ static int pn533_poll_dep(struct nfc_dev *nfc_dev)
u8 *next, nfcid3[NFC_NFCID3_MAXSIZE];
u8 passive_data[PASSIVE_DATA_LEN] = {0x00, 0xff, 0xff, 0x00, 0x3};

dev_dbg(dev->dev, "%s", __func__);

if (!dev->gb) {
dev->gb = nfc_get_local_general_bytes(nfc_dev, &dev->gb_len);

Expand Down Expand Up @@ -1511,8 +1495,6 @@ static int pn533_poll_complete(struct pn533 *dev, void *arg,
struct pn533_poll_modulations *cur_mod;
int rc;

dev_dbg(dev->dev, "%s\n", __func__);

if (IS_ERR(resp)) {
rc = PTR_ERR(resp);

Expand Down Expand Up @@ -1783,8 +1765,6 @@ static int pn533_activate_target_nfcdep(struct pn533 *dev)
struct sk_buff *skb;
struct sk_buff *resp;

dev_dbg(dev->dev, "%s\n", __func__);

skb = pn533_alloc_skb(dev, sizeof(u8) * 2); /*TG + Next*/
if (!skb)
return -ENOMEM;
Expand Down Expand Up @@ -1866,8 +1846,6 @@ static int pn533_deactivate_target_complete(struct pn533 *dev, void *arg,
{
int rc = 0;

dev_dbg(dev->dev, "%s\n", __func__);

if (IS_ERR(resp)) {
rc = PTR_ERR(resp);

Expand All @@ -1892,8 +1870,6 @@ static void pn533_deactivate_target(struct nfc_dev *nfc_dev,
struct sk_buff *skb;
int rc;

dev_dbg(dev->dev, "%s\n", __func__);

if (!dev->tgt_active_prot) {
nfc_err(dev->dev, "There is no active target\n");
return;
Expand Down Expand Up @@ -1988,8 +1964,6 @@ static int pn533_dep_link_up(struct nfc_dev *nfc_dev, struct nfc_target *target,
u8 *next, *arg, nfcid3[NFC_NFCID3_MAXSIZE];
u8 passive_data[PASSIVE_DATA_LEN] = {0x00, 0xff, 0xff, 0x00, 0x3};

dev_dbg(dev->dev, "%s\n", __func__);

if (dev->poll_mod_count) {
nfc_err(dev->dev,
"Cannot bring the DEP link up while polling\n");
Expand Down Expand Up @@ -2067,8 +2041,6 @@ static int pn533_dep_link_down(struct nfc_dev *nfc_dev)
{
struct pn533 *dev = nfc_get_drvdata(nfc_dev);

dev_dbg(dev->dev, "%s\n", __func__);

pn533_poll_reset_mod_list(dev);

if (dev->tgt_mode || dev->tgt_active_prot)
Expand All @@ -2092,8 +2064,6 @@ static struct sk_buff *pn533_build_response(struct pn533 *dev)
struct sk_buff *skb, *tmp, *t;
unsigned int skb_len = 0, tmp_len = 0;

dev_dbg(dev->dev, "%s\n", __func__);

if (skb_queue_empty(&dev->resp_q))
return NULL;

Expand Down Expand Up @@ -2133,8 +2103,6 @@ static int pn533_data_exchange_complete(struct pn533 *dev, void *_arg,
int rc = 0;
u8 status, ret, mi;

dev_dbg(dev->dev, "%s\n", __func__);

if (IS_ERR(resp)) {
rc = PTR_ERR(resp);
goto _error;
Expand Down Expand Up @@ -2288,8 +2256,6 @@ static int pn533_transceive(struct nfc_dev *nfc_dev,
struct pn533_data_exchange_arg *arg = NULL;
int rc;

dev_dbg(dev->dev, "%s\n", __func__);

if (!dev->tgt_active_prot) {
nfc_err(dev->dev,
"Can't exchange data if there is no active target\n");
Expand Down Expand Up @@ -2356,8 +2322,6 @@ static int pn533_tm_send_complete(struct pn533 *dev, void *arg,
{
u8 status;

dev_dbg(dev->dev, "%s\n", __func__);

if (IS_ERR(resp))
return PTR_ERR(resp);

Expand Down Expand Up @@ -2388,8 +2352,6 @@ static int pn533_tm_send(struct nfc_dev *nfc_dev, struct sk_buff *skb)
struct pn533 *dev = nfc_get_drvdata(nfc_dev);
int rc;

dev_dbg(dev->dev, "%s\n", __func__);

/* let's split in multiple chunks if size's too big */
if (skb->len > PN533_CMD_DATAEXCH_DATA_MAXLEN) {
rc = pn533_fill_fragment_skbs(dev, skb);
Expand Down Expand Up @@ -2426,8 +2388,6 @@ static void pn533_wq_mi_recv(struct work_struct *work)
struct sk_buff *skb;
int rc;

dev_dbg(dev->dev, "%s\n", __func__);

skb = pn533_alloc_skb(dev, PN533_CMD_DATAEXCH_HEAD_LEN);
if (!skb)
goto error;
Expand Down Expand Up @@ -2476,8 +2436,6 @@ static void pn533_wq_mi_send(struct work_struct *work)
struct sk_buff *skb;
int rc;

dev_dbg(dev->dev, "%s\n", __func__);

/* Grab the first skb in the queue */
skb = skb_dequeue(&dev->fragment_skb);

Expand Down Expand Up @@ -2533,8 +2491,6 @@ static int pn533_set_configuration(struct pn533 *dev, u8 cfgitem, u8 *cfgdata,
struct sk_buff *resp;
int skb_len;

dev_dbg(dev->dev, "%s\n", __func__);

skb_len = sizeof(cfgitem) + cfgdata_len; /* cfgitem + cfgdata */

skb = pn533_alloc_skb(dev, skb_len);
Expand Down Expand Up @@ -2580,8 +2536,6 @@ static int pn533_pasori_fw_reset(struct pn533 *dev)
struct sk_buff *skb;
struct sk_buff *resp;

dev_dbg(dev->dev, "%s\n", __func__);

skb = pn533_alloc_skb(dev, sizeof(u8));
if (!skb)
return -ENOMEM;
Expand Down
4 changes: 0 additions & 4 deletions drivers/nfc/pn533/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,6 @@ static void pn533_acr122_poweron_rdr_resp(struct urb *urb)
{
struct pn533_acr122_poweron_rdr_arg *arg = urb->context;

dev_dbg(&urb->dev->dev, "%s\n", __func__);

print_hex_dump_debug("ACR122 RX: ", DUMP_PREFIX_NONE, 16, 1,
urb->transfer_buffer, urb->transfer_buffer_length,
false);
Expand All @@ -375,8 +373,6 @@ static int pn533_acr122_poweron_rdr(struct pn533_usb_phy *phy)
void *cntx;
struct pn533_acr122_poweron_rdr_arg arg;

dev_dbg(&phy->udev->dev, "%s\n", __func__);

buffer = kmemdup(cmd, sizeof(cmd), GFP_KERNEL);
if (!buffer)
return -ENOMEM;
Expand Down

0 comments on commit 62f6441

Please sign in to comment.