{"thread":{"id":"49694","subject":"[PATCH 2/3] ewok_rlw.h: add missing 'inline' to function definition","startedAt":"2018-10-27T01:52:09Z","lastAt":"2018-10-27T06:29:12Z","messageCount":2,"participants":["Ramsay Jones","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"361663","messageId":"1a465da6-d139-5880-72ff-c612b42c3b8f@ramsayjones.plus.com","threadId":"49694","inReplyTo":null,"subject":"[PATCH 2/3] ewok_rlw.h: add missing 'inline' to function definition","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2018-10-27T01:52:05Z","receivedAt":"2018-10-27T01:52:09Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nThe 'ewok_rlw.h' header file contains the rlw_get_run_bit() function\ndefinition, which is marked as 'static' but not 'inline'. At least when\ncompiled by gcc, with the default -O2 optimization level, the function\nis actually inlined and leaves no static version in the ewah_bitmap.o\nand ewah_rlw.o object files. Despite this, add the missing 'inline'\nkeyword to better describe the intended behaviour.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n ewah/ewok_rlw.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/ewah/ewok_rlw.h b/ewah/ewok_rlw.h\nindex d487966935..bafa24f4c3 100644\n--- a/ewah/ewok_rlw.h\n+++ b/ewah/ewok_rlw.h\n@@ -31,7 +31,7 @@\n \n #define RLW_RUNNING_LEN_PLUS_BIT (((eword_t)1 << (RLW_RUNNING_BITS + 1)) - 1)\n \n-static int rlw_get_run_bit(const eword_t *word)\n+static inline int rlw_get_run_bit(const eword_t *word)\n {\n \treturn *word & (eword_t)1;\n }\n-- \n2.19.0\n"},{"id":"361746","messageId":"20181027062909.GB16664@sigill.intra.peff.net","threadId":"49694","inReplyTo":"1a465da6-d139-5880-72ff-c612b42c3b8f@ramsayjones.plus.com","subject":"Re: [PATCH 2/3] ewok_rlw.h: add missing 'inline' to function definition","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-10-27T06:29:09Z","receivedAt":"2018-10-27T06:29:12Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Oct 27, 2018 at 02:52:05AM +0100, Ramsay Jones wrote:\n\n> The 'ewok_rlw.h' header file contains the rlw_get_run_bit() function\n> definition, which is marked as 'static' but not 'inline'. At least when\n> compiled by gcc, with the default -O2 optimization level, the function\n> is actually inlined and leaves no static version in the ewah_bitmap.o\n> and ewah_rlw.o object files. Despite this, add the missing 'inline'\n> keyword to better describe the intended behaviour.\n\nYep, this makes sense. Thanks!\n\n-Peff\n"}]}