`Hi Linus,> >> > In short: It is wrong to do> >> >          if (jiffies <= start+HZ)> >> > and it is _right_ to do> >> >          if (jiffies - start <= HZ)>> Actually this last part is wrong, isn't it ? jiffies <= start + HZ isalso> a correct way to do it, since start+HZ will overflow to the current value> of jiffies when HZ time elapses. So the above two statements areIDENTICAL.>> No.>> Try it out with a few examples. You'll see.>>                    LinusI am sorry, but I still don't see the difference. I wrote a small programwith differentcases, but the values still come same irrespective of the input argumentsto thechecks. Could you tell under what conditions the checks wuold fail ? The2'scomplement  works the same for addition and subtraction. I have includedthetest program below.Thanks,- KK---------------------------------------------------------------------------------------------/*     if (jiffies <= start+HZ)     if (jiffies - start <= HZ)*/#define HZ 100main(){     unsigned long start, jiffies;     /* Case 1 */     start = ((unsigned long) -1);     jiffies = start + HZ;     if (jiffies <= start + HZ) {           printf("Less Case 1\n");     }     if (jiffies - start <= HZ) {           printf("Less Case 2\n");     }     /* Case 2 */     start = ((unsigned long) -10);     jiffies = start + HZ + 1;     if (jiffies <= start + HZ) {           printf("Less Case 3\n");     }     if (jiffies - start <= HZ) {           printf("Less Case 4\n");     }     /* Case 3 */     start = ((unsigned long) -10);     jiffies = start + HZ - 1;     if (jiffies <= start + HZ) {           printf("Less Case 5\n");     }     if (jiffies - start <= HZ) {           printf("Less Case 6\n");     }}-To unsubscribe from this list: send the line "unsubscribe linux-kernel" inthe body of a message to majordomo@vger.kernel.orgMore majordomo info at  http://vger.kernel.org/majordomo-info.htmlPlease read the FAQ at  http://www.tux.org/lkml/`