Skip to contentSkip to conversation

staging: tidspbridge: use the right type for list_is_last

PATCH In review Omar Ramirez Luna 3 participants 5 messages Dec 8, 2010 – Dec 22, 2010 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: tidspbridge: use the right type for list_is_last

Removes the following warning:

CC [M] drivers/staging/tidspbridge/rmgr/rmm.o
drivers/staging/tidspbridge/rmgr/rmm.c: In function 'rmm_alloc':
drivers/staging/tidspbridge/rmgr/rmm.c:147: warning: passing
argument 1 of 'list_is_last' from incompatible pointer type
include/linux/list.h:170: note: expected 'const struct list_head *'
but argument is of type 'struct rmm_ovly_sect *'

---
 drivers/staging/tidspbridge/rmgr/rmm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/tidspbridge/rmgr/rmm.c +1 -1
index aae8657..5a3f09c 100644
@@ -144,7 +144,7 @@ int rmm_alloc(struct rmm_target_obj *target, u32 segid, u32 size,
 			new_sect->addr = addr;
 			new_sect->size = size;
 			new_sect->page = segid;
-			if (list_is_last(sect, &target->ovly_list))
+			if (list_is_last(&sect->list_elem, &target->ovly_list))
 				/* Put new section at the end of the list */
 				list_add_tail(&new_sect->list_elem,
 						&target->ovly_list);
Signature · 1 line
1.7.1
Acked-by on v1 1/1
#1 lore raw

Hi Omar,

Quoted 8 lines · On Wednesday 08 December 2010 23:20:23 Omar Ramirez Luna wrote:

Removes the following warning:

CC [M] drivers/staging/tidspbridge/rmgr/rmm.o
drivers/staging/tidspbridge/rmgr/rmm.c: In function 'rmm_alloc':
drivers/staging/tidspbridge/rmgr/rmm.c:147: warning: passing
argument 1 of 'list_is_last' from incompatible pointer type
include/linux/list.h:170: note: expected 'const struct list_head *'
but argument is of type 'struct rmm_ovly_sect *'

I was about to send the same patch.

Quoted 1 line
Signature · 3 lines
Regards,

Laurent Pinchart
#2 lore raw
Quoted 12 lines · Laurent Pinchart

Hi Omar,

Quoted 8 lines · On Wednesday 08 December 2010 23:20:23 Omar Ramirez Luna wrote:

Removes the following warning:

  CC [M]  drivers/staging/tidspbridge/rmgr/rmm.o drivers/staging/tidspbridge/rmgr/rmm.c: In function 'rmm_alloc':
drivers/staging/tidspbridge/rmgr/rmm.c:147: warning: passing argument 1 of 'list_is_last' from incompatible pointer type include/linux/list.h:170: note: expected 'const struct list_head *' but argument is of type 'struct rmm_ovly_sect *'

Quoted 5 lines

I was about to send the same patch.

Quoted 1 line

Great, thanks Laurent, Ionut for the review.

Regards,

Omar
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author Applied
#3 lore raw
Quoted 14 lines · Omar
Quoted 12 lines · Laurent Pinchart

Hi Omar,

Quoted 8 lines · On Wednesday 08 December 2010 23:20:23 Omar Ramirez Luna wrote:

Removes the following warning:

  CC [M]  drivers/staging/tidspbridge/rmgr/rmm.o drivers/staging/tidspbridge/rmgr/rmm.c: In function 'rmm_alloc':
drivers/staging/tidspbridge/rmgr/rmm.c:147: warning: passing argument 1 of 'list_is_last' from incompatible pointer type include/linux/list.h:170: note: expected 'const struct list_head *' but argument is of type 'struct rmm_ovly_sect *'

Quoted 7 lines
Quoted 5 lines

I was about to send the same patch.

Quoted 1 line

Great, thanks Laurent, Ionut for the review.

Pushed to dspbridge.

Regards,

Omar
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Acked-by on v1 1/1
#4 lore raw
In reply to Omar Ramirez Luna

Hi Omar,

Quoted 19 lines · Omar Ramirez Luna

Removes the following warning:

CC [M] drivers/staging/tidspbridge/rmgr/rmm.o
drivers/staging/tidspbridge/rmgr/rmm.c: In function 'rmm_alloc':
drivers/staging/tidspbridge/rmgr/rmm.c:147: warning: passing
argument 1 of 'list_is_last' from incompatible pointer type
include/linux/list.h:170: note: expected 'const struct list_head *'
but argument is of type 'struct rmm_ovly_sect *'

---
 drivers/staging/tidspbridge/rmgr/rmm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/tidspbridge/rmgr/rmm.c +0 -0
index aae8657..5a3f09c 100644

drivers/staging/tidspbridge/rmgr/rmm.c int rmm_alloc(struct rmm_target_obj *target, u32 segid, u32 size, · line 150

Quoted 8 lines
drivers/staging/tidspbridge/rmgr/rmm.c +1 -1
@@ -144,7 +144,7 @@ int rmm_alloc(struct rmm_target_obj *target, u32 segid, u32 size,
 			new_sect->addr = addr;
 			new_sect->size = size;
 			new_sect->page = segid;
-			if (list_is_last(sect, &target->ovly_list))
+			if (list_is_last(&sect->list_elem, &target->ovly_list))
 				/* Put new section at the end of the list */
 				list_add_tail(&new_sect->list_elem,
 						&target->ovly_list);

Sorry, I added this warning by mistake, so ...