<p><b>@benpicco</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/10556#discussion_r321970780">drivers/pca9685/pca9685.c</a>:</p>
<pre style='color:#555'>> +
+    /* read current register value */
+    EXEC_RET(_read(dev, reg, &byte, 1));
+
+    /* set masked bits to the given value  */
+    _set_reg_bit(&byte, mask, data);
+
+    /* write back new register value */
+    EXEC_RET(_write(dev, reg, &byte, 1));
+
+    return PCA9685_OK;
+}
+
+static void _set_reg_bit(uint8_t *byte, uint8_t mask, uint8_t bit)
+{
+    ASSERT_PARAM(byte != NULL);
</pre>
<p>Seems a bit excessive, this is an internal function that gets only called on local variables.<br>
Maybe the compiler will even optimise it away.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/10556?email_source=notifications&email_token=ABE7WYHTYRX7EYYXY7PJRELQIO2CHA5CNFSM4GIYIQY2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCD7WPJA#pullrequestreview-285173668">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYHWMVGQV5WHULT7NALQIO2CHANCNFSM4GIYIQYQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYHAZEQ6HU6F7NM3JQTQIO2CHA5CNFSM4GIYIQY2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCD7WPJA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/10556?email_source=notifications\u0026email_token=ABE7WYHTYRX7EYYXY7PJRELQIO2CHA5CNFSM4GIYIQY2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCD7WPJA#pullrequestreview-285173668",
"url": "https://github.com/RIOT-OS/RIOT/pull/10556?email_source=notifications\u0026email_token=ABE7WYHTYRX7EYYXY7PJRELQIO2CHA5CNFSM4GIYIQY2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCD7WPJA#pullrequestreview-285173668",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>