On 01/09/2020 06:56, kajoljain wrote:
+#define min(x, y) ({ \
+ typeof(x) _min1 = (x); \
+ typeof(y) _min2 = (y); \
+ (void)(&_min1 == &_min2); \
+ _min1 < _min2 ? _min1 : _min2; })
+#endif
Wondering what is special about this definition of min that it's required?
Compiled ok for me without it.
Hi John,
You are right, for me also in power it compiled without any issues, but
not sure if somewhere we have dependency,
that's why I didn't remove it.
If it builds for x86, then that's main thing ;) But seriously, Arnaldo
has lots of bots to test builds also.
BTW, I got this from your patchset:
pmu-events/jevents.c:98:29: warning: no previous prototype for
‘get_cpu_str’ [-Wmissing-prototypes]
__attribute__((weak)) char *get_cpu_str(void)
^~~~~~~~~~~
pmu-events/jevents.c:529:5: warning: no previous prototype for
‘json_events’ [-Wmissing-prototypes]
int json_events(const char *fn,
^~~~~~~~~~~
But I think that you will remove this.
Finally, generated pmu-events.c looks ok for arm64, which I am
interested in.
Thanks,
John