mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jijie Shao <shaojijie@huawei.com>
To: Michal Kubecek <mkubecek@suse.cz>
Cc: <shaojijie@huawei.com>, <mkubeck@suse.cz>,
	<yisen.zhuang@huawei.com>, <salil.mehta@huawei.com>,
	<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <shenjian15@huawei.com>,
	<wangjie125@huawei.com>, <liuyonglong@huawei.com>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH ethtool] hns3: add support dump registers for hns3 driver
Date: Tue, 29 Aug 2023 14:46:48 +0800	[thread overview]
Message-ID: <b33101ca-c5f8-be9e-7759-4d044c2fd340@huawei.com> (raw)
In-Reply-To: <20230827232008.tjcuolelsdhh7o44@lion.mk-sys.cz>


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


      reply	other threads:[~2023-08-29  6:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18  8:56 Jijie Shao
2023-08-23  3:15 ` Jijie Shao
2023-08-27 23:20 ` Michal Kubecek
2023-08-29  6:46   ` Jijie Shao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b33101ca-c5f8-be9e-7759-4d044c2fd340@huawei.com \
    --to=shaojijie@huawei.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuyonglong@huawei.com \
    --cc=mkubecek@suse.cz \
    --cc=mkubeck@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=salil.mehta@huawei.com \
    --cc=shenjian15@huawei.com \
    --cc=wangjie125@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®