On 06/28/2013 09:29 AM, Bart Van Assche wrote: > On 06/10/13 13:11, Hannes Reinecke wrote: >> +static int sdev_eh_deadline(struct Scsi_Host *shost, >> + unsigned long eh_start) >> +{ >> + if (!shost->eh_deadline) >> + return 0; >> + >> + if (shost->last_reset != 0 && >> + time_before(shost->last_reset, eh_start)) >> + eh_start = shost->last_reset; >> + >> + if (time_before(jiffies, >> + eh_start + shost->eh_deadline)) >> + return 0; >> + >> + return 1; >> +} >> + >> +static int scsi_host_eh_deadline(struct Scsi_Host *shost) >> +{ >> + if (!shost->last_reset) >> + return 0; >> + >> + return sdev_eh_deadline(shost, shost->last_reset); >> +} > > Hello Hannes, > > I would appreciate if you would choose other names for these two > functions and also for shost->eh_deadline. To me a deadline is a > time instant. As far as I can see the two functions above check > whether a deadline has been passed, and shost->eh_deadline is a time > interval. How about the following names: sdev_eh_past_deadline(), > shost_eh_past_deadline() and shost->max_eh_jiffies ? > Sure. I changed the naming once already, so I don't have any issues with that. And yes, the suggested naming does make more sense. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@xxxxxxx +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg) -- 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