Thread (46 messages) flat view 46 messages, 5 authors, 2020-04-16

Re: [PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

From: Scott Wood <oss@buserror.net>
Date: 2020-04-16 19:38:28
Also in: lkml

On Thu, 2020-04-16 at 08:30 +0200, Greg KH wrote:
On Wed, Apr 15, 2020 at 02:27:51PM -0500, Scott Wood wrote:
quoted
quoted
quoted
+		dev_err(&pdev->dev, "error no valid uio-map
configured\n");
+		ret = -EINVAL;
+		goto err_info_free_internel;
+	}
+
+	info->version = "0.1.0";
Could you define some DRIVER_VERSION in the top of the file next to 
DRIVER_NAME instead of hard coding in the middle on a function ?
That's what v1 had, and Greg KH said to remove it.  I'm guessing that he
thought it was the common-but-pointless practice of having the driver
print a
version number that never gets updated, rather than something the UIO API
(unfortunately, compared to a feature query interface) expects.  That
said,
I'm not sure what the value is of making it a macro since it should only
be
used once, that use is self documenting, it isn't tunable, etc.  Though if
this isn't a macro, UIO_NAME also shouldn't be (and if it is made a macro
again, it should be UIO_VERSION, not DRIVER_VERSION).

Does this really need a three-part version scheme?  What's wrong with a
version of "1", to be changed to "2" in the hopefully-unlikely event that
the
userspace API changes?  Assuming UIO is used for this at all, which
doesn't
seem like a great fit to me.
No driver version numbers at all please, they do not make any sense when
the driver is included in the kernel tree.
Again, reporting a version string is part of the UIO API.  It might not be a
good API, but if it's left as NULL the registration will fail.

-Scott

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help