[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cde8ad34-0114-4cf4-b757-12ea6763a44a@lunn.ch>
Date: Fri, 15 Dec 2023 15:33:11 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Tobias Waldekranz <tobias@...dekranz.com>
Cc: davem@...emloft.net, kuba@...nel.org, linux@...linux.org.uk,
kabel@...nel.org, hkallweit1@...il.com, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
netdev@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH net-next 1/4] net: phy: marvell10g: Support firmware
loading on 88X3310
> + for (i = 0, csum = 0; i < hdr->data.size; i++)
> + csum += data[i];
> + for (sect = fw->data; (sect + sizeof(hdr)) < (fw->data + fw->size);) {
> + memcpy(&hdr, sect, sizeof(hdr));
> + hdr.data.size = cpu_to_le32(hdr.data.size);
hdr.data.size is little endian. Doing a for loop using a little endian
test seems wrong. Should this actually be le32_to_cpu()?
Andrew
Powered by blists - more mailing lists