[PATCH v3 0/3] enable drivers to be compiled with MSVC
David Marchand
david.marchand at redhat.com
Mon Jun 23 16:02:42 CEST 2025
On Thu, Jun 12, 2025 at 4:17 PM Andre Muezerie
<andremue at linux.microsoft.com> wrote:
>
> This patchset solves the last issues preventing drivers from being
> compiled with MSVC (array range initialization) and enables the
> drivers to be built with it.
>
> Array range initialization is non-standard and is not provided by
> all compilers. MSVC does not implement it and ends up emitting
> errors like the one below:
>
> drivers/net/r8169/r8169_phy.c(380):
> error C2143: syntax error: missing ':' before '...'
> case CFG_METHOD_48 ... CFG_METHOD_57:
>
> The fix is to explicitly initialize each element in the range.
>
> v3:
> - Add a patch to enable drivers to be compiled with MSVC.
>
> v2:
> - Rebase on top of latest main.
>
> Andre Muezerie (3):
> app/test: remove use of non-standard array range initialization
> drivers/net: remove use of non-standard array range initialization
> drivers: enable drivers to be compiled with MSVC
>
> app/test/test_cryptodev_zuc_test_vectors.h | 156 ++++++-
> drivers/meson.build | 4 -
> drivers/net/octeon_ep/otx_ep_mbox.c | 24 +-
> drivers/net/r8169/base/rtl8125a_mcu.c | 8 +-
> drivers/net/r8169/base/rtl8126a.c | 5 +-
> drivers/net/r8169/r8169_ethdev.c | 34 +-
> drivers/net/r8169/r8169_hw.c | 447 ++++++++++++++++++---
> drivers/net/r8169/r8169_phy.c | 163 +++++++-
> drivers/net/r8169/r8169_rxtx.c | 25 +-
> 9 files changed, 770 insertions(+), 96 deletions(-)
Recheck-request: rebase=main, iol-compile-amd64-testing, iol-unit-amd64-testing
--
David Marchand
More information about the dev
mailing list