Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Feb 2025 16:47:11 +0300
From:      Eygene Ryabinkin <rea@freebsd.org>
To:        jsm@freebsd.org, adrian@freebsd.org
Cc:        dev-ci@freebsd.org
Subject:   Re: FreeBSD-main-amd64-gcc13_build - Build #2837 - Still Failing
Message-ID:  <Z6ix343BygnVCJDb@light.codelabs.ru>
In-Reply-To: <1655522310.793.1739106980888@jenkins.ci.freebsd.org> <761769956.791.1739106205086@jenkins.ci.freebsd.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Gentlemen, good day.

Jenkins passed me the following build errors, since I had receintly
committed to the HEAD (ports-committers.dot).  My commit was unrelated
to those build failures, but attached is the patch that fixes
the code of mtw_mcu_radio(): it passes wrond 3-rd argument to the
mtw_mcu_cmd().  Also checked that other invocations of mtw_mcu_cmd()
are fine.

jenkins-admin@FreeBSD.org wrote at around Sun, Feb 09, 2025 at 01:03:21PM +0000:
> FreeBSD-main-amd64-gcc13_build - Build #2837 (c945a7832f94c6a46375596f298f6140640722cd) - Still Failing
> 
> Build information: https://ci.FreeBSD.org/job/FreeBSD-main-amd64-gcc13_build/2837/
> Full change log: https://ci.FreeBSD.org/job/FreeBSD-main-amd64-gcc13_build/2837/changes
> Full build log: https://ci.FreeBSD.org/job/FreeBSD-main-amd64-gcc13_build/2837/console
> 
> Change summaries:
> (Those commits are likely but not certainly responsible)
> 
> c945a7832f94c6a46375596f298f6140640722cd by rea:
> Ports committers: add myself
> 
> 
> 
> The end of the build log:
> 
> [...truncated 126.38 MiB...]
[...]
> --- all_subdir_usb/mtw ---
> In file included from /workspace/src/sys/dev/usb/wlan/if_mtw.c:27:
> In function 'mtw_mcu_cmd',
>     inlined from 'mtw_mcu_radio' at /workspace/src/sys/dev/usb/wlan/if_mtw.c:4387:10,
>     inlined from 'mtw_init_locked' at /workspace/src/sys/dev/usb/wlan/if_mtw.c:4513:2,
>     inlined from 'mtw_parent' at /workspace/src/sys/dev/usb/wlan/if_mtw.c:3490:3:
> /workspace/src/sys/sys/systm.h:283:33: warning: '__builtin_memcpy' forming offset [4, 15] is out of the bounds [0, 4] of object 'val' with type 'uint32_t' {aka 'unsigned int'} [-Warray-bounds=]
>   283 | #define memcpy(to, from, len)   __builtin_memcpy((to), (from), (len))
>       |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /workspace/src/sys/dev/usb/wlan/if_mtw.c:1407:9: note: in expansion of macro 'memcpy'
>  1407 |         memcpy(&sc->txd_fw[sc->sc_idx]->fw, buf, len);
>       |         ^~~~~~
> /workspace/src/sys/dev/usb/wlan/if_mtw.c: In function 'mtw_parent':
> /workspace/src/sys/dev/usb/wlan/if_mtw.c:4390:1: note: 'val' declared here
>  4390 | mtw_init_locked(struct mtw_softc *sc)
>       | ^~~~~~~~~~~~~~~


jenkins-admin@FreeBSD.org wrote at around Sun, Feb 09, 2025 at 01:16:17PM +0000:
> FreeBSD-main-amd64-gcc12_build - Build #4957 (c945a7832f94c6a46375596f298f6140640722cd) - Still Failing
> 
> Build information: https://ci.FreeBSD.org/job/FreeBSD-main-amd64-gcc12_build/4957/
> Full change log: https://ci.FreeBSD.org/job/FreeBSD-main-amd64-gcc12_build/4957/changes
> Full build log: https://ci.FreeBSD.org/job/FreeBSD-main-amd64-gcc12_build/4957/console
> 
> Change summaries:
> (Those commits are likely but not certainly responsible)
> 
> c945a7832f94c6a46375596f298f6140640722cd by rea:
> Ports committers: add myself
> 
> 
> 
> The end of the build log:
> 
> [...truncated 125.71 MiB...]
[...]
> --- all_subdir_usb/mtw ---
> In file included from /workspace/src/sys/dev/usb/wlan/if_mtw.c:27:
> In function 'mtw_mcu_cmd',
>     inlined from 'mtw_mcu_radio' at /workspace/src/sys/dev/usb/wlan/if_mtw.c:4387:10,
>     inlined from 'mtw_init_locked' at /workspace/src/sys/dev/usb/wlan/if_mtw.c:4513:2,
>     inlined from 'mtw_parent' at /workspace/src/sys/dev/usb/wlan/if_mtw.c:3490:3:
> /workspace/src/sys/sys/systm.h:283:33: warning: '__builtin_memcpy' forming offset [4, 15] is out of the bounds [0, 4] of object 'val' with type 'uint32_t' {aka 'unsigned int'} [-Warray-bounds]
>   283 | #define memcpy(to, from, len)   __builtin_memcpy((to), (from), (len))
>       |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /workspace/src/sys/dev/usb/wlan/if_mtw.c:1407:9: note: in expansion of macro 'memcpy'
>  1407 |         memcpy(&sc->txd_fw[sc->sc_idx]->fw, buf, len);
>       |         ^~~~~~
> /workspace/src/sys/dev/usb/wlan/if_mtw.c: In function 'mtw_parent':

Please, review and, possibly, commit.

Thank you.
-- 
rea

[-- Attachment #2 --]
From 0593d4180ef04f4d720605b25730431ea33d5825 Mon Sep 17 00:00:00 2001
From: Eygene Ryabinkin <rea@FreeBSD.org>
Date: Sun, 9 Feb 2025 16:40:32 +0300
Subject: [PATCH] if_mtw: fix build

mtw_mcu_radio() should use 'cmd', not 'val' for mtw_mcu_cmd().

Signed-off-by: Eygene Ryabinkin <rea@FreeBSD.org>
---
 sys/dev/usb/wlan/if_mtw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/usb/wlan/if_mtw.c b/sys/dev/usb/wlan/if_mtw.c
index ecd4693e2361..d7970af5d876 100644
--- a/sys/dev/usb/wlan/if_mtw.c
+++ b/sys/dev/usb/wlan/if_mtw.c
@@ -4384,7 +4384,7 @@ mtw_mcu_radio(struct mtw_softc *sc, int func, uint32_t val)
 	cmd.r2 = htole32(val);
 	cmd.r3 = 0;
 	cmd.r4 = 0;
-	return (mtw_mcu_cmd(sc, 8, &val, sizeof(struct mtw_mcu_cmd_16)));
+	return (mtw_mcu_cmd(sc, 8, &cmd, sizeof(struct mtw_mcu_cmd_16)));
 }
 static void
 mtw_init_locked(struct mtw_softc *sc)
-- 
2.44.0

help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Z6ix343BygnVCJDb>