• J
    i40e: update data pointer directly when copying to the buffer · e08696dc
    Jacob Keller 提交于
    A future patch is going to add a helper function i40e_add_ethtool_stats
    that will help lower the amount of boiler plate code in the
    i40e_get_ethtool_stats function.
    
    This conversion will take place over many patches, and the helper
    function will work by directly updating a reference to the data pointer.
    
    Since this would not work combined with the current method of accessing
    data like an array, update all the code that copies stats into the data
    buffer to use direct updates to the pointer instead of array accesses.
    
    This will prevent incorrect stat updates for patches in between the
    conversion.
    
    Similarly, when copying strings, we used a separate char *p pointer.
    Instead, use the data pointer directly as it's already a (u8 *) type
    which is the same size.
    Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
    Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
    e08696dc
i40e_ethtool.c 143.2 KB