On 19.09.2017 15:38, David Laight wrote:
From: Sergey SenozhatskySent: 19 September 2017 03:06...I'll simply convert everything to `unsigned long'. including the dereference_function_descriptor() function [I believe there are still some casts happening when we pass addr from kernel/module dereference functions to dereference_function_descriptor(), or when we return `void *' back to symbol resolution code, etc.) besides, it seems that everything that uses dereference_function_descriptor() wants `unsigned long' anyway:Using 'unsigned long' for any kind of pointer is an accident waiting do happen. It also makes it difficult to typecheck the function calls. Using 'void *' isn't any better. Either a pointer to an undefined struct, or a struct containing a single 'char' member, is likely to be safest.
David, you might be right in most cases, but in this case I'd prefer unsigned long too. I think this will create the least amount of typecasts here. Helge -- To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |