Skip to content

Commit

Permalink
net: ethernet: replace strict_strtoul() with kstrtoul()
Browse files Browse the repository at this point in the history
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jingoo Han authored and David S. Miller committed Jun 3, 2013
1 parent 0672f0a commit 67d6bfa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2774,7 +2774,7 @@ netxen_store_bridged_mode(struct device *dev,
if (adapter->is_up != NETXEN_ADAPTER_UP_MAGIC)
goto err_out;

if (strict_strtoul(buf, 2, &new))
if (kstrtoul(buf, 2, &new))
goto err_out;

if (!netxen_config_bridged_mode(adapter, !!new))
Expand Down Expand Up @@ -2813,7 +2813,7 @@ netxen_store_diag_mode(struct device *dev,
struct netxen_adapter *adapter = dev_get_drvdata(dev);
unsigned long new;

if (strict_strtoul(buf, 2, &new))
if (kstrtoul(buf, 2, &new))
return -EINVAL;

if (!!new != !!(adapter->flags & NETXEN_NIC_DIAG_ENABLED))
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static ssize_t qlcnic_store_bridged_mode(struct device *dev,
if (!test_bit(__QLCNIC_DEV_UP, &adapter->state))
goto err_out;

if (strict_strtoul(buf, 2, &new))
if (kstrtoul(buf, 2, &new))
goto err_out;

if (!qlcnic_config_bridged_mode(adapter, !!new))
Expand Down Expand Up @@ -77,7 +77,7 @@ static ssize_t qlcnic_store_diag_mode(struct device *dev,
struct qlcnic_adapter *adapter = dev_get_drvdata(dev);
unsigned long new;

if (strict_strtoul(buf, 2, &new))
if (kstrtoul(buf, 2, &new))
return -EINVAL;

if (!!new != !!(adapter->flags & QLCNIC_DIAG_ENABLED))
Expand Down

0 comments on commit 67d6bfa

Please sign in to comment.