Skip to contentSkip to conversation

firewire: core: fix type of transaction data in config ROM parser test

PATCH Applied Takashi Sakamoto 1 participant 2 messages Sep 8 – Sep 9 Firewire

lore
Share & tools
lore

Takashi Sakamoto

author maintainer
#0 lore raw

PATCH 1/1 firewire: core: fix type of transaction data in config ROM parser test

The type of transaction data should be __be32 in the stub function for the asynchronous transactions.

Fixes 23e0d2e849eb ("firewire: core: add test to detect irm-is-1394-1995-only quirk in config ROM parser")
Fixes f8e5070bf292 ("firewire: core: add test to avoid excessive configuration ROM length")
---
 drivers/firewire/config-rom-parser-test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firewire/config-rom-parser-test.c +2 -2
index e5c173353057..45f1ead326c5 100644
@@ -206,7 +206,7 @@ static int stub_run_transaction_regular(struct fw_card *card, int tcode, int des
 	KUNIT_ASSERT_EQ(test, length, 4);
 
 	unsigned int index = (offset - (CSR_REGISTER_BASE | CSR_CONFIG_ROM)) / sizeof(u32);
-	u32 *quadlet = payload;
+	__be32 *quadlet = payload;
 
 	KUNIT_EXPECT_LE(test, speed, param->expected_speed);
 	KUNIT_EXPECT_LT(test, index, param->quadlet_length);
@@ -264,7 +264,7 @@ static int stub_run_transaction_malformed(struct fw_card *card, int tcode, int d
 	KUNIT_ASSERT_EQ(test, length, 4);
 
 	unsigned int index = (offset - (CSR_REGISTER_BASE | CSR_CONFIG_ROM)) / sizeof(u32);
-	u32 *quadlet = payload;
+	__be32 *quadlet = payload;
 
 	if (index < ARRAY_SIZE(config_rom_first_part))
 		*quadlet = cpu_to_be32(config_rom_first_part[index]);
Signature · 1 line
2.53.0
author maintainer Applied
#1 lore raw

Hi,

Quoted 11 lines · Takashi Sakamoto

The type of transaction data should be __be32 in the stub function for the asynchronous transactions.

Fixes 23e0d2e849eb ("firewire: core: add test to detect irm-is-1394-1995-only quirk in config ROM parser")
Fixes f8e5070bf292 ("firewire: core: add test to avoid excessive configuration ROM length")
---
 drivers/firewire/config-rom-parser-test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to for-next branch.

Regards

Takashi Sakamoto