Go back –> ath6kl
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.
- For each component use function names create/destroy for allocating and freeing something, init/cleanup for initialising variables and cleaning up them afterwards and start/stop to temporarily pause something.
Follow Linux Coding Style.