[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v6 2/4] xen: change <asm/bug.h> to <xen/bug.h>
On 08.03.2023 18:25, Oleksii wrote: > On Wed, 2023-03-08 at 16:27 +0100, Jan Beulich wrote: >> On 07.03.2023 16:50, Oleksii Kurochko wrote: >>> --- a/xen/arch/arm/include/asm/bug.h >>> +++ b/xen/arch/arm/include/asm/bug.h >>> @@ -1,6 +1,8 @@ >>> #ifndef __ARM_BUG_H__ >>> #define __ARM_BUG_H__ >>> >>> +#include <xen/types.h> >>> + >>> #if defined(CONFIG_ARM_32) >>> # include <asm/arm32/bug.h> >>> #elif defined(CONFIG_ARM_64) >>> @@ -9,10 +11,16 @@ >>> # error "unknown ARM variant" >>> #endif >>> >>> +#undef BUG_DISP_WIDTH >>> +#undef BUG_LINE_LO_WIDTH >>> +#undef BUG_LINE_HI_WIDTH >> >> Why? For Arm ... >> >>> #define BUG_DISP_WIDTH 24 >>> #define BUG_LINE_LO_WIDTH (31 - BUG_DISP_WIDTH) >>> #define BUG_LINE_HI_WIDTH (31 - BUG_DISP_WIDTH) >> >> ... you could purge these as unused, even in a standalone prereq >> patch. >> And on x86 ... >> >>> --- a/xen/arch/x86/include/asm/bug.h >>> +++ b/xen/arch/x86/include/asm/bug.h >>> @@ -1,19 +1,18 @@ >>> #ifndef __X86_BUG_H__ >>> #define __X86_BUG_H__ >>> >>> +#undef BUG_DISP_WIDTH >>> +#undef BUG_LINE_LO_WIDTH >>> +#undef BUG_LINE_HI_WIDTH >>> + >>> #define BUG_DISP_WIDTH 24 >>> #define BUG_LINE_LO_WIDTH (31 - BUG_DISP_WIDTH) >>> #define BUG_LINE_HI_WIDTH (31 - BUG_DISP_WIDTH) >> >> ... there's no reason to #undef just to the #define again to the same >> values. All of this would be removed in a subsequent patch anyway, >> and >> it's less code churn (with code nevertheless being correct) if you >> get >> rid of the #define-s right away (as iirc you had it in an earlier >> version). If you agree then with these adjustments >> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> > > It won't be compilation issue (redefinition) in the current one case > because defines are the same as in <xen/bug.h> so it is possible to not > add #undef in this patch. Avoiding to add the #undef is the minimal approach. Yet as indicated I think the #define-s should also be dropped right here (x86) and in a prereq patch (Arm). Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |