[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9E0BE1322F2F2246BD820DA9FC397ADE013CA85E@SHSMSX102.ccr.corp.intel.com>
Date: Sat, 20 Jul 2013 16:16:42 +0000
From: "Ren, Qiaowei" <qiaowei.ren@...el.com>
To: Ingo Molnar <mingo@...nel.org>
CC: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
"x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Wei, Gang" <gang.wei@...el.com>
Subject: RE: [PATCH] x86, tboot: iomem fixes
On 2013-07-20, Ingo Molnar wrote:
>
> * Qiaowei Ren <qiaowei.ren@...el.com> wrote:
>
>> +#define SINIT_MLE_DATA_VTD_DMAR_OFF 140
>
>> /* get addr of DMAR table */ + dmar_tbl_off = readl(heap_ptr +
>> SINIT_MLE_DATA_VTD_DMAR_OFF); dmar_tbl = (struct acpi_table_header
>> *)(heap_ptr +
>> - ((struct sinit_mle_data *)heap_ptr)->vtd_dmars_off -
>> - sizeof(u64));
>> + dmar_tbl_off - sizeof(u64));
>
> So the offset of ->vtd_dmars_off within struct sinit_mle_data is 140?
>
> The new code is less readable: what's wrong with getting the offset
> automatically via C, instead of hardcoding it manually? You can use
> offsetof() primitive for increased readability.
>
Ok. Thanks for your suggestion. I will try to use offsetof() to increase readability.
Thanks,
Qiaowei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists