* [PATCH] remove unused "container" macro
@ 2011-04-07 22:39 Jan Pokorný
2011-04-13 9:05 ` Christopher Li
0 siblings, 1 reply; 2+ messages in thread
From: Jan Pokorný @ 2011-04-07 22:39 UTC (permalink / raw)
To: sparse; +Cc: linux-sparse
This macro seems to be unused since commit e7fb6e0 (4 years ago).
But my estimation that it does not currently have any practical usage for
navigating through the sparse structures may be wrong.
Signed-off-by: Jan Pokorny <pokorny_jan@seznam.cz>
---
ptrlist.h | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/ptrlist.h b/ptrlist.h
index fbfc080..58d3bda 100644
--- a/ptrlist.h
+++ b/ptrlist.h
@@ -9,9 +9,6 @@
* (C) Copyright Linus Torvalds 2003-2005
*/
-#define container(ptr, type, member) \
- (type *)((void *)(ptr) - offsetof(type, member))
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] remove unused "container" macro
2011-04-07 22:39 [PATCH] remove unused "container" macro Jan Pokorný
@ 2011-04-13 9:05 ` Christopher Li
0 siblings, 0 replies; 2+ messages in thread
From: Christopher Li @ 2011-04-13 9:05 UTC (permalink / raw)
To: Jan Pokorný; +Cc: linux-sparse
Applied.
Chris
On Thu, Apr 7, 2011 at 3:39 PM, Jan Pokorný <pokorny_jan@seznam.cz> wrote:
> This macro seems to be unused since commit e7fb6e0 (4 years ago).
> But my estimation that it does not currently have any practical usage for
> navigating through the sparse structures may be wrong.
>
> Signed-off-by: Jan Pokorny <pokorny_jan@seznam.cz>
> ---
> ptrlist.h | 3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/ptrlist.h b/ptrlist.h
> index fbfc080..58d3bda 100644
> --- a/ptrlist.h
> +++ b/ptrlist.h
> @@ -9,9 +9,6 @@
> * (C) Copyright Linus Torvalds 2003-2005
> */
>
> -#define container(ptr, type, member) \
> - (type *)((void *)(ptr) - offsetof(type, member))
> -
> /* Silly type-safety check ;) */
> #define DECLARE_PTR_LIST(listname,type) struct listname { type *list[1]; }
> #define CHECK_TYPE(head,ptr) (void)(&(ptr) == &(head)->list[0])
> --
> 1.7.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-13 9:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-07 22:39 [PATCH] remove unused "container" macro Jan Pokorný
2011-04-13 9:05 ` Christopher Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).