Nope, doesn't matter a whit, as long as the drives are properly setup master/slave.
But, as in all things, this will hold true 999 times out of a 1000, but if you are working with an older ( 386/486 class ) machine, you may run into a drive or CDrom which uses the CS mode instead of Master/Slave, or a drive which wants a setting of Master with slave present.
In this case, ( rare, and getting rarer ), the primary device must be the first in order , which is the center connector, not the end one as you would think.
xxx -------------------------xxx------xxx
IDE1 M-1 S-2