>-----Original Message-----
>From: Mike Frysinger [mailto:[email protected]] 
>Sent: Friday, January 15, 2010 11:47 AM
>To: [email protected]
>Cc: [email protected]
>Subject: Re: [Linux-kernel-commits] [8168] trunk: mtd-physmap: 
>add support users can assign the probe type in board files
>
>On Thu, Jan 14, 2010 at 22:24,  <[email protected]> wrote:
>> Revision 8168 Author bhsong Date 2010-01-14 22:24:39 -0500 
>(Thu, 14 Jan
>> 2010)
>>
>> Log Message
>>
>> mtd-physmap: add support users can assign the probe type in 
>board files
>>
>> Modified: trunk/drivers/mtd/maps/physmap.c (8167 => 8168)
>>
>>              probe_type = rom_probe_types;
>> -            for (; info->mtd[i] == NULL && *probe_type != 
>NULL; probe_type++)
>> +            for (; info->mtd[i] == NULL && *probe_type != 
>NULL; probe_type++) {
>> +                    if (info->probe_type != NULL)
>> +                            if (strcmp(info->probe_type, 
>*probe_type) != 0)
>> +                                    continue;
>>                      info->mtd[i] = 
>do_map_probe(*probe_type, &info->map[i]);
>> +            }
>
>this prevents people from putting a probe type into the board which
>isnt already listed in the physmap driver.  how about doing the NULL
>check up front:
>       if (info->probe_type == NULL) {
>               for (; info->mtd[i] == NULL && *probe_type != 
>NULL; probe_type++)
>                       info->mtd[i] = 
>do_map_probe(*probe_type, &info->map[i]);
>       } else
>               info->mtd[i] = do_map_probe(info->probe_type, 
>&info->map[i]);
>
>this also gets rid of the redundant ptr/strcmp checks
This patch is fine to me. But if there is a new probe which is not
listed in physmap, it should be added to the list to permit users to
detect.
>-mike
>
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to