On 5/16/11 12:21 PM, Jonas Gorski wrote:

>> Index: target/linux/generic/patches-2.6.37/442-block2mtd_probe.patch
>> ===================================================================
>> --- target/linux/generic/patches-2.6.37/442-block2mtd_probe.patch    
>> (revision 26907)
>> +++ target/linux/generic/patches-2.6.37/442-block2mtd_probe.patch    
>> (working copy)
>> (...)
>> -            dev_t devt = name_to_dev_t(dev->devname);
>> +-           dev_t devt = name_to_dev_t(dev->devname);
>> ++           devt = name_to_dev_t(dev->devname);
> 
> This line is actually from 441-block2mtd_refresh.patch, so it should
> be changed there (like it is already for 2.6.38 and 2.6.39).


True, but in 440 it doesn't cause a warning because there are no statements 
before the definitions...

The problem comes up in 441 here:

                /* We might not have rootfs mounted at this point. Try
                   to resolve the device name by other means. */

+               wait_for_device_probe();
                dev_t devt = name_to_dev_t(dev->devname);


because a statement is added above a definition.

So the solution I came up with in my latest patch is to do the definition, then 
the statement, then the assignment that was part of the definition...

I.e.

dev_t devt;
wait_for_device_probe();
devt = name_to_dev_t(dev->devname);

-Philip
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to