Conversation

Krzysztof Kozlowski

Edited 1 year ago

Once you see it, you cannot unsee:

+#ifndef MSM_VIDC_EMPTY_BRACE
+#define MSM_VIDC_EMPTY_BRACE {},
+#endif
...
+static const struct of_device_id msm_vidc_dt_match[] = {
+	{.compatible = "..."},
...
+	MSM_VIDC_EMPTY_BRACE
+};

We are back to the past! To year 2000-something to be precise. This reminds me ARM Mali Linux kernel drivers which were using MALI_SUCCESS instead of return 0.

1
0
5
@krzk This looks cool... but this is even better:

#ifndef SEMICOLON
#define SEMICOLON ;
#endif /* SEMICOLON */
...
pr_info("something\n")SEMICOLON
...
1
0
1
@Andi Human creativity is endless.
0
0
0