Search Linux Wireless

Re: [PATCH v2 12/16] iwlwifi: dbg_ini: support domain changing via debugfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luca Coelho <luca@xxxxxxxxx> writes:

> From: Shahar S Matityahu <shahar.s.matityahu@xxxxxxxxx>
>
> Allow to change or read the debug domain bitmap at runtime via
> fw_dbg_domain debugfs.
>
> Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@xxxxxxxxx>
> Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx>

[...]

> +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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux