mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Xi Ruoyao <xry111@xry111.site>,
	Huacai Chen <chenhuacai@kernel.org>,
	WANG Xuerui <kernel@xen0n.name>
Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org,
	loongson-kernel@lists.loongnix.cn
Subject: Re: [PATCH v1 3/4] LoongArch: Use larch_insn_gen_break() for kprobes
Date: Thu, 13 Apr 2023 09:58:53 +0800	[thread overview]
Message-ID: <3249ca98-6293-a83d-d49b-d1d52827a062@loongson.cn> (raw)
In-Reply-To: <bf4bda7a88bd5f33bd3bdc7fc715bc24fa4add8f.camel@xry111.site>



On 04/12/2023 07:08 PM, Xi Ruoyao wrote:
> On Wed, 2023-04-12 at 18:05 +0800, Tiezhu Yang wrote:
>> -static inline bool insns_not_supported(union loongarch_instruction insn)
>> +static inline bool insns_not_supported(u32 code)
>>  {
>> +       union loongarch_instruction insn;
>> +
>> +       insn.word = code;
>> +
>
> I remember Xuerui disliked this change.  Maybe we can add
> __attribute__ (__transparent_union__) [1] for union
> loongarch_instruction instead?
>
> [1]: https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-transparent_005funion-type-attribute
>

OK, let me pass union parameter, then define a local variable
to do type conversion for callers, the changes are small and
then the code may be more readable, thank you.

Thanks,
Tiezhu


  reply	other threads:[~2023-04-13  1:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12 10:04 [PATCH v1 0/4] Add uprobes support for LoongArch Tiezhu Yang
2023-04-12 10:04 ` [PATCH v1 1/4] LoongArch: Move three functions from kprobes.c to inst.h Tiezhu Yang
2023-04-12 10:39   ` Xi Ruoyao
2023-04-13  1:55     ` Tiezhu Yang
2023-04-12 10:04 ` [PATCH v1 2/4] LoongArch: Add larch_insn_gen_break() to generate break insns Tiezhu Yang
2023-04-12 10:05 ` [PATCH v1 3/4] LoongArch: Use larch_insn_gen_break() for kprobes Tiezhu Yang
2023-04-12 11:08   ` Xi Ruoyao
2023-04-13  1:58     ` Tiezhu Yang [this message]
2023-04-12 10:05 ` [PATCH v1 4/4] LoongArch: Add uprobes support Tiezhu Yang

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=3249ca98-6293-a83d-d49b-d1d52827a062@loongson.cn \
    --to=yangtiezhu@loongson.cn \
    --cc=chenhuacai@kernel.org \
    --cc=kernel@xen0n.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=loongson-kernel@lists.loongnix.cn \
    --cc=xry111@xry111.site \
    /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®