lkml.org 
[lkml]   [2015]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/1] x86: Add Isolated Memory Regions for Quark X1000
On 24/01/15 11:02, Andy Shevchenko wrote:
> On Sat, Jan 24, 2015 at 3:48 AM, Ong, Boon Leong
> <boon.leong.ong@intel.com> wrote:
>
>>> +static int imr_enabled(struct imr_regs *imr)
>> Do we want to make it inline perhaps since it is 1 liner?
>
> Since it is declared static I would even suggest the new name is_imr_enabled().

I think imr_is_enabled() is a better name. Every other function is imr_
prefixed.

>>> +
>>> + if ((imr_to_phys(imr.addr_lo) == base) &&
>>> + (imr_to_phys(imr.addr_hi) == max)) {
>> I think we need to take care of the size that has been fix-up here ...
>>
>>> + found = 1;
>>> + reg = i;
>
> According to your comment this line becomes redundant.
>

Ah but I still think though.

We eventually do an imr_write(reg, &imr); which I think reads better
than imr_write(i, &imr);

--
BOD


\
 
 \ /
  Last update: 2015-01-24 23:01    [W:0.061 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site