Re: [Qemu-devel] [RFC PATCH v3 1/5] coccinelle: add a script to optimize tcg op using tcg_gen_extract()

2017-05-12 Thread SF Markus Elfring via Qemu-devel
> +print " candidate", "IS" if is_optimizable else "is NOT", > "optimizable" I suggest to increase your software development attention also for another detail here. This information display is using the channel “sys.stdout”. How do you think about to use the function “sys.stderr.write”

Re: [Qemu-devel] [RFC PATCH v3 1/5] coccinelle: add a script to optimize tcg op using tcg_gen_extract()

2017-05-12 Thread SF Markus Elfring via Qemu-devel
> Even for 6 functions, I would suggest to write out the function names in > the pattern matching code rather than using regular expressions. If the > names are explicit, then Coccinelle can do some filtering, either based on > an index made with idutils or glimpse (see the coccinelle scripts > di

Re: [Qemu-devel] [RFC PATCH v3 1/5] coccinelle: add a script to optimize tcg op using tcg_gen_extract()

2017-05-11 Thread SF Markus Elfring via Qemu-devel
> create mode 100644 scripts/coccinelle/tcg_gen_extract.cocci Will an other subdirectory be more appropriate for this SmPL script? > +// Coccinelle helpful issue: > +// https://github.com/coccinelle/coccinelle/issues/86 I am curious if such an information source will trigger further software e

[Qemu-devel] [PATCH 6/6] firmware-qemu_fw_cfg: Move a variable assignment in fw_cfg_sysfs_probe()

2016-09-18 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 18 Sep 2016 14:25:55 +0200 One local variable was set to an error code before a concrete error situation was detected. Thus move the corresponding assignment into two if branches to indicate a software failure there. Signed-off-by: Markus Elfring --- drivers

[Qemu-devel] [PATCH 5/6] firmware-qemu_fw_cfg: Rename jump labels in fw_cfg_sysfs_probe()

2016-09-18 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 18 Sep 2016 14:04:48 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/firmware/qemu_fw_cfg.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a

[Qemu-devel] [PATCH 4/6] firmware-qemu_fw_cfg: Improve a size determination in fw_cfg_build_symlink()

2016-09-18 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 18 Sep 2016 14:02:02 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Sig

[Qemu-devel] [PATCH 3/6] firmware-qemu_fw_cfg: Rename jump labels in fw_cfg_register_file()

2016-09-18 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 18 Sep 2016 11:23:46 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/firmware/qemu_fw_cfg.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/firmware

[Qemu-devel] [PATCH 2/6] firmware-qemu_fw_cfg: Improve a size determination in fw_cfg_register_file()

2016-09-18 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 18 Sep 2016 10:43:27 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Sig

[Qemu-devel] [PATCH 1/6] firmware-qemu_fw_cfg: Use kmalloc_array() in fw_cfg_register_dir_entries()

2016-09-18 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 18 Sep 2016 09:39:31 +0200 * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the

[Qemu-devel] [PATCH 0/6] firmware-qemu_fw_cfg: Fine-tuning for four function implementations

2016-09-18 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 18 Sep 2016 14:43:21 +0200 Some update suggestions were taken into account from static source code analysis. Markus Elfring (6): Use kmalloc_array() in fw_cfg_register_dir_entries() Improve a size determination in fw_cfg_register_file() Rename jump labels

[Qemu-devel] [Bug 1168733] [NEW] reserved identifier violation

2013-04-13 Thread Markus Elfring
Public bug reported: I would like to point out that identifiers like the following do not fit to the expected naming convention of the C language standard. - __COMMAND_H__ http://git.qemu.org/?p=qemu.git;a=blob;f=cmd.h;hb=64b85a8f2359ca3a995499afaf3c87d8e036e030#l17 - _QEMU_OPTIONS_H_ http