Message ID | 20230322120844.19657-4-jgross@suse.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | tools: use xen-tools/libs.h for common definitions | expand |
On 22.03.2023 13:08, Juergen Gross wrote: > util.h contains a definition of offsetof(), which isn't needed. While true, this is also ambiguous in the context of this series: It isn't "not needed" because common-macros.h has another definition, but it is actually unused in hvmloader code. So perhaps s/needed/used/? > Remove it. > > Signed-off-by: Juergen Gross <jgross@suse.com> Acked-by: Jan Beulich <jbeulich@suse.com>
On 22.03.23 13:42, Jan Beulich wrote: > On 22.03.2023 13:08, Juergen Gross wrote: >> util.h contains a definition of offsetof(), which isn't needed. > > While true, this is also ambiguous in the context of this series: It isn't > "not needed" because common-macros.h has another definition, but it is > actually unused in hvmloader code. So perhaps s/needed/used/? Fine with me. > >> Remove it. >> >> Signed-off-by: Juergen Gross <jgross@suse.com> > > Acked-by: Jan Beulich <jbeulich@suse.com> > Thanks, Juergen
diff --git a/tools/firmware/hvmloader/util.h b/tools/firmware/hvmloader/util.h index e04990ee97..7249773eeb 100644 --- a/tools/firmware/hvmloader/util.h +++ b/tools/firmware/hvmloader/util.h @@ -30,9 +30,6 @@ enum { #define SEL_DATA32 0x0020 #define SEL_CODE64 0x0028 -#undef offsetof -#define offsetof(t, m) ((unsigned long)&((t *)0)->m) - #undef NULL #define NULL ((void*)0)
util.h contains a definition of offsetof(), which isn't needed. Remove it. Signed-off-by: Juergen Gross <jgross@suse.com> --- V4: - new patch --- tools/firmware/hvmloader/util.h | 3 --- 1 file changed, 3 deletions(-)