On 03/16/2012 03:35 PM, Kumar Gala wrote:
> On Feb 10, 2012, at 2:09 AM, <shuo....@freesacle.com> 
> <shuo....@freesacle.com> wrote:
>> +static int is_in_pci_mem_space(phys_addr_t addr)
>> +{
>> +    struct pci_controller *hose;
>> +    struct resource *res;
>> +    int i;
>> +
>> +    list_for_each_entry(hose, &hose_list, list_node) {
>> +            for (i = 0; i < 3; i++) {
>> +                    res = &hose->mem_resources[i];
>> +                    if ((res->flags & IORESOURCE_MEM) &&
>> +                            addr >= res->start && addr <= res->end)
>> +                            return 1;
>> +            }
>> +    }
>> +    return 0;
> 
> just move this into fsl_pci_mcheck_exception() no need for a separate 
> function.
A separate function increases readability.

-Scott

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to