Skip to content

Commit

Permalink
igb: Add comment
Browse files Browse the repository at this point in the history
Add explanatory comment to avoid confusion when a pointer is set
to the second word of an array instead of the customary cast of a
pointer to the beginning of the array.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Greg Rose authored and David S. Miller committed Jul 2, 2010
1 parent 8d420a1 commit de42edd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4974,6 +4974,10 @@ static void igb_vf_reset_msg(struct igb_adapter *adapter, u32 vf)

static int igb_set_vf_mac_addr(struct igb_adapter *adapter, u32 *msg, int vf)
{
/*
* The VF MAC Address is stored in a packed array of bytes
* starting at the second 32 bit word of the msg array
*/
unsigned char *addr = (char *)&msg[1];
int err = -1;

Expand Down

0 comments on commit de42edd

Please sign in to comment.