public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [v2] Coccinelle: Replace strncpy() + truncation by strscpy()
       [not found] <1531555951-9627-1-git-send-email-asmadeus@codewreck.org>
@ 2018-07-14 14:34 ` SF Markus Elfring
  0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2018-07-14 14:34 UTC (permalink / raw)
  To: Dominique Martinet, Julia Lawall, Masahiro Yamada,
	kernel-janitors
  Cc: linux-kernel, Coccinelle, Gilles Muller, Michal Marek,
	Nicolas Palix, Ville Syrjälä

I would like to contribute another bit of patch review for your proposal.

https://patchwork.kernel.org/patch/10524633/
https://lore.kernel.org/lkml/1531555951-9627-1-git-send-email-asmadeus@codewreck.org/


* I have noticed that an action word was missing in the commit subject.

* The commit description was started with the wording “Besides being simpler, …”.
  I would prefer an other ordering of information there.

  It seems that the mentioned compilation error gave you motivation for
  the shown source code transformation.
  I suggest to move the concrete update suggestion behind it.


> +virtual patch
> +virtual report
> +virtual org

How do you think about to reduce a bit of code repetition?

+virtual patch, report, org


> In particular, I have conciously not removed the intermediate msg
> variable; as I made the message longer I actually added one more of
> these for the org mode section.

I propose again to reconsider such an implementation detail once more
so that unnecessary Python code could be avoided.
The Linux coding style supports the usage of long message strings.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id-b39a2f491a48ec740e0214a7dd584eefc2137d#n81

Can string literals be nicer than extra variables (because of questionable
source code layout concerns)?

Regards,
Markus

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-14 14:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1531555951-9627-1-git-send-email-asmadeus@codewreck.org>
2018-07-14 14:34 ` [v2] Coccinelle: Replace strncpy() + truncation by strscpy() SF Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox