lkml.org 
[lkml]   [2023]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH ethtool] hns3: add support dump registers for hns3 driver
From

on 2023/8/28 7:20, Michal Kubecek wrote:
>> +#pragma pack(4)
>> +struct hns3_reg_tlv {
>> + u16 tag;
>> + u16 len;
>> +};
>> +
>> +struct hns3_reg_header {
>> + u64 magic_number;
>> + u8 is_vf;
>> + u8 rsv[7];
>> +};
>> +
>> +#pragma pack()
> Could we please avoid these #pragma directives? AFAIK this is a Microsoft
> extension, which, while implemented in gcc for compatibility reasons, is
> not very common in linux world. To be honest, I had to search the web to
> see what exactly does it do - and even after that, only checking the object
> file with gdb revealed that it does not really do anything except weakening
> the alignment of struct hns3_reg_header (as a whole). Given how the
> structure is used in this file, the only practical effect would be
> header_len in hns3_dump_regs() being 12 rather than 16 (on 64-bit
> architectures).
>
> Michal

okay, I will remove it in v2


Thanks,

Jijie Shao

\
 
 \ /
  Last update: 2023-08-29 08:50    [W:0.266 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site