Commit 54c9ee39 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Marcel Holtmann

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent d63b2826
...@@ -100,9 +100,9 @@ static void cmtp_application_del(struct cmtp_session *session, struct cmtp_appli ...@@ -100,9 +100,9 @@ static void cmtp_application_del(struct cmtp_session *session, struct cmtp_appli
static struct cmtp_application *cmtp_application_get(struct cmtp_session *session, int pattern, __u16 value) static struct cmtp_application *cmtp_application_get(struct cmtp_session *session, int pattern, __u16 value)
{ {
struct cmtp_application *app; struct cmtp_application *app;
struct list_head *p, *n; struct list_head *p;
list_for_each_safe(p, n, &session->applications) { list_for_each(p, &session->applications) {
app = list_entry(p, struct cmtp_application, list); app = list_entry(p, struct cmtp_application, list);
switch (pattern) { switch (pattern) {
case CMTP_MSGNUM: case CMTP_MSGNUM:
...@@ -511,13 +511,13 @@ static int cmtp_proc_show(struct seq_file *m, void *v) ...@@ -511,13 +511,13 @@ static int cmtp_proc_show(struct seq_file *m, void *v)
struct capi_ctr *ctrl = m->private; struct capi_ctr *ctrl = m->private;
struct cmtp_session *session = ctrl->driverdata; struct cmtp_session *session = ctrl->driverdata;
struct cmtp_application *app; struct cmtp_application *app;
struct list_head *p, *n; struct list_head *p;
seq_printf(m, "%s\n\n", cmtp_procinfo(ctrl)); seq_printf(m, "%s\n\n", cmtp_procinfo(ctrl));
seq_printf(m, "addr %s\n", session->name); seq_printf(m, "addr %s\n", session->name);
seq_printf(m, "ctrl %d\n", session->num); seq_printf(m, "ctrl %d\n", session->num);
list_for_each_safe(p, n, &session->applications) { list_for_each(p, &session->applications) {
app = list_entry(p, struct cmtp_application, list); app = list_entry(p, struct cmtp_application, list);
seq_printf(m, "appl %d -> %d\n", app->appl, app->mapping); seq_printf(m, "appl %d -> %d\n", app->appl, app->mapping);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment