aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/list.h6
-rw-r--r--scripts/kconfig/mconf.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/scripts/kconfig/list.h b/scripts/kconfig/list.h
index 685d80e1bb0e..2cf23f002d3f 100644
--- a/scripts/kconfig/list.h
+++ b/scripts/kconfig/list.h
@@ -34,7 +34,7 @@ struct list_head {
34 * list_entry - get the struct for this entry 34 * list_entry - get the struct for this entry
35 * @ptr: the &struct list_head pointer. 35 * @ptr: the &struct list_head pointer.
36 * @type: the type of the struct this is embedded in. 36 * @type: the type of the struct this is embedded in.
37 * @member: the name of the list_struct within the struct. 37 * @member: the name of the list_head within the struct.
38 */ 38 */
39#define list_entry(ptr, type, member) \ 39#define list_entry(ptr, type, member) \
40 container_of(ptr, type, member) 40 container_of(ptr, type, member)
@@ -43,7 +43,7 @@ struct list_head {
43 * list_for_each_entry - iterate over list of given type 43 * list_for_each_entry - iterate over list of given type
44 * @pos: the type * to use as a loop cursor. 44 * @pos: the type * to use as a loop cursor.
45 * @head: the head for your list. 45 * @head: the head for your list.
46 * @member: the name of the list_struct within the struct. 46 * @member: the name of the list_head within the struct.
47 */ 47 */
48#define list_for_each_entry(pos, head, member) \ 48#define list_for_each_entry(pos, head, member) \
49 for (pos = list_entry((head)->next, typeof(*pos), member); \ 49 for (pos = list_entry((head)->next, typeof(*pos), member); \
@@ -55,7 +55,7 @@ struct list_head {
55 * @pos: the type * to use as a loop cursor. 55 * @pos: the type * to use as a loop cursor.
56 * @n: another type * to use as temporary storage 56 * @n: another type * to use as temporary storage
57 * @head: the head for your list. 57 * @head: the head for your list.
58 * @member: the name of the list_struct within the struct. 58 * @member: the name of the list_head within the struct.
59 */ 59 */
60#define list_for_each_entry_safe(pos, n, head, member) \ 60#define list_for_each_entry_safe(pos, n, head, member) \
61 for (pos = list_entry((head)->next, typeof(*pos), member), \ 61 for (pos = list_entry((head)->next, typeof(*pos), member), \
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 14cea7463a62..4dd37552abc2 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -330,10 +330,10 @@ static void set_subtitle(void)
330 list_for_each_entry(sp, &trail, entries) { 330 list_for_each_entry(sp, &trail, entries) {
331 if (sp->text) { 331 if (sp->text) {
332 if (pos) { 332 if (pos) {
333 pos->next = xcalloc(sizeof(*pos), 1); 333 pos->next = xcalloc(1, sizeof(*pos));
334 pos = pos->next; 334 pos = pos->next;
335 } else { 335 } else {
336 subtitles = pos = xcalloc(sizeof(*pos), 1); 336 subtitles = pos = xcalloc(1, sizeof(*pos));
337 } 337 }
338 pos->text = sp->text; 338 pos->text = sp->text;
339 } 339 }