+#pragma pack(4)Could we please avoid these #pragma directives? AFAIK this is a Microsoft
+struct hns3_reg_tlv {
+ u16 tag;
+ u16 len;
+};
+
+struct hns3_reg_header {
+ u64 magic_number;
+ u8 is_vf;
+ u8 rsv[7];
+};
+
+#pragma pack()
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