On 5/4/2011 2:55 AM, Christoph Hellwig wrote:
In general this looks like the way to go. The only think I'm not overly happy wih is how the sci_base_object removal is handled. In general it shouldn't be replaced by untyped void pointers, by proper container_of usage. I guess for most instances it doesn't matter too much as the different layers of structures for the same object are in the process of beeing merged anyway, but it's fairly significant for the state machine.
As it turns out I gave this same feedback internally when reviewing the series. I grabbed this early version for a couple reasons:
1/ wanted to get wider testing of the removal of structure member position assumptions.
2/ this arrived before I had the patches to start killing off the substate machines so it was not quite ready for this conversion.
Will circle back and re-add the type-safety after the substate machines are gone and the unification is completed.
All the enter/exit handler should be passed a struct sci_base_state_machine *, and then use container_of to get at the containing structure, thus removing the need for the state_machine_owner field in struct sci_base_state_machine.
Ah yes, forgot about that field.
And while you're at it _please_ remove all the utterly pointless kerneldoc comments for the state enter/exit handlers.
Looks like I managed to kill them all for remote_device, will double check that this gets done for the rest.
-- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html