Re: [PATCH] net: vxge: Use time_is_before_jiffies() for time comparison

From: Joe Perches
Date: Mon May 19 2014 - 13:35:37 EST


On Mon, 2014-05-19 at 18:51 +0200, Manuel Schölling wrote:
> To be future-proof and for better readability the time comparisons are modified
> to use time_is_before_jiffies() instead of plain, error-prone math.

Hi again Manuel.

Just a couple of FYIs/nits:

The "net: " prefix in your patch subject is a little
misleading. One reading might be that the patch is
to the net/ subsystem but it's for a driver.

It might be better as:

[PATCH] vxge: Use time_is_before_jiffies

Generally, just use the last directory name
for the subject prefix.

ie: patching: foo/bar/baz/qux.c

subject prefix is generally:

[PATCH] baz: whatever changed...

and a single patch to a number of different files
in foo/bar/baz/*.[ch] is still

[PATCH] baz: etc...

Also, the time_is_(before|after)_jiffies variants
are not used particularly often in the kernel.

The form using of time_<foo>(jiffies, ...)
is used _far_ more often (and it saves a little
typing too).

time_before(<foo>, jiffies)
time_is_before_jiffies(<foo>)

$ git grep -E -w "time_is_(before|after|before_eq|after_eq)_jiffies" | wc -l
93
$ git grep -E "\btime_(before|after|before_eq|after_eq)+\s*\(.*jiffies" | wc -l
1695

<shrug> Maybe there's some reading clarity using
the time_is_(before|after)_jiffies variants.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/