lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 9 Dec 2009 16:53:35 -0800
From:	"Rose, Gregory V" <gregory.v.rose@...el.com>
To:	Simon Horman <horms@...ge.net.au>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"gospo@...hat.com" <gospo@...hat.com>,
	"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com>
Subject: RE: [RFC PATCH 01/12] ixgbe: Mailbox header and code module

>-----Original Message-----
>From: Simon Horman [mailto:horms@...ge.net.au]
>Sent: Wednesday, December 09, 2009 4:50 PM
>To: Kirsher, Jeffrey T
>Cc: netdev@...r.kernel.org; gospo@...hat.com; Rose, Gregory V;
>Waskiewicz Jr, Peter P
>Subject: Re: [RFC PATCH 01/12] ixgbe: Mailbox header and code module
>

[Rose, Gregory V] 

Further snippage

>
>> +/**
>> + *  ixgbe_init_mbx_params_pf - set initial values for pf mailbox
>> + *  @hw: pointer to the HW structure
>> + *
>> + *  Initializes the hw->mbx struct to correct values for pf mailbox
>> + */
>> +s32 ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw)
>> +{
>> +	struct ixgbe_mbx_info *mbx = &hw->mbx;
>> +
>> +	if (hw->mac.type == ixgbe_mac_82599EB) {
>> +		mbx->timeout = 0;
>> +		mbx->usec_delay = 0;
>> +
>> +		mbx->size = IXGBE_VFMAILBOX_SIZE;
>> +
>> +		mbx->stats.msgs_tx = 0;
>> +		mbx->stats.msgs_rx = 0;
>> +		mbx->stats.reqs = 0;
>> +		mbx->stats.acks = 0;
>> +		mbx->stats.rsts = 0;
>> +	}
>> +
>> +	return 0;
>> +}
>
>Does ixgbe_init_mbx_params_pf() need a return value?
>The only caller seems to ignore it.
[Rose, Gregory V] 

I guess not then.  Noted.

>
>Also, I prefer the following idiom, but in this case
>it doesn't seem to offer any advantage:
>
>void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw)
>{
>	struct ixgbe_mbx_info *mbx = &hw->mbx;
>
>	if (hw->mac.type != ixgbe_mac_82599EB)
>		return;
>
>	mbx->timeout = 0;
>	mbx->usec_delay = 0;
>
>	mbx->size = IXGBE_VFMAILBOX_SIZE;
>
>	mbx->stats.msgs_tx = 0;
>	mbx->stats.msgs_rx = 0;
>	mbx->stats.reqs = 0;
>	mbx->stats.acks = 0;
>	mbx->stats.rsts = 0;
>}
[Rose, Gregory V] 

Fewer lines of unnecessary text are a good thing.  Also noted.

- Greg

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ