Compare commits

..

4 Commits

Author SHA1 Message Date
Marc Kleine-Budde 1520ab5b98
Merge pull request #620 from marckleinebudde/mcp251xfd-fix-strchr
mcp251xfd: mcp251xfd_regmap_read(): don't assign return value of `strchr()` to `char *`
2026-03-04 11:38:43 +01:00
Marc Kleine-Budde aa902ae2af mcp251xfd: mcp251xfd_regmap_read(): don't assign return value of strchr() to `char *`
The `file_path` of `strchr(file_path, '/')` is a `const char *`. In this
case the `strchr()` in debian experimental returns a `const char *`,
leading to this error message:

```
mcp251xfd/mcp251xfd-regmap.c:75:13: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
   75 |         tmp = strchr(file_path, '/');
      |             ^
```

Fix the error by using the return value from `strchr()` directly in the
`if()`.

Link: https://github.com/linux-can/can-utils/actions/runs/22649777324/job/65679726209?pr=619
2026-03-04 11:35:38 +01:00
Marc Kleine-Budde a0b592178e
Merge pull request #621 from marckleinebudde/remove-mips
github-actions: remove mips for now

Closes: https://github.com/linux-can/can-utils/issues/611
2026-03-04 11:34:12 +01:00
Marc Kleine-Budde 4f2fdecfba github-actions: remove mips for now
It's being phased out on Ubuntu rolling release.
2026-03-04 11:30:14 +01:00
2 changed files with 1 additions and 10 deletions

View File

@ -75,7 +75,6 @@ jobs:
gcc \
gcc-aarch64-linux-gnu \
gcc-arm-linux-gnueabihf \
gcc-mips-linux-gnu \
libgps-dev \
make
@ -139,13 +138,6 @@ jobs:
podman exec -i stable cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=cmake/${toolchain}.cmake -DENABLE_WERROR=ON -DENABLE_GPS=${gps} -B build-${toolchain}
podman exec -i stable cmake --build build-${toolchain}
- name: Configure & Build with mips-linux-gnu-gcc
env:
toolchain: mips-linux-gnu-gcc
run: |
podman exec -i stable cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=cmake/${toolchain}.cmake -DENABLE_WERROR=ON -B build-${toolchain}
podman exec -i stable cmake --build build-${toolchain}
- name: Configure & Build with gcc (Makefile)
env:
cc: gcc

View File

@ -72,8 +72,7 @@ int mcp251xfd_regmap_read(struct mcp251xfd_priv *priv,
return 0;
/* maybe it's something like "spi0.0" */
tmp = strchr(file_path, '/');
if (tmp)
if (strchr(file_path, '/'))
return -ENOENT;
/* first try literally */