Subject: Re: [PATCH net-next v2 3/7] qlcnic: Enhanced channel configuration logs

From: Sergei Shtylyov <[email-masked]>
Date: Wed, 17 Apr 2013 21:48:01 +0400

Hello.

On 04/17/2013 09:05 PM, Shahed Shaikh wrote:

> From: Manish Chopra <[email-masked]>
>
> Signed-off-by: Manish Chopra <[email-masked]>
> Signed-off-by: Shahed Shaikh <[email-masked]>
[...]
> diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
> index edbc85f..f35c504 100644
> --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
> +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
> @@ -3240,20 +3240,41 @@ qlcnicvf_start_firmware(struct qlcnic_adapter *adapter)
>   	return err;
>   }
>   
> -int qlcnic_validate_max_rss(u8 max_hw, u8 val)
> +int qlcnic_validate_max_rss(struct qlcnic_adapter *adapter,
> +			    __u32 val)
>   {
[...]
> -	if ((val > max_allowed) || (val < 2) || !is_power_of_2(val)) {
> -		pr_info("rss_ring valid range [2 - %x] in powers of 2\n",
> -			max_allowed);
> +
> +	if ((val > max_allowed) || (val <  2) || !is_power_of_2(val)) {

    Too many spaces between < and 2. And () not needed around > and <.
This line overall looks like random unneeded change.

> +		if (val > num_online_cpus())
> +			netdev_err(netdev,
> +				   "RSS value should not be higher than[%u], the max number of CPUs in the system\n",
> +				   num_online_cpus());

    num_online_cpus() doesn't yield the max number of CPUs in the system,
it yields what it says, number of online CPUs.

WBR, Sergei