Re: [PATCH 1115/1285] Replace numeric parameter like 0444 with macro
lkml.org
lkml.org
Instead here there are 1285 separate threads of discussion with dozens of people all saying the same thing with no easy way to discover it's already been said (and at least one maintainer has replied to every single one he's CC'd on). Beautiful carnage.
-module_param(max_sets, int, 0600);
+module_param(max_sets, int, S_IRUSR | S_IWUSR);
However, I'm missing context. Did someone at Intel really spam 1,285 patches without any prior discussion?Maybe there's some perverse incentive at Intel? Like performance review that considers how many patches you've sent? Or maybe its a broken tool to help submit patches?
We're going OT here, but i don't think that applies to C, where a "logical change" to a function definition may be split over two files (.c/.h).
The backdoor argument (mentioned in an earlier email in the OP thread) is pretty reasonable to raise. The maintainers seems to be fairly on top of things though, acking and nacking as patches come in but this will take a while to process. I suspect very much that these commits will have to be rewritten to include subsystem labels and more accurate summaries by the maintainers if they want to include them. The patch set as an aggregate whole is garbage.
This reminds me of constantly looking up j dict [0] before I could remember what each number means. J's foreign conjunction is certainly an extreme here, but it teaches me that what is easy to parse really depends on one's proficiency in the language.
Also, just spamming like that is insane.
I'd vastly prefer the symbolic forms (and am slightly surprised that the kernel source has raw octal in it at all). Although I wouldn't have tried to implement the change as a thousand separate patches...
For an alternative symbolic approach, here is how it is done in Lisp, thanks to SETF (and the OSICAT library).
(file-permissions #P"/tmp/file")
NIL
(setf (file-permissions #P"/tmp/file")
'(:user-read :group-read :other-read))
... or
(nix:chmod #P"/tmp/file" #o444)
By the magic of SETF, you can now use all other macros which modify a place: (push :user-write (file-permissions #P"/tmp/file"))
And thus: (file-permissions #P"/tmp/file")
=> (:USER-READ :USER-WRITE :GROUP-READ :OTHER-READ)Also, it's not easy to argue that "S_IRUSR | S_IRGRP | S_IROTH" is any kind of readability improvement...
However, if instead of S_IRUSR|S_IWUSR (which I'd have to lookup up to parse correctly), it were possible to write "a-rwx"|"u+rw", it would be even easier to parse, without the need to memorize common octal numbers. In C, this could be achieved with the preprocessor, I believe, if you create a sufficiently smart CPP macro, especially since Linux is no stranger to heavy preprocessor use.
It's just how software is developed where code is reviewed before inclusion and not committed-by-default and backed out later. And there's no Intel pre-mailing patch review group that has to vet kernel patches before a dev is allowed to send them out, ignoring NDA'ed things, of course.
There is no ill will here, and Intel has more unseasoned Linux developers now, so it's normal for seemingly naive patches to appear.
We need more developers who try, fail, try again, and that requires less shaming and more encouragement.
Edit: The impact could be shown in a single email with a diffstat, for example. Complaining about a lack of feedback for such a thing sounds more like complaining about failing to draw others in to a bikeshedding competition.
True, and I agree, but not the way stuff is usually done on LKML, thus probably not considered.
In this special case of a huge number of patches it might have been a good idea to present an RFC diffstat first, yes. Actually, I wish github had a .diffstat extension for pull requests, because often that's the first thing I care about before I know if I want to delve into a random big patch.
Compared to the bits and pieces of LKML I occasionally see, blasting 1200 emails is downright polite.
These were obviously generated programattically. I refuse to believe otherwise.
if(m & S_IRUSR) { ... }(kernel muggle here, mind)