x86/xen/time: fix section mismatch for xen_init_time_ops()
Subsystems (2)
PATCH 1/1 x86/xen/time: fix section mismatch for xen_init_time_ops()
The header declares this function as __init but is defined in __ref section.
--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/xen/xen-ops.h +1 -1
@@ -72,7 +72,7 @@ u64 xen_clocksource_read(void);void xen_setup_cpu_clockevents (void );void xen_save_time_memory_area (void );void xen_restore_time_memory_area (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );irqreturn_t xen_debug_interrupt (int irq,void *dev_id);
Signature · 1 line
2.7.4
Quoted 4 lines · Nick Desaulniers
The header declares this function as
__initbut is defined in__refsection.Signed-off-by Nick Desaulniers <[email protected]>
Juergen
Quoted 4 lines · Nick Desaulniers
The header declares this function as
__initbut is defined in__refsection.Signed-off-by Nick Desaulniers <[email protected]>
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Boris Ostrovsky
reviewerQuoted 4 lines · Nick Desaulniers
The header declares this function as
__initbut is defined in__refsection.Signed-off-by Nick Desaulniers <[email protected]>
AFAIK section attributes in header files are ignored by compiler anyway so I'd remove all of them.
-boris
Quoted 9 lines
--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/xen/xen-ops.h +0
-0
arch/x86/xen/xen-ops.h u64 xen_clocksource_read(void); · line 78
Quoted 8 lines
arch/x86/xen/xen-ops.h +1
-1@@ -72,7 +72,7 @@ u64 xen_clocksource_read(void);void xen_setup_cpu_clockevents (void );void xen_save_time_memory_area (void );void xen_restore_time_memory_area (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );irqreturn_t xen_debug_interrupt (int irq,void *dev_id);
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Boris Ostrovsky
reviewerQuoted 4 lines · Nick Desaulniers
The header declares this function as
__initbut is defined in__refsection.Signed-off-by Nick Desaulniers <[email protected]>
AFAIK section attributes in header files are ignored by compiler anyway so I'd remove all of them.
-boris
Quoted 17 lines
--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/xen/xen-ops.h +1
-1@@ -72,7 +72,7 @@ u64 xen_clocksource_read(void);void xen_setup_cpu_clockevents (void );void xen_save_time_memory_area (void );void xen_restore_time_memory_area (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );irqreturn_t xen_debug_interrupt (int irq,void *dev_id);
Juergen Gross
maintainerQuoted 8 lines · Boris Ostrovsky
Quoted 4 lines · Nick Desaulniers
The header declares this function as
__initbut is defined in__refsection.Signed-off-by Nick Desaulniers <[email protected]>AFAIK section attributes in header files are ignored by compiler anyway so I'd remove all of them.
Hmm, I'm not sure all future compilers will ignore the section attributes. include/linux/init.h explictily mentions where to put the attrubute in a prototype, so I'd rather keep it.
Juergen
Quoted 11 lines · Juergen Gross
Quoted 7 lines · Boris Ostrovsky
Quoted 4 lines · Nick Desaulniers
The header declares this function as
__initbut is defined in__refsection.Signed-off-by Nick Desaulniers <[email protected]>AFAIK section attributes in header files are ignored by compiler anyway so I'd remove all of them.
Hmm, I'm not sure all future compilers will ignore the section attributes.
include/linux/init.hexplictily mentions where to put the attrubute in a prototype, so I'd rather keep it.
Attributes in the declaration are for static analysis tools such as sparse.
How else are you going to work out whether a section mismatch has occurred?
~Andrew
Boris Ostrovsky
reviewerQuoted 7 lines · Andrew Cooper
Quoted 6 lines · Juergen Gross
Quoted 5 lines · Boris Ostrovsky
Quoted 4 lines · Nick Desaulniers
The header declares this function as
__initbut is defined in__refsection.Signed-off-by Nick Desaulniers <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
AFAIK section attributes in header files are ignored by compiler anyway so I'd remove all of them.
Hmm, I'm not sure all future compilers will ignore the section attributes.
include/linux/init.hexplictily mentions where to put the attrubute in a prototype, so I'd rather keep it.Attributes in the declaration are for static analysis tools such as sparse.
How else are you going to work out whether a section mismatch has occurred?
Isn't this done based on definitions?
Tons of __init routines don't have the attribute specified in header files. In fact, even in this file (arch/x86/xen/xen-ops.h) there are some that don't have it.
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Boris Ostrovsky
reviewerQuoted 7 lines · Andrew Cooper
Quoted 6 lines · Juergen Gross
Quoted 5 lines · Boris Ostrovsky
Quoted 4 lines · Nick Desaulniers
The header declares this function as
__initbut is defined in__refsection.Signed-off-by Nick Desaulniers <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
AFAIK section attributes in header files are ignored by compiler anyway so I'd remove all of them.
Hmm, I'm not sure all future compilers will ignore the section attributes.
include/linux/init.hexplictily mentions where to put the attrubute in a prototype, so I'd rather keep it.Attributes in the declaration are for static analysis tools such as sparse.
How else are you going to work out whether a section mismatch has occurred?
Isn't this done based on definitions?
Tons of __init routines don't have the attribute specified in header files. In fact, even in this file (arch/x86/xen/xen-ops.h) there are some that don't have it.
-boris
Quoted 17 lines · Boris Ostrovsky
Quoted 7 lines · Andrew Cooper
Quoted 6 lines · Juergen Gross
Quoted 5 lines · Boris Ostrovsky
Quoted 4 lines · Nick Desaulniers
The header declares this function as
__initbut is defined in__refsection.Signed-off-by Nick Desaulniers <[email protected]>Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
AFAIK section attributes in header files are ignored by compiler anyway so I'd remove all of them.
Hmm, I'm not sure all future compilers will ignore the section attributes.
include/linux/init.hexplictily mentions where to put the attrubute in a prototype, so I'd rather keep it.Attributes in the declaration are for static analysis tools such as sparse.
How else are you going to work out whether a section mismatch has occurred?
Quoted 7 lines
Isn't this done based on definitions?
Tons of
__initroutines don't have the attribute specified in header files. In fact, even in this file (arch/x86/xen/xen-ops.h) there are some that don't have it.-boris
What are the next steps for getting this patch merged? This is the only function for which I get a compiler warning (with Clang). Do you require a patch instead that changes more function attributes, or can that be a follow up patch?
Quoted 24 lines · Nick Desaulniers
Quoted 22 lines · Boris Ostrovsky
Quoted 7 lines · Andrew Cooper
Quoted 6 lines · Juergen Gross
Quoted 5 lines · Boris Ostrovsky
Quoted 4 lines · Nick Desaulniers
The header declares this function as
__initbut is defined in__refsection.Signed-off-by Nick Desaulniers <[email protected]>Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
AFAIK section attributes in header files are ignored by compiler anyway so I'd remove all of them.
Hmm, I'm not sure all future compilers will ignore the section attributes.
include/linux/init.hexplictily mentions where to put the attrubute in a prototype, so I'd rather keep it.Attributes in the declaration are for static analysis tools such as sparse.
How else are you going to work out whether a section mismatch has occurred?
Isn't this done based on definitions?
Tons of
__initroutines don't have the attribute specified in header files. In fact, even in this file (arch/x86/xen/xen-ops.h) there are some that don't have it.
Quoted 5 lines
Quoted 1 line
-boris
What are the next steps for getting this patch merged? This is the only function for which I get a compiler warning (with Clang). Do you require a patch instead that changes more function attributes, or can that be a follow up patch?
Applied to for-linus-4.15.
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 24 lines · Nick Desaulniers
Quoted 22 lines · Boris Ostrovsky
Quoted 7 lines · Andrew Cooper
Quoted 6 lines · Juergen Gross
Quoted 5 lines · Boris Ostrovsky
Quoted 4 lines · Nick Desaulniers
The header declares this function as
__initbut is defined in__refsection.Signed-off-by Nick Desaulniers <[email protected]>Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
AFAIK section attributes in header files are ignored by compiler anyway so I'd remove all of them.
Hmm, I'm not sure all future compilers will ignore the section attributes.
include/linux/init.hexplictily mentions where to put the attrubute in a prototype, so I'd rather keep it.Attributes in the declaration are for static analysis tools such as sparse.
How else are you going to work out whether a section mismatch has occurred?
Isn't this done based on definitions?
Tons of
__initroutines don't have the attribute specified in header files. In fact, even in this file (arch/x86/xen/xen-ops.h) there are some that don't have it.
Quoted 5 lines
Quoted 1 line
-boris
What are the next steps for getting this patch merged? This is the only function for which I get a compiler warning (with Clang). Do you require a patch instead that changes more function attributes, or can that be a follow up patch?
Applied to for-linus-4.15.
-boris
Quoted 11 lines · Juergen Gross
Quoted 7 lines · Boris Ostrovsky
Quoted 4 lines · Nick Desaulniers
The header declares this function as
__initbut is defined in__refsection.Signed-off-by Nick Desaulniers <[email protected]>AFAIK section attributes in header files are ignored by compiler anyway so I'd remove all of them.
Hmm, I'm not sure all future compilers will ignore the section attributes.
include/linux/init.hexplictily mentions where to put the attrubute in a prototype, so I'd rather keep it.
Attributes in the declaration are for static analysis tools such as sparse.
How else are you going to work out whether a section mismatch has occurred?
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerQuoted 8 lines · Boris Ostrovsky
Quoted 4 lines · Nick Desaulniers
The header declares this function as
__initbut is defined in__refsection.Signed-off-by Nick Desaulniers <[email protected]>AFAIK section attributes in header files are ignored by compiler anyway so I'd remove all of them.
Hmm, I'm not sure all future compilers will ignore the section attributes. include/linux/init.h explictily mentions where to put the attrubute in a prototype, so I'd rather keep it.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel