NOTE: this page is for archival only, see the note at the end of the page.

ath6kl coding style

  • Use ret to store return variables:

int ret;

ret = request_firmware(&fw_entry, filename, ar->dev);
if (ret)
        return ret;
  • Use err_<action> for error path labels:

ret = ath6kl_hif_power_on(ar);
if (ret)
        return ret;

ret = ath6kl_configure_target(ar);
if (ret)
        goto err_power_off;

ret = ath6kl_init_upload(ar);
if (ret)
        goto err_cleanup_target;

return 0;

err_cleanup_scatter:
        ath6kl_cleanup_target(ar);
err_power_off:
        ath6kl_hif_power_off(ar);
return ret;
  • Always document what lock/mutex/rcu actually protects.
  • Name of symbols follow style ath6kl_<file>_name.


This is a static dump of the old wiki, taken after locking it in January 2015. The new wiki is at https://wireless.wiki.kernel.org/.
versions of this page: last, v5, v4, v3, v2, v1