Skip to content

Commit

Permalink
usb: gadget: Reduce verbosity of logging
Browse files Browse the repository at this point in the history
They aren't helpful and occasionally they are spammy.
Demote all of the useless logs to debug to silence them.

Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Change-Id: I109d9f88c0c44b8d1640768ede765f980165ccd4
Signed-off-by: TogoFire <togofire@mailfence.com>
  • Loading branch information
Tashar02 authored and TogoFire committed May 24, 2023
1 parent 57db1bb commit 9c94b63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions drivers/usb/gadget/configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1459,26 +1459,26 @@ static void android_work(struct work_struct *data)
if (status[0]) {
kobject_uevent_env(&gi->dev->kobj,
KOBJ_CHANGE, connected);
pr_info("%s: sent uevent %s\n", __func__, connected[0]);
pr_debug("%s: sent uevent %s\n", __func__, connected[0]);
uevent_sent = true;
}

if (status[1]) {
kobject_uevent_env(&gi->dev->kobj,
KOBJ_CHANGE, configured);
pr_info("%s: sent uevent %s\n", __func__, configured[0]);
pr_debug("%s: sent uevent %s\n", __func__, configured[0]);
uevent_sent = true;
}

if (status[2]) {
kobject_uevent_env(&gi->dev->kobj,
KOBJ_CHANGE, disconnected);
pr_info("%s: sent uevent %s\n", __func__, disconnected[0]);
pr_debug("%s: sent uevent %s\n", __func__, disconnected[0]);
uevent_sent = true;
}

if (!uevent_sent) {
pr_info("%s: did not send uevent (%d %d %pK)\n", __func__,
pr_debug("%s: did not send uevent (%d %d %pK)\n", __func__,
gi->connected, gi->sw_connected, cdev->config);
}
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/usb/gadget/function/f_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,15 +410,15 @@ static ssize_t ffs_ep0_write(struct file *file, const char __user *buf,

/* Handle data */
if (ffs->state == FFS_READ_DESCRIPTORS) {
pr_info("read descriptors\n");
pr_debug("read descriptors\n");
ret = __ffs_data_got_descs(ffs, data, len);
if (unlikely(ret < 0))
break;

ffs->state = FFS_READ_STRINGS;
ret = len;
} else {
pr_info("read strings\n");
pr_debug("read strings\n");
ret = __ffs_data_got_strings(ffs, data, len);
if (unlikely(ret < 0))
break;
Expand Down Expand Up @@ -1923,7 +1923,7 @@ static void ffs_data_put(struct ffs_data *ffs)
/* to get updated ref atomic variable value */
smp_mb__before_atomic();
if (unlikely(atomic_dec_and_test(&ffs->ref))) {
pr_info("%s(): freeing\n", __func__);
pr_debug("%s(): freeing\n", __func__);
/* Clear ffs from global structure */
inst_status = name_to_inst_status(ffs->dev_name, false);
if (!IS_ERR(inst_status)) {
Expand Down

0 comments on commit 9c94b63

Please sign in to comment.