Open RokerHRO opened 4 months ago
I would suggest breaking this into multiple commits (each patch should do one thing well, rather than doing multiple things mashed together); it makes it easier if someone wants to backport one change but not the other. But that's not a hard requirement. In this case, an obvious split would be: patch 1: clean up #include directives patch 2: consistent use of uint32_t/uint64_t
I'm not sure if Wouter has a Signed-off-by policy for userspace nbd; but given that the Linux kernel has a policy on S-o-b and this interacts closely with the kernel nbd.ko, I personally like using S-o-b on all my commits in this project.
Overall, the changes look sane to me.
I would suggest breaking this into multiple commits (each patch should do one thing well, rather than doing multiple things mashed together); it makes it easier if someone wants to backport one change but not the other. But that's not a hard requirement. In this case, an obvious split would be: patch 1: clean up #include directives patch 2: consistent use of uint32_t/uint64_t
Good point. I'll try, if the #include dependencies would not change again by the removal of u64 & u32, because the header where they are defined are no longer necessary after the change. I'll see.
Btw, do github's merge requests work well with reset & rebase when I replace the one commit by two different commits?
I'm not sure if Wouter has a Signed-off-by policy for userspace nbd; but given that the Linux kernel has a policy on S-o-b and this interacts closely with the kernel nbd.ko, I personally like using S-o-b on all my commits in this project.
What is that?
I don't know either. But of course I can add such a Signed-off-by
line in my commit(s) if desired or necessary.
I'd favor to get rid of the non-standard typedefs
u32
andu64
and use C99 standard typesuint32_t
anduint64_t
everywhere. These types are already used in the project, but mixed wildly with the old types.During this I also moved some #include directives so each .h includes only the headers to fulfill its own needs (e.g. to use foreign declarations for its own declarations). Headers that are only needed for the implementation are included only in the .c file.
Redundant or unneeded includes are removed at all.