From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Andreas Noever <andreas.noever@gmail.com>,
Mika Westerberg <westeri@kernel.org>,
Yehezkel Bernat <YehezkelShB@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Michael Jamet <michael.jamet@intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Yehezkel Bernat <yehezkel.bernat@intel.com>
Subject: Re: [PATCH 6/6] thunderbolt: property: Make entry key modifications more visible
Date: Wed, 3 Jun 2026 03:25:45 +0300 [thread overview]
Message-ID: <ah90iSyO3ct0ulTV@ashevche-desk.local> (raw)
In-Reply-To: <20260524-thunderbolt-big-endian-v1-6-6044edca78e7@weissschuh.net>
On Sun, May 24, 2026 at 03:06:48PM +0200, Thomas Weißschuh wrote:
> The modification of the key directly through the entry pointer is
> confusing. Explicitly use the key member.
...
> struct tb_property_entry {
> - __le32 key_hi;
> - __le32 key_lo;
> + u8 key[TB_PROPERTY_KEY_SIZE];
> __le16 length;
> u8 reserved;
> u8 type;
> if (!tb_property_entry_valid(entry, block_len))
> return NULL;
>
> - convert_dwdata(key, entry, 2);
> + convert_dwdata(key, &entry->key, 2);
> key[TB_PROPERTY_KEY_SIZE] = '\0';
>
> property = tb_property_alloc(key, entry->type);
> list_for_each_entry(property, &dir->properties, list) {
> const struct tb_property_dir *child;
>
> - convert_dwdata(entry, property->key, 2);
> + convert_dwdata(&entry->key, property->key, 2);
In such case this should use the get_unaligned_le64() or le64_to_cpu() rather
than this strange thing...
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-06-03 0:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-24 13:06 [PATCH 0/6] thunderbolt: property: Fix property parsing on big-endian Thomas Weißschuh
2026-05-24 13:06 ` [PATCH 1/6] thunderbolt: test: Make root_directory independent of host byte order Thomas Weißschuh
2026-05-24 13:06 ` [PATCH 2/6] thunderbolt: property: Unify format_dwdata()/parse_dwdata() Thomas Weißschuh
2026-06-03 0:19 ` Andy Shevchenko
2026-05-24 13:06 ` [PATCH 3/6] thunderbolt: property: Make format_dwdata() work on big-endian systems Thomas Weißschuh
2026-06-03 0:21 ` Andy Shevchenko
2026-05-24 13:06 ` [PATCH 4/6] thunderbolt: property: Convert byte order of numeric fields Thomas Weißschuh
2026-05-24 13:06 ` [PATCH 5/6] thunderbolt: property: Unify parse_dwdata()/format_dwdata() Thomas Weißschuh
2026-06-03 0:23 ` Andy Shevchenko
2026-05-24 13:06 ` [PATCH 6/6] thunderbolt: property: Make entry key modifications more visible Thomas Weißschuh
2026-06-03 0:25 ` Andy Shevchenko [this message]
2026-05-25 9:35 ` [PATCH 0/6] thunderbolt: property: Fix property parsing on big-endian Mika Westerberg
2026-05-25 10:32 ` Thomas Weißschuh
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=ah90iSyO3ct0ulTV@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=michael.jamet@intel.com \
--cc=mika.westerberg@linux.intel.com \
--cc=westeri@kernel.org \
--cc=yehezkel.bernat@intel.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