Skip to content

Commit 54c9ee3

Browse files
tititiou36holtmann
authored andcommitted
Bluetooth: cmtp: Do not use list_for_each_safe when not needed
There is no need to use the safe version of list_for_each here. Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent d63b282 commit 54c9ee3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

net/bluetooth/cmtp/capi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ static void cmtp_application_del(struct cmtp_session *session, struct cmtp_appli
100100
static struct cmtp_application *cmtp_application_get(struct cmtp_session *session, int pattern, __u16 value)
101101
{
102102
struct cmtp_application *app;
103-
struct list_head *p, *n;
103+
struct list_head *p;
104104

105-
list_for_each_safe(p, n, &session->applications) {
105+
list_for_each(p, &session->applications) {
106106
app = list_entry(p, struct cmtp_application, list);
107107
switch (pattern) {
108108
case CMTP_MSGNUM:
@@ -511,13 +511,13 @@ static int cmtp_proc_show(struct seq_file *m, void *v)
511511
struct capi_ctr *ctrl = m->private;
512512
struct cmtp_session *session = ctrl->driverdata;
513513
struct cmtp_application *app;
514-
struct list_head *p, *n;
514+
struct list_head *p;
515515

516516
seq_printf(m, "%s\n\n", cmtp_procinfo(ctrl));
517517
seq_printf(m, "addr %s\n", session->name);
518518
seq_printf(m, "ctrl %d\n", session->num);
519519

520-
list_for_each_safe(p, n, &session->applications) {
520+
list_for_each(p, &session->applications) {
521521
app = list_entry(p, struct cmtp_application, list);
522522
seq_printf(m, "appl %d -> %d\n", app->appl, app->mapping);
523523
}

0 commit comments

Comments
 (0)