On Tue, Feb 3, 2009 at 4:12 PM, Kyle McMartin <kyle@xxxxxxxxxxxxx> wrote: > On Tue, Feb 03, 2009 at 04:09:00PM -0800, Andrew Morton wrote: >> : if (id == ISCSI_MAX_TARGET) { >> : for (id = 0; id < ISCSI_MAX_TARGET; id++) { >> : err = device_for_each_child(&shost->shost_gendev, &id, > > Possibly GCC just can't figure out that id was reinitialized, so it > thinks that the for loop won't be executed? Would restructuring the code slightly be ok? if (target_id == ISCSI_MAX_TARGET) { unsigned int id = 0; ... session->target_id = id; } else { session->target_id = target_id; } ... ie. reduce the scope of "id" . Not quite a concise as existing code but just as readable. hth, grant > Just a guess... > Kyle > -- > 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 > -- 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