* [PATCH] Change in comment for the list_empty() routine.
@ 2019-03-26 6:21 Nitin U. Yewale
2019-03-26 7:00 ` Rasmus Villemoes
0 siblings, 1 reply; 2+ messages in thread
From: Nitin U. Yewale @ 2019-03-26 6:21 UTC (permalink / raw)
To: airlied, daniel, linux-kernel; +Cc: loberman, Nitin U. Yewale
Hello,
In one of the observations it was noticed that list_empty() routine
returns true when the list is empty (head->next == head) OR False
otherwise. Hence the proposed patch.
Thank you,
Nitin Yewale
Signed-off-by: Nitin U. Yewale <nyewale@redhat.com>
---
drivers/gpu/drm/nouveau/include/nvif/list.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/include/nvif/list.h b/drivers/gpu/drm/nouveau/include/nvif/list.h
index 8af5d144ecb0..12bf7e3333e4 100644
--- a/drivers/gpu/drm/nouveau/include/nvif/list.h
+++ b/drivers/gpu/drm/nouveau/include/nvif/list.h
@@ -226,10 +226,7 @@ static inline void list_move_tail(struct list_head *list,
/**
* Check if the list is empty.
*
- * Example:
- * list_empty(&bar->list_of_foos);
- *
- * @return True if the list contains one or more elements or False otherwise.
+ * @return True if the list is empty (head->next == head) or False otherwise.
*/
static inline bool
list_empty(struct list_head *head)
--
2.17.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Change in comment for the list_empty() routine.
2019-03-26 6:21 [PATCH] Change in comment for the list_empty() routine Nitin U. Yewale
@ 2019-03-26 7:00 ` Rasmus Villemoes
0 siblings, 0 replies; 2+ messages in thread
From: Rasmus Villemoes @ 2019-03-26 7:00 UTC (permalink / raw)
To: Nitin U. Yewale, airlied, daniel, linux-kernel; +Cc: loberman
On 26/03/2019 07.21, Nitin U. Yewale wrote:
> Hello,
>
> In one of the observations it was noticed that list_empty() routine
> returns true when the list is empty (head->next == head) OR False
> otherwise. Hence the proposed patch.
Hm, does anything use that file? It's almost impossible to have a
translation unit that doesn't end up including linux/types.h since
struct list_head is embedded in so many other structs. So if the
nvif/list.h was also included by anything, I'd expect an immediate build
failure (error: redefinition of ‘struct list_head’). Also, nothing under
drivers/gpu does a #include of a list.h file that is not linux/list.h.
IOW, I suggest deleting drivers/gpu/drm/nouveau/include/nvif/list.h
entirely.
Rasmus
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-26 7:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-26 6:21 [PATCH] Change in comment for the list_empty() routine Nitin U. Yewale
2019-03-26 7:00 ` Rasmus Villemoes
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.