Luca Coelho <[email protected]> writes:
> From: Shahar S Matityahu <[email protected]>
>
> Allow to change or read the debug domain bitmap at runtime via
> fw_dbg_domain debugfs.
>
> Signed-off-by: Shahar S Matityahu <[email protected]>
> Signed-off-by: Luca Coelho <[email protected]>
[...]
> +static ssize_t iwl_dbgfs_fw_dbg_domain_write(struct iwl_fw_runtime *fwrt,
> + char *buf, size_t count)
> +{
> + u32 new_domain;
> + long val;
> + int ret;
> +
> + if (!iwl_trans_fw_running(fwrt->trans))
> + return -EIO;
> +
> + ret = kstrtol(buf, 0, &val);
> + if (ret)
> + return ret;
> +
> + new_domain = (u32)val;
Why not use kstrtou32()? Then there's no need to cast anything.
--
Kalle Valo