openwrt/staging/blogic.git
18 months agokernel: bump 5.15 to 5.15.111
John Audia [Fri, 12 May 2023 16:33:18 +0000 (12:33 -0400)]
kernel: bump 5.15 to 5.15.111

Removed upstreamed:
01. backport-5.15/424-v6.4-0001-mtd-core-provide-unique-name-for-nvmem-device-take-t.patch
02. backport-5.15/424-v6.4-0002-mtd-core-fix-nvmem-error-reporting.patch
03. generic-backport/424-v6.4-0003-mtd-core-fix-error-path-for-nvmem-provider.patch
04. generic-backport/828-v6.4-0001-of-Fix-modalias-string-generation.patch
05. bcm4908/patches-5.15/031-v5.17-0002-arm64-dts-broadcom-bcm4908-add-DT-for-Netgear-RAXE50.patch
06. bcm4908/patches-5.15/033-v6.0-0001-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM63158.patchgit
07. bcm4908/patches-5.15/033-v6.0-0002-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM4912.patchgita
08. bcm4908/patches-5.15/033-v6.0-0010-arm64-dts-Add-base-DTS-file-for-bcmbca-device-Asus-G.patchgit
09. bcm4908/patches-5.15/034-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch
10. bcm4908/patches-5.15/036-v6.4-0002-arm64-dts-broadcom-bcmbca-bcm4908-fix-NAND-interrupt.patch
11. bcm4908/patches-5.15/036-v6.4-0004-arm64-dts-broadcom-bcmbca-bcm4908-fix-procmon-nodena.patch
12. ipq806x/patches-5.15/104-v6.0-06-ARM-dts-qcom-ipq8064-reduce-pci-IO-size-to-64K.patch

Manually rebased:
bcm27xx/patches-5.15/950-0078-BCM2708-Add-core-Device-Tree-support.patch
bcm27xx/patches-5.15/950-0547-ARM-dts-Add-Pi-Zero-2-support.patch
bcm4908/patches-5.15/033-v6.0-0001-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM63158.patchgit
bcm4908/patches-5.15/033-v6.0-0002-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM4912.patchgit
bcm4908/patches-5.15/030-v5.16-0001-arm64-dts-broadcom-bcm4908-Fix-NAND-node-name.patch
bcm4908/patches-5.15/032-v5.18-0002-arm64-dts-broadcom-bcm4908-add-pinctrl-binding.patch
bcm4908/patches-5.15/032-v5.18-0003-arm64-dts-broadcom-bcm4908-add-watchdog-block.patch
bcm4908/patches-5.15/032-v5.18-0004-arm64-dts-broadcom-bcm4908-add-I2C-block.patch
bcm4908/patches-5.15/033-v6.0-0003-ARM64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6858.patchgit
bcm4908/patches-5.15/033-v6.0-0008-arm64-dts-broadcom-bcm4908-Fix-timer-node-for-BCM490.patchgit
bcm4908/patches-5.15/034-v6.1-0001-arm64-dts-broadcom-bcm4908-add-remaining-LED-pins.patch
bcm4908/patches-5.15/034-v6.1-0002-arm64-dts-broadcom-bcm4908-add-LEDs-controller-block.patch
bcm4908/patches-5.15/034-v6.1-0003-arm64-dts-broadcom-bcm4908-add-Asus-GT-AC5300-LEDs.patch
bcm4908/patches-5.15/034-v6.1-0004-arm64-dts-bcmbca-update-BCM4908-board-dts-files.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

01. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=77112d23a671697f0f70695ab901f807e15d2093
02. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=fe07b3b5af01f42b291f5da0da09d047f50b33a6
03. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=273be36e420924237f6c9d43cdad96718c13dd52
04. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=fe8ab85ed4958e58e991bba0aa0a655b552b0273
05. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=6ae67829fa5e9e71f458f69db42f0e216225616a
06. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=1994284cb9226b65ca3a6744ce3320218b584f26
07. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=a46878476c5549a4fde15a31922ce80a50b23492
08. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=112ff0f2530549d50510f116474924f9c4fad590
09. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=7c253e98685e6d884d12e2618ef4d2ad90b4fbd7
10. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=8444b46e163aa9559a0af0381a1d230ec4146eb2
11. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=6d1af517817a760d7af3dee0fc4603645485495c
12. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=cc4f0e168a5630ad0491ac5328f1a89f3cf3d04e

Signed-off-by: John Audia <therealgraysky@proton.me>
18 months agofortify-headers: fix build error when _REDIR_TIME64 is not defined
Georgi Valkov [Fri, 12 May 2023 23:22:12 +0000 (02:22 +0300)]
fortify-headers: fix build error when _REDIR_TIME64 is not defined

some targets do not define the _REDIR_TIME64 macro resulting in a
build error regression since ddfe5678a448ac8875e94f2fb4ddca67416fa14a
fix by checking if the macro is defined

[1] https://github.com/openwrt/openwrt/issues/12587

Fixes: #12587
Fixes: ddfe5678a448 ("fortify-headers: fix inconsistent time_t version of ppoll")
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
18 months agobridger: update to the latest version
Felix Fietkau [Fri, 12 May 2023 19:18:16 +0000 (21:18 +0200)]
bridger: update to the latest version

d4f56f0e6971 add support for handling traffic to/from the bridge device
3ea579064c00 nl: add separate socket for netlink commands
4ec5a51c6d01 nl: fetch packet stats for offloaded flows
0319fd080bf5 add support for configuring a fixed output port for a bridge member port
5b730f0c2cf5 bridger-bpf: fix build on older kernels
00af6c6e8350 nl: process IFLA_MASTER in any nl events, but skip wireless events
a2794f95756e bridger-bpf: add bpf_skb_pull_data call
6974093eb036 nl: rework vlan code to use the iflink API
d0f79a16c749 nl: do not attempt to enable flow offload on older kernels

Signed-off-by: Felix Fietkau <nbd@nbd.name>
18 months agoodhcp6c: add skpriority option
Pacien TRAN-GIRARD [Sun, 7 May 2023 22:46:11 +0000 (00:46 +0200)]
odhcp6c: add skpriority option

Allowing the (kernel) packet priority to be set through UCI.

This makes it straightforward to set some VLAN priority for DHCP
requests through a simple egress qos map. (Avoiding the need for
firewall matching and marking through iptables, which prevents using
flow offloading).

(Such priority tag is a hard requirement for some ISPs, such as Orange
in France).

Depends on: https://github.com/openwrt/odhcp6c/pull/74

Signed-off-by: Pacien TRAN-GIRARD <pacien.trangirard@pacien.net>
18 months agoodhcp6c: bump to latest git HEAD
Christian Marangi [Fri, 12 May 2023 11:15:55 +0000 (13:15 +0200)]
odhcp6c: bump to latest git HEAD

bcd2836 odhcp6c: add -K option to set packet kernel priority

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agobuild: remove backwards compatibility for PKG_USE_MIPS16
Andre Heider [Thu, 23 Mar 2023 09:13:43 +0000 (10:13 +0100)]
build: remove backwards compatibility for PKG_USE_MIPS16

All package feeds have been refactored to PKG_BUILD_FLAGS:=no-mips16.

Signed-off-by: Andre Heider <a.heider@gmail.com>
18 months agoramips: remove device tree legacy compatibility
Nick Hainke [Fri, 5 May 2023 04:26:12 +0000 (06:26 +0200)]
ramips: remove device tree legacy compatibility

We switched to 5.15 kernel, so we don't need to maintain 5.10
compatibility anymore.

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agotreewide: cleanup kernel symbol references
Nick Hainke [Thu, 4 May 2023 20:47:27 +0000 (22:47 +0200)]
treewide: cleanup kernel symbol references

We only use 5.15 kernel. So remove all those unnecessary symbols
referencing 5.10 or 5.15 kernel.

Can be found with:
  git grep -E 'LINUX_5_1(0|5)'

Note that we remove the dependency from "sound-soc-chipdip-dac" instead
of removing the complete kernel package. The 5.15 version bump forgot to
delete the "@LINUX_5_10" dependency. The kernel package is still needed
in 5.15 kernel.

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agotreewide: remove all @{lt,gt,ge,le} appearances affecting 5.10 kernel
Nick Hainke [Thu, 4 May 2023 19:40:15 +0000 (21:40 +0200)]
treewide: remove all @{lt,gt,ge,le} appearances affecting 5.10 kernel

We only use 5.15 kernel. So remove all those unnecessary appearances.

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agokernel: remove unnecessary qca-sdk patch for 5.10 kernel
Nick Hainke [Thu, 4 May 2023 19:38:25 +0000 (21:38 +0200)]
kernel: remove unnecessary qca-sdk patch for 5.10 kernel

We removed 5.10 kernel, so remove also the patch that only affects 5.10
kernels.

Manually refresh:
- 0005-SSDK-config-add-kernel-5.15.patch
- 0010-QSDK-config-Avoid-Werror-heroics.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agotoolchain: glibc: increase min kernel version to 5.15
Nick Hainke [Thu, 4 May 2023 19:34:21 +0000 (21:34 +0200)]
toolchain: glibc: increase min kernel version to 5.15

The purpose of this is to remove all of the compatibility code that is
normally compiled into glibc for kernels < 5.15 from our build. Only
Linux kernels >= 5.15 will be supported.

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agotreewide: remove files for building 5.10 kernel
Nick Hainke [Thu, 4 May 2023 19:13:33 +0000 (21:13 +0200)]
treewide: remove files for building 5.10 kernel

All targets are bumped to 5.15. Remove the old 5.10 patches, configs
and files using:

  find target/linux -iname '*-5.10' -exec rm -r {} \;

Further, remove the 5.10 include.

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agoath25: switch default kernel to 5.15
Nick Hainke [Fri, 5 May 2023 12:09:37 +0000 (14:09 +0200)]
ath25: switch default kernel to 5.15

Switch to kernel 5.15 although it is marked as source only. It is marked
as source only because nobody was able to test this device.

Merging this is important to finally branch a new release. We want to
get rid completely of 5.10 kernel. Without this commit we get following
error: "Missing kernel version/hash file for 5.10." Hopfully someone
will fix the board in the rc phase or it will be removed completly.

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agoath25: 5.15: enable 5.15 testing kernel
Nick Hainke [Wed, 28 Sep 2022 09:23:24 +0000 (11:23 +0200)]
ath25: 5.15: enable 5.15 testing kernel

Manually refreshed:
- 140-redboot_boardconfig.patch
- 141-redboot_partition_scan.patch
- 142-redboot_various_erase_size_fix.patch

Automatically refreshed:
- 107-ar5312_gpio.patch
- 108-ar2315_gpio.patch
- 110-ar2313_ethernet.patch
- 120-spiflash.patch
- 130-watchdog.patch
- 330-board_leds.patch

Use "make kernel_oldconfig" to refresh the new kernel config.

The Ubiquiti Nanostation 2 (XS2) and Ubiquiti Nanostation 5 (XS5) should
be marked as broken when switching to 5.15 by default. The new kernel
does not fit anymore into the partition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agoath25: 5:15: copy config and patch from 5.10
Nick Hainke [Wed, 28 Sep 2022 09:20:51 +0000 (11:20 +0200)]
ath25: 5:15: copy config and patch from 5.10

Copy config and patch from kernel 5.10 to kernel 5.15.

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agoomap: switch default kernel to 5.15
Alexey Smirnov [Mon, 19 Dec 2022 10:32:58 +0000 (13:32 +0300)]
omap: switch default kernel to 5.15

Switch to kernel 5.15 although it is marked as source only. It is marked
as source only because the eth0 interface can't be added to the br-lan
default interface resulting in a broken ethernet [0]. There is a
workaround to set a higher pvd (e.g. to 4000) in the dts [1].

Other functionality was already tested on a Beaglebone Black for
+6month now without issues.

Merging this is important to finally branch a new release. We want to
get rid completely of 5.10 kernel. Without this commit we get following
error: "Missing kernel version/hash file for 5.10." Hopfully someone
will fix the board in the rc phase.

- [0] https://github.com/openwrt/openwrt/issues/11953
- [1] https://github.com/openwrt/openwrt/issues/11953#issuecomment-1419078990

Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
[rewrite commit message]
Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agolantiq: 5.15: fix compilation warning pciex fixup patch
Christian Marangi [Fri, 12 May 2023 10:38:30 +0000 (12:38 +0200)]
lantiq: 5.15: fix compilation warning pciex fixup patch

pcibios_map_irq request a const pci_dev while pci_find_capability
doesn't. Cast dropping the const to fix compilation warning.
Fix compilation warning:
arch/mips/pci/fixup-lantiq.c: In function 'pcibios_map_irq':
arch/mips/pci/fixup-lantiq.c:34:33: error: passing argument 1 of 'pci_find_capability' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
   34 |         if (pci_find_capability(dev, PCI_CAP_ID_EXP))
      |                                 ^~~
In file included from arch/mips/pci/fixup-lantiq.c:9:
./include/linux/pci.h:1129:40: note: expected 'struct pci_dev *' but argument is of type 'const struct pci_dev *'
 1129 | u8 pci_find_capability(struct pci_dev *dev, int cap);
      |                        ~~~~~~~~~~~~~~~~^~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agolinux/generic/hack-5.15: add missing patch header
Florian Eckert [Fri, 12 May 2023 09:21:56 +0000 (11:21 +0200)]
linux/generic/hack-5.15: add missing patch header

This patch does not have a valid patch headers and does not apply on
an external git tree with 'git am'. To fix this add the missing header.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
18 months agofortify-headers: fix inconsistent time_t version of ppoll
Georgi Valkov [Wed, 10 May 2023 00:02:29 +0000 (03:02 +0300)]
fortify-headers: fix inconsistent time_t version of ppoll

Bug:
fortify/poll.h includes poll.h, which redirects ppoll to __ppoll_time64
if the _REDIR_TIME64 macro is 1. Then fortify/poll.h will #undef ppoll
and use the 32 bit version.

Fix: we should not do this when _REDIR_TIME64 is 1.

[1] https://forum.openwrt.org/t/idle-cpu-usage-of-usbmuxd/140331/15
[2] https://github.com/openwrt/openwrt/issues/12574

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
18 months agotoolchain: gcc: update to 12.3.0
Nick Hainke [Tue, 9 May 2023 21:47:01 +0000 (23:47 +0200)]
toolchain: gcc: update to 12.3.0

Release notes:
https://gcc.gnu.org/gcc-12/changes.html

Refresh patches:
- 230-musl_libssp.patch
- 910-mbsd_multi.patch
- 920-specs_nonfatal_getenv.patch
- 970-macos_arm64-building-fix.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agoramips: fix mt7621 kernel compilation
David Bauer [Fri, 12 May 2023 07:26:43 +0000 (09:26 +0200)]
ramips: fix mt7621 kernel compilation

The OF LED configuration patch fails on MT7621, as the necessary headers
were only included for the mediatek subtarget with an additional patch.

Fixes: 242fe8634eba ("generic: add hack for MT753x LED configuration")
Signed-off-by: David Bauer <mail@david-bauer.net>
18 months agokernel: ltq-deu: fix compilation warning
Christian Marangi [Thu, 11 May 2023 11:54:01 +0000 (13:54 +0200)]
kernel: ltq-deu: fix compilation warning

Fix compilation warning for fallthrough and unused variables.
Fix compilation warning:
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_des.c: In function 'ifx_deu_des':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_des.c:206:35: error: this statement may fall through [-Werror=implicit-fallthrough=]
  206 |                         des->K3LR = DEU_ENDIAN_SWAP(*((u32 *) key + 5));
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_des.c:209:17: note: here
  209 |                 case 16:
      |                 ^~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_des.c:211:35: error: this statement may fall through [-Werror=implicit-fallthrough=]
  211 |                         des->K2LR = DEU_ENDIAN_SWAP(*((u32 *) key + 3));
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_des.c:214:17: note: here
  214 |                 case 8:
      |                 ^~~~
cc1: all warnings being treated as errors

/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_aes.c: In function 'ifx_deu_aes':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_aes.c:260:21: error: unused variable 'ctx' [-Werror=unused-variable]
  260 |     struct aes_ctx *ctx = (struct aes_ctx *)ctx_arg;
      |                     ^~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_aes.c: In function 'ifx_deu_aes_xts':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_aes.c:702:21: error: unused variable 'ctx' [-Werror=unused-variable]
  702 |     struct aes_ctx *ctx = (struct aes_ctx *)ctx_arg;
      |                     ^~~
cc1: all warnings being treated as errors

/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_sha1.c: In function 'sha1_final':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_sha1.c:203:19: error: unused variable 'flag' [-Werror=unused-variable]
  203 |     unsigned long flag;
      |                   ^~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_sha1.c:202:33: error: unused variable 'hashs' [-Werror=unused-variable]
  202 |     volatile struct deu_hash_t *hashs = (struct deu_hash_t *) HASH_START;
      |                                 ^~~~~
cc1: all warnings being treated as errors

/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_md5.c: In function 'md5_init':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_md5.c:146:33: error: unused variable 'hash' [-Werror=unused-variable]
  146 |     volatile struct deu_hash_t *hash = (struct deu_hash_t *) HASH_START;
      |                                 ^~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_md5.c: In function 'md5_final':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_md5.c:204:19: error: unused variable 'flag' [-Werror=unused-variable]
  204 |     unsigned long flag;
      |                   ^~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-deu-danube/ltq-deu/ifxmips_md5.c:203:33: error: unused variable 'hashs' [-Werror=unused-variable]
  203 |     volatile struct deu_hash_t *hashs = (struct deu_hash_t *) HASH_START;
      |                                 ^~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: ltq-vmmc: fix compilation warning
Christian Marangi [Thu, 11 May 2023 10:28:13 +0000 (12:28 +0200)]
kernel: ltq-vmmc: fix compilation warning

Fix compilation warning from ret not handled from copy_from_user and
missing fallthrough.
Fix compilation warning:
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_vmmc-1.9.0/src/drv_vmmc_bbd.c: In function 'vmmc_BBD_WhiteListedCmdWr':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_vmmc-1.9.0/src/drv_vmmc_bbd.c:1012:16: error: this statement may fall through [-Werror=implicit-fallthrough=]
 1012 |             if (IFX_TRUE == pCh->pParent->bSlicSupportsIdleMode)
      |                ^
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_vmmc-1.9.0/src/drv_vmmc_bbd.c:1028:7: note: here
 1028 |       case VMMC_WL_SDD_RING_CFG:
      |       ^~~~
cc1: all warnings being treated as errors

/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_vmmc-1.9.0/src/drv_vmmc_ioctl.c: In function 'VMMC_Dev_Spec_Ioctl':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_vmmc-1.9.0/src/drv_vmmc_ioctl.c:111:15: error: ignoring return value of 'copy_from_user' declared with attribute 'warn_unused_result' [-Werror=unused-result]
  111 |               copy_from_user (p_arg, (IFX_uint8_t*)ioarg, sizeof(arg));\
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_vmmc-1.9.0/src/drv_vmmc_ioctl.c:475:7: note: in expansion of macro 'ON_IOCTL'
  475 |       ON_IOCTL((VMMC_CHANNEL *) pLLDummyCh,
      |       ^~~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_vmmc-1.9.0/src/drv_vmmc_ioctl.c:113:15: error: ignoring return value of 'copy_to_user' declared with attribute 'warn_unused_result' [-Werror=unused-result]
  113 |               copy_to_user ((IFX_uint8_t*)ioarg, p_arg, sizeof(arg));\
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_vmmc-1.9.0/src/drv_vmmc_ioctl.c:475:7: note: in expansion of macro 'ON_IOCTL'
  475 |       ON_IOCTL((VMMC_CHANNEL *) pLLDummyCh,
      |       ^~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: ltq-tapi: add patch fixing compilation warning
Christian Marangi [Thu, 11 May 2023 09:19:36 +0000 (11:19 +0200)]
kernel: ltq-tapi: add patch fixing compilation warning

Add patch fixing compilation warning for switch fallthrough and
copy_to_user ret not handled.
Fix compilation warning:
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_dial.c: In function 'ifx_tapi_dial_OnTimer':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_dial.c:318:38: error: this statement may fall through [-Werror=implicit-fallthrough=]
  318 |          pTapiDialData->nHookChanges = 0;
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_dial.c:322:7: note: here
  322 |       case TAPI_HOOK_STATE_DIAL_L_VAL:
      |       ^~~~
cc1: all warnings being treated as errors

/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_event.c: In function 'IFX_TAPI_Event_Dispatch_ProcessCtx':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_event.c:1546:30: error: this statement may fall through [-Werror=implicit-fallthrough=]
 1546 |                   pEvent->ch = IFX_TAPI_DEVICE_CH_NUMBER;
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_event.c:1548:16: note: here
 1548 |                case  IFX_TAPI_ERRSRC_LL_CH:
      |                ^~~~
cc1: all warnings being treated as errors

/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_ioctl.c: In function 'TAPI_IoctlDev':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_ioctl.c:705:19: error: ignoring return value of 'copy_to_user' declared with attribute 'warn_unused_result' [-Werror=unused-result]
  705 |                   copy_to_user ((IFX_void_t*)ioarg, p_tmp, sizeof(IFX_TAPI_CAP_t));
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_ioctl.c: In function 'TAPI_IoctlCh':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_ioctl.c:1553:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
 1553 |          ret = TAPI_statusNotSupported;
      |          ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_ioctl.c:1555:7: note: here
 1555 |       default:
      |       ^~~~~~~
cc1: all warnings being treated as errors

/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c: In function 'cid_fsm_alert_exec':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:2037:31: error: this statement may fall through [-Werror=implicit-fallthrough=]
 2037 |          pTxData->nCidSubState++;
      |          ~~~~~~~~~~~~~~~~~~~~~^~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:2039:7: note: here
 2039 |       case 1:
      |       ^~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:2053:31: error: this statement may fall through [-Werror=implicit-fallthrough=]
 2053 |          pTxData->nCidSubState++;
      |          ~~~~~~~~~~~~~~~~~~~~~^~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:2055:7: note: here
 2055 |       case 2:
      |       ^~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:2070:31: error: this statement may fall through [-Werror=implicit-fallthrough=]
 2070 |          pTxData->nCidSubState++;
      |          ~~~~~~~~~~~~~~~~~~~~~^~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:2072:7: note: here
 2072 |       default:
      |       ^~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c: In function 'cid_prepare_data':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:1501:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
 1501 |          if (IFX_TAPI_CID_HM_ONHOOK == pTxData->txHookMode)
      |             ^
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:1509:7: note: here
 1509 |       default:
      |       ^~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:1531:16: error: this statement may fall through [-Werror=implicit-fallthrough=]
 1531 |             if (IFX_TAPI_CID_STD_KPN_DTMF_FSK != pConfData->nStandard)
      |                ^
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:1535:10: note: here
 1535 |          case IFX_TAPI_CID_GEN_TYPE_FSK:
      |          ^~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c: In function 'cid_lookup_transparent':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:1425:10: error: this statement may fall through [-Werror=implicit-fallthrough=]
 1425 |          cidfsk_set_tx_time (pTxData, &pConfData->TapiCidFskConf);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:1427:7: note: here
 1427 |       case IFX_TAPI_CID_GEN_TYPE_DTMF:
      |       ^~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c: In function 'TAPI_Phone_CID_Stop_Tx':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:3445:10: error: this statement may fall through [-Werror=implicit-fallthrough=]
 3445 |          switch (pTxData->nAlertType)
      |          ^~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:3461:7: note: here
 3461 |       case TAPI_CID_STATE_ACK:
      |       ^~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:3463:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
 3463 |          if (ptr_chk(pDrvCtx->SIG.DTMFD_Override, ""))
      |             ^
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:3472:7: note: here
 3472 |       case TAPI_CID_STATE_SENDING:
      |       ^~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c: In function 'TAPI_Phone_Get_CidRxData':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:4060:10: error: this statement may fall through [-Werror=implicit-fallthrough=]
 4060 |       if (IFX_Fifo_isEmpty(&(pCidRx->TapiCidRxFifo)))
      |          ^
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/drv_tapi-3.13.0/src/drv_tapi_cid.c:4069:4: note: here
 4069 |    default:
      |    ^~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: ltq-atm: add patch fixing compilation warning for ltq_atm
Christian Marangi [Thu, 11 May 2023 06:18:56 +0000 (08:18 +0200)]
kernel: ltq-atm: add patch fixing compilation warning for ltq_atm

Fix compilation warning caused by copy_from_user ret not handled.
Fix compilation warning:
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_ase/ltq-atm-ase/ltq-atm/ltq_atm.c: In function 'ppe_ioctl':
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_ase/ltq-atm-ase/ltq-atm/ltq_atm.c:341:17: error: ignoring return value of 'copy_from_user' declared with attribute 'warn_unused_result' [-Werror=unused-result]
  341 |                 copy_from_user(&mib_vcc, arg, sizeof(mib_vcc));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: ltq-vdsl-vr11: fix compilation waring
Christian Marangi [Thu, 11 May 2023 03:48:57 +0000 (05:48 +0200)]
kernel: ltq-vdsl-vr11: fix compilation waring

Add patch fixing compilation warning from missing fallthrough
Fix compilation warning:
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/common/drv_dsl_cpe_api.c: In function 'DSL_DRV_AutobootControlSet':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/common/drv_dsl_cpe_api.c:2648:19: error: this statement may fall through [-Werror=implicit-fallthrough=]
 2648 |                if (pContext->bAutobootThreadStarted)
      |                   ^
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/common/drv_dsl_cpe_api.c:2656:13: note: here
 2656 |             case DSL_AUTOBOOT_CTRL_STOP_PD:
      |             ^~~~
cc1: all warnings being treated as errors

/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/pm/drv_dsl_cpe_pm_core.c: In function 'DSL_DRV_PM_CountersReset':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/pm/drv_dsl_cpe_pm_core.c:2358:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
 2358 |    if (ResetType == DSL_PM_RESET_HISTORY)
      |       ^
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/pm/drv_dsl_cpe_pm_core.c:2361:4: note: here
 2361 |    case DSL_PM_RESET_TOTAL:
      |    ^~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/pm/drv_dsl_cpe_pm_core.c:2365:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
 2365 |    if (ResetType == DSL_PM_RESET_TOTAL)
      |       ^
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/pm/drv_dsl_cpe_pm_core.c:2368:4: note: here
 2368 |    case DSL_PM_RESET_HISTORY_SHOWTIME:
      |    ^~~~
cc1: all warnings being treated as errors

/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/device/drv_dsl_cpe_device_vrx.c: In function 'DSL_DRV_DEV_AutobootHandleTraining':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/device/drv_dsl_cpe_device_vrx.c:8883:19: error: this statement may fall through [-Werror=implicit-fallthrough=]
 8883 |          bPreFail = DSL_TRUE;
      |          ~~~~~~~~~^~~~~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/device/drv_dsl_cpe_device_vrx.c:8889:7: note: here
 8889 |       case DSL_LINESTATE_EXCEPTION:
      |       ^~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: ltq-vdsl-vr11-mei: fix compilation warning
Christian Marangi [Wed, 10 May 2023 16:36:20 +0000 (18:36 +0200)]
kernel: ltq-vdsl-vr11-mei: fix compilation warning

Fix compilation warning in variable length array msg and ret value not
handled.
Fix compilation warning:
/__w/openwrt/openwrt/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_chromium/dsl_cpe_mei-ugw_8.5.2.10/src/drv_mei_cpe_api_intern.c: In function 'MEI_Internal_DumpMessage':
/__w/openwrt/openwrt/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_chromium/dsl_cpe_mei-ugw_8.5.2.10/src/drv_mei_cpe_api_intern.c:441:4: error: ISO C90 forbids variable length array 'msg' [-Werror=vla]
  441 |    char msg[nMsgSize];
      |    ^~~~
/__w/openwrt/openwrt/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_chromium/dsl_cpe_mei-ugw_8.5.2.10/src/drv_mei_cpe_api_intern.c:442:4: error: ISO C90 forbids array 'buf' whose size cannot be evaluated [-Werror=vla]
  442 |    char buf[nBufSize];
      |    ^~~~
cc1: all warnings being treated as errors

/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_mei-ugw_8.5.2.10/src/drv_mei_cpe_linux.c: In function 'MEI_Ioctl':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_mei-ugw_8.5.2.10/src/drv_mei_cpe_linux.c:1270:4: error: ignoring return value of 'copy_to_user' declared with attribute 'warn_unused_result' [-Werror=unused-result]
 1270 |    copy_to_user( ((IOCTL_MEI_arg_t *)nArgument), &local_args, retSize);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_mei-ugw_8.5.2.10/src/drv_mei_cpe_linux.c: In function 'MEI_IoctlMeiDbgAccessWr_Wrap':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_mei-ugw_8.5.2.10/src/drv_mei_cpe_linux.c:3574:4: error: ignoring return value of 'copy_to_user' declared with attribute 'warn_unused_result' [-Werror=unused-result]
 3574 |    copy_to_user( (void *)&pUserArgument->count,
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3575 |                  (void *)&pLocalArgument->count,
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3576 |                  sizeof(pUserArgument->count) ) ;
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_mei-ugw_8.5.2.10/src/drv_mei_cpe_linux.c: In function 'MEI_IoctlMeiDbgAccessRd_Wrap':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_mei-ugw_8.5.2.10/src/drv_mei_cpe_linux.c:3603:7: error: ignoring return value of 'copy_to_user' declared with attribute 'warn_unused_result' [-Werror=unused-result]
 3603 |       copy_to_user( pUserBuf,
      |       ^~~~~~~~~~~~~~~~~~~~~~~
 3604 |                     pLocalArgument->pData_32,
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~
 3605 |                     pLocalArgument->count * sizeof(IFX_uint32_t) ) ;
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_mei-ugw_8.5.2.10/src/drv_mei_cpe_linux.c:3610:4: error: ignoring return value of 'copy_to_user' declared with attribute 'warn_unused_result' [-Werror=unused-result]
 3610 |    copy_to_user( (void *)&pUserArgument->count,
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3611 |                  (void *)&pLocalArgument->count,
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3612 |                  sizeof(pUserArgument->count) ) ;
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: ltq-ptm: add patch fixing compilation warning
Christian Marangi [Wed, 10 May 2023 15:18:51 +0000 (17:18 +0200)]
kernel: ltq-ptm: add patch fixing compilation warning

Add patch fixing compilation warning for some debugfs entry defined but
unused.
Fix compilation warning:
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-ptm-danube/ltq-ptm/ifxmips_ptm_adsl.c:969:12: error: 'proc_read_genconf' defined but not used [-Werror=unused-function]
  969 | static int proc_read_genconf(char *page, char **start, off_t off, int count, int *eof, void *data)
      |            ^~~~~~~~~~~~~~~~~
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-ptm-danube/ltq-ptm/ifxmips_ptm_adsl.c:942:12: error: 'proc_write_wanmib' defined but not used [-Werror=unused-function]
  942 | static int proc_write_wanmib(struct file *file, const char *buf, unsigned long count, void *data)
      |            ^~~~~~~~~~~~~~~~~
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-ptm-danube/ltq-ptm/ifxmips_ptm_adsl.c:910:12: error: 'proc_read_wanmib' defined but not used [-Werror=unused-function]
  910 | static int proc_read_wanmib(char *page, char **start, off_t off, int count, int *eof, void *data)
      |            ^~~~~~~~~~~~~~~~
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-ptm-danube/ltq-ptm/ifxmips_ptm_adsl.c:892:12: error: 'proc_read_version' defined but not used [-Werror=unused-function]
  892 | static int proc_read_version(char *buf, char **start, off_t offset, int count, int *eof, void *data)
      |            ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xway/ltq-ptm-danube/ltq-ptm/ifxmips_ptm_adsl.c:1164:19: error: 'stricmp' defined but not used [-Werror=unused-function]
 1164 | static INLINE int stricmp(const char *p1, const char *p2)
      |                   ^~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: ltq-adsl: add patch fixing compilation warning
Christian Marangi [Wed, 10 May 2023 15:17:49 +0000 (17:17 +0200)]
kernel: ltq-adsl: add patch fixing compilation warning

Add patch fixing compilation warning due to not handled switch
fallthrough, stack limit and compilation warning in g997 module.
Fix compilation warning:
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_ase/ltq-dsl-ase/drv_dsl_cpe_api-3.24.4.4/src/pm/drv_dsl_cpe_pm_core.c: In function 'DSL_DRV_PM_CountersReset':
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_ase/ltq-dsl-ase/drv_dsl_cpe_api-3.24.4.4/src/pm/drv_dsl_cpe_pm_core.c:2277:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
 2277 |    if (ResetType == DSL_PM_RESET_HISTORY)
      |       ^
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_ase/ltq-dsl-ase/drv_dsl_cpe_api-3.24.4.4/src/pm/drv_dsl_cpe_pm_core.c:2280:4: note: here
 2280 |    case DSL_PM_RESET_TOTAL:
      |    ^~~~
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_ase/ltq-dsl-ase/drv_dsl_cpe_api-3.24.4.4/src/pm/drv_dsl_cpe_pm_core.c:2284:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
 2284 |    if (ResetType == DSL_PM_RESET_TOTAL)
      |       ^
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_ase/ltq-dsl-ase/drv_dsl_cpe_api-3.24.4.4/src/pm/drv_dsl_cpe_pm_core.c:2287:4: note: here
 2287 |    case DSL_PM_RESET_HISTORY_SHOWTIME:
      |    ^~~~
cc1: all warnings being treated as errors

/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_ase/ltq-dsl-ase/drv_dsl_cpe_api-3.24.4.4/src/device/drv_dsl_cpe_device_danube.c: In function 'DSL_DRV_DEV_AutobootHandleTraining':
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_ase/ltq-dsl-ase/drv_dsl_cpe_api-3.24.4.4/src/device/drv_dsl_cpe_device_danube.c:3189:19: error: this statement may fall through [-Werror=implicit-fallthrough=]
 3189 |                if (nErrCode != DSL_SUCCESS)
      |                   ^
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_ase/ltq-dsl-ase/drv_dsl_cpe_api-3.24.4.4/src/device/drv_dsl_cpe_device_danube.c:3197:13: note: here
 3197 |             case DSL_LINESTATE_IDLE:
      |             ^~~~
cc1: all warnings being treated as errors

/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_ase/ltq-dsl-ase/drv_dsl_cpe_api-3.24.4.4/src/g997/drv_dsl_cpe_api_g997_danube.c: In function 'DSL_DRV_DEV_G997_PowerManagementStateForcedTrigger':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_ase/ltq-dsl-ase/drv_dsl_cpe_api-3.24.4.4/src/g997/drv_dsl_cpe_api_g997_danube.c:2532:52: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]
 2532 |                      else if (((nVal >> 4) & 0x15) == 0x9)
      |                                                    ^~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_ase/ltq-dsl-ase/drv_dsl_cpe_api-3.24.4.4/src/g997/drv_dsl_cpe_api_g997_danube.c: In function 'DSL_DRV_DEV_G997_DeltHlogGet':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_ase/ltq-dsl-ase/drv_dsl_cpe_api-3.24.4.4/src/g997/drv_dsl_cpe_api_g997_danube.c:2108:1: error: the frame size of 1056 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
 2108 | }
      | ^
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: broadcom-wl: multiple fix to make the package compilable again
Christian Marangi [Wed, 10 May 2023 13:45:49 +0000 (15:45 +0200)]
kernel: broadcom-wl: multiple fix to make the package compilable again

Add multiple patch to make the package compilable again.
Aside from some fixup of obvius wrong code, some real fix were needed.
This fix any compilation warning found on compiling the package on
bcm47xx. (omitted since they are too much)

The real problem of this package was the missing MODULE_LICENSE now
mandatory even without WERROR. Set to Proprietary.
And the big blocker is that Broadcom provided an object file targetting
an old kernel version.
The module on modprobe try to find the symbol printk but printk was
dropped and replaced to _printk.
To handle this change we use objcopy tool to rename the symbol to the
new name permitting a correct modprobe and creation of .ko

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: mwlwifi: add patch fixing compilation warning on 64bit systems
Christian Marangi [Tue, 9 May 2023 22:44:08 +0000 (00:44 +0200)]
kernel: mwlwifi: add patch fixing compilation warning on 64bit systems

Add patch fixing compilation warning on 64bit systems.
Fix compilation warning:
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/fwcmd.c: In function 'mwl_fwcmd_get_fw_core_dump':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/fwcmd.c:3608:31: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
 3608 |                (const void *)((u32)pcmd +
      |                               ^
In file included from ./include/linux/device.h:15,
                 from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/device.h:3,
                 from ./include/linux/dma-mapping.h:7,
                 from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/dma-mapping.h:3,
                 from ./include/linux/skbuff.h:31,
                 from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/skbuff.h:3,
                 from ./include/linux/if_ether.h:19,
                 from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/if_ether.h:3,
                 from ./include/linux/etherdevice.h:20,
                 from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/etherdevice.h:3,
                 from /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:20:
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c: In function 'pcie_tx_init_ndp':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:38: error: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Werror=format=]
  338 |                 wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
./include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
  144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                        ^~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211/net/cfg80211.h:8828:9: note: in expansion of macro 'dev_err'
 8828 |         dev_err(&(wiphy)->dev, format, ##args)
      |         ^~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:17: note: in expansion of macro 'wiphy_err'
  338 |                 wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
      |                 ^~~~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:67: note: format string is defined here
  338 |                 wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
      |                                                                  ~^
      |                                                                   |
      |                                                                   int
      |                                                                  %ld
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:38: error: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Werror=format=]
  338 |                 wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
./include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
  144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                        ^~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211/net/cfg80211.h:8828:9: note: in expansion of macro 'dev_err'
 8828 |         dev_err(&(wiphy)->dev, format, ##args)
      |         ^~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:17: note: in expansion of macro 'wiphy_err'
  338 |                 wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
      |                 ^~~~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:71: note: format string is defined here
  338 |                 wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
      |                                                                      ~^
      |                                                                       |
      |                                                                       int
      |                                                                      %ld
  CC [M]  /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/debugfs.o
In file included from ./include/linux/device.h:15,
                 from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/device.h:3,
                 from ./include/linux/dma-mapping.h:7,
                 from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/dma-mapping.h:3,
                 from ./include/linux/skbuff.h:31,
                 from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/skbuff.h:3,
                 from ./include/linux/if_ether.h:19,
                 from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/if_ether.h:3,
                 from ./include/linux/etherdevice.h:20,
                 from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/etherdevice.h:3,
                 from /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.c:19:
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.c: In function 'pcie_bf_mimo_ctrl_decode':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.c:1325:37: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
 1325 |                           filename, (unsigned int)fp_data);
      |                                     ^
./include/linux/dev_printk.h:110:37: note: in definition of macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                                     ^~~~~~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211/net/cfg80211.h:8828:9: note: in expansion of macro 'dev_err'
 8828 |         dev_err(&(wiphy)->dev, format, ##args)
      |         ^~~~~~~
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.c:1324:17: note: in expansion of macro 'wiphy_err'
 1324 |                 wiphy_err(priv->hw->wiphy, "Error opening %s! %x\n",
      |                 ^~~~~~~~~
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:289: /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.o] Error 1
make[4]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:289: /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.o] Error 1
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/debugfs.c: In function 'mwl_debugfs_regrdwr_read':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/debugfs.c:1335:43: error: format '%d' expects argument of type 'int', but argument 4 has type 'ssize_t' {aka 'long int'} [-Werror=format=]
 1335 |                                  "error: %d(%u 0x%08x 0x%08x)\n",
      |                                          ~^
      |                                           |
      |                                           int
      |                                          %ld
 1336 |                                  ret, priv->reg_type, priv->reg_offset,
      |                                  ~~~
      |                                  |
      |                                  ssize_t {aka long int}
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: lantiq: vrx518_tc: add patch fix compilation warning for ptm_tc
Christian Marangi [Tue, 9 May 2023 21:32:29 +0000 (23:32 +0200)]
kernel: lantiq: vrx518_tc: add patch fix compilation warning for ptm_tc

Alloc MIB struct dynamically instead to fix compilation warning for
stack limit.
Fix compilation warning:
/__w/openwrt/openwrt/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_chromium/vrx518_tc_drv-ugw_8.5.2.10/dcdp/ptm_tc.c: In function 'ptm_tc_get_stats':
/__w/openwrt/openwrt/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_chromium/vrx518_tc_drv-ugw_8.5.2.10/dcdp/ptm_tc.c:463:1: error: the frame size of 1032 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
  463 | }
      | ^
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: lantiq: vrx518_tc: add patch fix compilation warning for atm_tc
Christian Marangi [Tue, 9 May 2023 21:32:16 +0000 (23:32 +0200)]
kernel: lantiq: vrx518_tc: add patch fix compilation warning for atm_tc

Add patch fixing compilation warning for atm_tc module.
Fix compilation warning:
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/vrx518_tc_drv-ugw_8.5.2.10/dcdp/atm_tc.c: In function 'print_datetime':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/vrx518_tc_drv-ugw_8.5.2.10/dcdp/atm_tc.c:768:32: error: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess]
  768 |         snprintf(buffer, sizeof(buffer), "%s.%06d", tmbuf, (int)datetime->tv_nsec / 1000);
      |                                ^
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: broadcom-wl: add patch dropping set_fs and get_fs for > 5.13
Christian Marangi [Tue, 9 May 2023 20:04:17 +0000 (22:04 +0200)]
kernel: broadcom-wl: add patch dropping set_fs and get_fs for > 5.13

Drop set_fs and get_fs since they are not present in kernel > 5.13.
Fix compilation warning:
/__w/openwrt/openwrt/openwrt/build_dir/target-mipsel-openwrt-linux-musl_musl/linux-bcm47xx_generic/broadcom-wl-5.10.56.27.3/driver/wl_iw.c: In function 'dev_wlc_ioctl':
/__w/openwrt/openwrt/openwrt/build_dir/target-mipsel-openwrt-linux-musl_musl/linux-bcm47xx_generic/broadcom-wl-5.10.56.27.3/driver/wl_iw.c:121:14: error: implicit declaration of function 'get_fs'; did you mean 'sget_fc'? [-Werror=implicit-function-declaration]
  121 |         fs = get_fs();
      |              ^~~~~~
      |              sget_fc
/__w/openwrt/openwrt/openwrt/build_dir/target-mipsel-openwrt-linux-musl_musl/linux-bcm47xx_generic/broadcom-wl-5.10.56.27.3/driver/wl_iw.c:121:14: error: incompatible types when assigning to type 'mm_segment_t' from type 'int'
/__w/openwrt/openwrt/openwrt/build_dir/target-mipsel-openwrt-linux-musl_musl/linux-bcm47xx_generic/broadcom-wl-5.10.56.27.3/driver/wl_iw.c:122:9: error: implicit declaration of function 'set_fs'; did you mean 'sget_fc'? [-Werror=implicit-function-declaration]
  122 |         set_fs(KERNEL_DS);
      |         ^~~~~~
      |         sget_fc
/__w/openwrt/openwrt/openwrt/build_dir/target-mipsel-openwrt-linux-musl_musl/linux-bcm47xx_generic/broadcom-wl-5.10.56.27.3/driver/wl_iw.c:122:16: error: 'KERNEL_DS' undeclared (first use in this function); did you mean 'KERNFS_NS'?
  122 |         set_fs(KERNEL_DS);
      |                ^~~~~~~~~
      |                KERNFS_NS

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: broadcom-wl: add patch fixing compilation warning
Christian Marangi [Tue, 9 May 2023 16:12:02 +0000 (18:12 +0200)]
kernel: broadcom-wl: add patch fixing compilation warning

Add patch fixing compilation warning related to if clause not guarding in
wl_iw.c
Fix compilation warning:
/__w/openwrt/openwrt/openwrt/build_dir/target-mipsel-openwrt-linux-musl_musl/linux-bcm47xx_legacy/broadcom-wl-5.10.56.27.3/driver/wl_iw.c: In function 'wl_iw_set_freq':
/__w/openwrt/openwrt/openwrt/build_dir/target-mipsel-openwrt-linux-musl_musl/linux-bcm47xx_legacy/broadcom-wl-5.10.56.27.3/driver/wl_iw.c:393:9: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
  393 |         if (fwrq->m > 4000 && fwrq->m < 5000)
      |         ^~
/__w/openwrt/openwrt/openwrt/build_dir/target-mipsel-openwrt-linux-musl_musl/linux-bcm47xx_legacy/broadcom-wl-5.10.56.27.3/driver/wl_iw.c:396:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  396 |                 chan = wf_mhz2channel(fwrq->m, sf);
      |                 ^~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoath79: rb91x_nand: fix compilation warning for dev_err
Christian Marangi [Tue, 9 May 2023 15:35:53 +0000 (17:35 +0200)]
ath79: rb91x_nand: fix compilation warning for dev_err

Fix compilation warning for dev_err in rb91x_nand driver.
Fix compilation warning:
drivers/mtd/nand/raw/rb91x_nand.c:289:25: note: in expansion of macro 'dev_err'
  289 |                         dev_err(dev, "failed to get gpios: %d\n",
      |                         ^~~~~~~
drivers/mtd/nand/raw/rb91x_nand.c:289:61: note: format string is defined here
  289 |                         dev_err(dev, "failed to get gpios: %d\n",
      |                                                            ~^
      |                                                             |
      |                                                             int
      |                                                            %ld
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: ltq-adsl-mei: fix compilation warning for copy_from_user ret
Christian Marangi [Tue, 9 May 2023 14:26:34 +0000 (16:26 +0200)]
kernel: ltq-adsl-mei: fix compilation warning for copy_from_user ret

Fix compilation warning for copy_from_user ret value not handled.
Fix compilation warning:
/__w/openwrt/openwrt/openwrt/build_dir/target-mips_mips32_musl/linux-lantiq_ase/ltq-adsl-mei-ase/ltq-adsl-mei/drv_mei_cpe.c: In function 'DSL_BSP_FWDownload':
/__w/openwrt/openwrt/openwrt/build_dir/target-mips_mips32_musl/linux-lantiq_ase/ltq-adsl-mei-ase/ltq-adsl-mei/drv_mei_cpe.c:1623:17: error: ignoring return value of 'copy_from_user' declared with attribute 'warn_unused_result' [-Werror=unused-result]
 1623 |                 copy_from_user ((char *) &img_hdr_tmp, buf, sizeof (img_hdr_tmp));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/__w/openwrt/openwrt/openwrt/build_dir/target-mips_mips32_musl/linux-lantiq_ase/ltq-adsl-mei-ase/ltq-adsl-mei/drv_mei_cpe.c:1701:17: error: ignoring return value of 'copy_from_user' declared with attribute 'warn_unused_result' [-Werror=unused-result]
 1701 |                 copy_from_user (mem_ptr, buf + nRead, nCopy);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agobmips: 5.15: comment unused macronix_nand_block_protection_support
Christian Marangi [Tue, 9 May 2023 12:05:41 +0000 (14:05 +0200)]
bmips: 5.15: comment unused macronix_nand_block_protection_support

Comment unused function macronix_nand_block_protection_support since it
does cause boot problem
Fix compilation error:
drivers/mtd/nand/raw/nand_macronix.c:220:13: error: 'macronix_nand_block_protection_support' defined but not used [-Werror=unused-function]
  220 | static void macronix_nand_block_protection_support(struct nand_chip *chip)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agobcm63xx: 5.15: comment unused macronix_nand_block_protection_support
Christian Marangi [Tue, 9 May 2023 11:58:37 +0000 (13:58 +0200)]
bcm63xx: 5.15: comment unused macronix_nand_block_protection_support

Comment unused macronix_nand_block_protection_support due to workaround
needed to fix booting
Fix compilation warning:
drivers/mtd/nand/raw/nand_macronix.c:220:13: error: 'macronix_nand_block_protection_support' defined but not used [-Werror=unused-function]
  220 | static void macronix_nand_block_protection_support(struct nand_chip *chip)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoath79: gpio-latch: fix compilation warning for wrong dev_err %
Christian Marangi [Tue, 9 May 2023 11:53:25 +0000 (13:53 +0200)]
ath79: gpio-latch: fix compilation warning for wrong dev_err %

Fix compilation warning for using %d instead of %ld for gpio-latch in
dev_err.
Fix compilation warning:
In file included from ./include/linux/device.h:15,
                 from ./include/linux/gpio/driver.h:5,
                 from drivers/gpio/gpio-latch.c:13:
drivers/gpio/gpio-latch.c: In function 'gpio_latch_probe':
drivers/gpio/gpio-latch.c:137:46: error: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Werror=format=]
  137 |                                 dev_err(dev, "failed to get gpio %d: %d\n", i,
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
./include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
  144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                        ^~~~~~~
drivers/gpio/gpio-latch.c:137:33: note: in expansion of macro 'dev_err'
  137 |                                 dev_err(dev, "failed to get gpio %d: %d\n", i,
      |                                 ^~~~~~~
drivers/gpio/gpio-latch.c:137:71: note: format string is defined here
  137 |                                 dev_err(dev, "failed to get gpio %d: %d\n", i,
      |                                                                      ~^
      |                                                                       |
      |                                                                       int
      |                                                                      %ld
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agomvebu: 5.15: fix compilation warning for mangle bootargs patch
Christian Marangi [Tue, 9 May 2023 11:50:24 +0000 (13:50 +0200)]
mvebu: 5.15: fix compilation warning for mangle bootargs patch

Fix compilation warning for mangle bootargs patch.
Fix compilation warning:
arch/arm/boot/compressed/atags_to_fdt.c: In function 'append_rootblock':
arch/arm/boot/compressed/atags_to_fdt.c:84:13: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
   84 |         ptr = str - 1;
      |             ^
arch/arm/boot/compressed/atags_to_fdt.c: In function 'atags_to_fdt':
arch/arm/boot/compressed/atags_to_fdt.c:213:18: error: unused variable 'memsize' [-Werror=unused-variable]
  213 |         int ret, memsize;
      |                  ^~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c:212:13: error: unused variable 'memcount' [-Werror=unused-variable]
  212 |         int memcount = 0;
      |             ^~~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c:211:16: error: unused variable 'mem_reg_property' [-Werror=unused-variable]
  211 |         __be32 mem_reg_property[2 * 2 * NR_BANKS];
      |                ^~~~~~~~~~~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c: At top level:
arch/arm/boot/compressed/atags_to_fdt.c:180:13: error: 'hex_str' defined but not used [-Werror=unused-function]
  180 | static void hex_str(char *out, uint32_t value)
      |             ^~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c:63:17: error: 'get_cell_size' defined but not used [-Werror=unused-function]
   63 | static uint32_t get_cell_size(const void *fdt)
      |                 ^~~~~~~~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c:43:12: error: 'setprop_cell' defined but not used [-Werror=unused-function]
   43 | static int setprop_cell(void *fdt, const char *node_path,
      |            ^~~~~~~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c:25:12: error: 'setprop' defined but not used [-Werror=unused-function]
   25 | static int setprop(void *fdt, const char *node_path, const char *property,
      |            ^~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoipq40xx: 5.15: add patch commenting unused sdhci function
Christian Marangi [Mon, 8 May 2023 23:59:23 +0000 (01:59 +0200)]
ipq40xx: 5.15: add patch commenting unused sdhci function

Add patch commenting unused sdhci function, hopin this will be dropped
when the problem is actually found.
Fix compilation warning:
drivers/mmc/host/sdhci-msm.c:1781:13: error: 'sdhci_msm_set_clock' defined but not used [-Werror=unused-function]
 1781 | static void sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock)
      |             ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agolayerscape: 5.15: fix compilation warning for fsl ppfe driver
Christian Marangi [Mon, 8 May 2023 17:26:48 +0000 (19:26 +0200)]
layerscape: 5.15: fix compilation warning for fsl ppfe driver

Rework some desc dump and dummy pkt function to fix compilation warning.
Fix compilation warning:
drivers/staging/fsl_ppfe/pfe_hif.c: In function 'send_dummy_pkt_to_hif':
drivers/staging/fsl_ppfe/pfe_hif.c:118:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
  118 |         ddr_ptr = (void *)((u64)readl(BMU2_BASE_ADDR + BMU_ALLOC_CTRL));
      |                   ^
drivers/staging/fsl_ppfe/pfe_hif.c:122:20: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
  122 |         lmem_ptr = (void *)((u64)readl(BMU1_BASE_ADDR + BMU_ALLOC_CTRL));
      |                    ^
drivers/staging/fsl_ppfe/pfe_hif.c: In function 'pfe_hif_desc_dump':
drivers/staging/fsl_ppfe/pfe_hif.c:195:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  195 |         desc_p = (u32)((u64)desc - (u64)hif->descr_baseaddr_v +
      |                        ^
drivers/staging/fsl_ppfe/pfe_hif.c:195:36: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  195 |         desc_p = (u32)((u64)desc - (u64)hif->descr_baseaddr_v +
      |                                    ^
drivers/staging/fsl_ppfe/pfe_hif.c:207:19: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  207 |         desc_p = ((u64)desc - (u64)hif->descr_baseaddr_v +
      |                   ^
drivers/staging/fsl_ppfe/pfe_hif.c:207:31: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  207 |         desc_p = ((u64)desc - (u64)hif->descr_baseaddr_v +
      |                               ^
cc1: all warnings being treated as errors

In file included from ./include/linux/kernel.h:19,
                 from ./include/linux/list.h:9,
                 from ./include/linux/wait.h:7,
                 from ./include/linux/eventfd.h:13,
                 from drivers/staging/fsl_ppfe/pfe_cdev.c:11:
drivers/staging/fsl_ppfe/pfe_cdev.c: In function 'pfe_cdev_read':
./include/linux/kern_levels.h:5:25: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Werror=format=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
./include/linux/printk.h:422:25: note: in definition of macro 'printk_index_wrap'
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
./include/linux/printk.h:132:17: note: in expansion of macro 'printk'
  132 |                 printk(fmt, ##__VA_ARGS__);             \
      |                 ^~~~~~
./include/linux/printk.h:580:9: note: in expansion of macro 'no_printk'
  580 |         no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~~~~
./include/linux/kern_levels.h:15:25: note: in expansion of macro 'KERN_SOH'
   15 | #define KERN_DEBUG      KERN_SOH "7"    /* debug-level messages */
      |                         ^~~~~~~~
./include/linux/printk.h:580:19: note: in expansion of macro 'KERN_DEBUG'
  580 |         no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
      |                   ^~~~~~~~~~
drivers/staging/fsl_ppfe/pfe_cdev.c:42:17: note: in expansion of macro 'pr_debug'
   42 |                 pr_debug("%u  %lu", link_states[ret].phy_id,
      |                 ^~~~~~~~
./include/linux/kern_levels.h:5:25: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
./include/linux/printk.h:422:25: note: in definition of macro 'printk_index_wrap'
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
./include/linux/printk.h:493:9: note: in expansion of macro 'printk'
  493 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~
./include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
   11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
      |                         ^~~~~~~~
./include/linux/printk.h:493:16: note: in expansion of macro 'KERN_ERR'
  493 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |                ^~~~~~~~
drivers/staging/fsl_ppfe/pfe_cdev.c:50:17: note: in expansion of macro 'pr_err'
   50 |                 pr_err("Failed to send (%d)bytes of (%lu) requested.\n",
      |                 ^~~~~~
./include/linux/kern_levels.h:5:25: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int' [-Werror=format=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
./include/linux/printk.h:422:25: note: in definition of macro 'printk_index_wrap'
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
./include/linux/printk.h:132:17: note: in expansion of macro 'printk'
  132 |                 printk(fmt, ##__VA_ARGS__);             \
      |                 ^~~~~~
./include/linux/printk.h:580:9: note: in expansion of macro 'no_printk'
  580 |         no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~~~~
./include/linux/kern_levels.h:15:25: note: in expansion of macro 'KERN_SOH'
   15 | #define KERN_DEBUG      KERN_SOH "7"    /* debug-level messages */
      |                         ^~~~~~~~
./include/linux/printk.h:580:19: note: in expansion of macro 'KERN_DEBUG'
  580 |         no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
      |                   ^~~~~~~~~~
drivers/staging/fsl_ppfe/pfe_cdev.c:57:9: note: in expansion of macro 'pr_debug'
   57 |         pr_debug("Read of (%lu) bytes performed.\n", sizeof(link_states));
      |         ^~~~~~~~
cc1: all warnings being treated as errors

In file included from ./include/uapi/linux/posix_types.h:5,
                 from ./include/uapi/linux/types.h:14,
                 from ./include/linux/types.h:6,
                 from ./include/linux/list.h:5,
                 from ./include/linux/module.h:12,
                 from drivers/staging/fsl_ppfe/pfe_sysfs.c:7:
drivers/staging/fsl_ppfe/pfe_sysfs.c: In function 'pfe_set_util':
./include/linux/stddef.h:8:14: error: passing argument 2 of 'kstrtoul' makes integer from pointer without a cast [-Werror=int-conversion]
    8 | #define NULL ((void *)0)
      |              ^~~~~~~~~~~
      |              |
      |              void *
drivers/staging/fsl_ppfe/pfe_sysfs.c:538:39: note: in expansion of macro 'NULL'
  538 |         util_do_clear = kstrtoul(buf, NULL, 0);
      |                                       ^~~~
In file included from ./include/linux/kernel.h:13,
                 from ./include/linux/list.h:9:
./include/linux/kstrtox.h:30:69: note: expected 'unsigned int' but argument is of type 'void *'
   30 | static inline int __must_check kstrtoul(const char *s, unsigned int base, unsigned long *res)
      |                                                        ~~~~~~~~~~~~~^~~~
cc1: all warnings being treated as errors

With UTIL compiled on, fix compilation warning:
drivers/staging/fsl_ppfe/pfe_hal.c: In function 'pe_load_ddr_section':
drivers/staging/fsl_ppfe/pfe_hal.c:617:19: error: 'else' without a previous 'if'
  617 |                 } else {
      |                   ^~~~
drivers/staging/fsl_ppfe/pfe_hal.c:622:17: error: break statement not within loop or switch
  622 |                 break;
      |                 ^~~~~
drivers/staging/fsl_ppfe/pfe_hal.c:624:9: error: case label not within a switch statement
  624 |         case SHT_NOBITS:
      |         ^~~~
drivers/staging/fsl_ppfe/pfe_hal.c:627:17: error: break statement not within loop or switch
  627 |                 break;
      |                 ^~~~~
drivers/staging/fsl_ppfe/pfe_hal.c:629:9: error: 'default' label not within a switch statement
  629 |         default:
      |         ^~~~~~~
drivers/staging/fsl_ppfe/pfe_hal.c: At top level:
drivers/staging/fsl_ppfe/pfe_hal.c:635:9: error: expected identifier or '(' before 'return'
  635 |         return 0;
      |         ^~~~~~
drivers/staging/fsl_ppfe/pfe_hal.c:636:1: error: expected identifier or '(' before '}' token
  636 | }

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agolayerscape: 5.15: fix compilation warning for PHY_INTERFACE_MODE_2500SGMII
Christian Marangi [Mon, 8 May 2023 18:55:19 +0000 (20:55 +0200)]
layerscape: 5.15: fix compilation warning for PHY_INTERFACE_MODE_2500SGMII

Fix compilation warning for PHY_INTERFACE_MODE_2500SGMII patch.
Fix compilation warning:
drivers/net/phy/phylink.c: In function 'phylink_get_linkmodes':
drivers/net/phy/phylink.c:360:9: error: enumeration value 'PHY_INTERFACE_MODE_2500SGMII' not handled in switch [-Werror=switch]
  360 |         switch (interface) {
      |         ^~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoipq806x: 5.15: drop arm override compile patch
Christian Marangi [Mon, 8 May 2023 16:09:23 +0000 (18:09 +0200)]
ipq806x: 5.15: drop arm override compile patch

Drop arm override compile patch. The use is dubious and at times (2016)
it was never explained why this was required.
Krait CPU and Cortex-a15 may be similar but they have some intrinsic
difference. While very similar they differ a lot in additional feature
and also cache configuration.

Also these conflict with raid6 libraty compilation that use specific
workaround not compatible with cortex-a15 and produce compilation
warning.
Fix compilation warning:
cc1: error: switch '-mcpu=cortex-a15' conflicts with switch '-march=armv7-a+simd' [-Werror]
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agorealtek: 5.15: replace fallthrough comment for rtl838x ethernet driver
Christian Marangi [Sun, 7 May 2023 08:20:30 +0000 (10:20 +0200)]
realtek: 5.15: replace fallthrough comment for rtl838x ethernet driver

Replace fallthrough comment with fallthrough macro for rtl838x ethernet
driver.
Fix compilarion warning:
drivers/net/ethernet/rtl838x_eth.c: In function 'rtl930x_mdio_reset':
drivers/net/ethernet/rtl838x_eth.c:1959:43: error: this statement may fall through [-Werror=implicit-fallthrough=]
 1959 |                         private_poll_mask |= BIT(i);
drivers/net/ethernet/rtl838x_eth.c:1961:17: note: here
 1961 |                 case PHY_INTERFACE_MODE_USXGMII:
      |                 ^~~~

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agorealtek: 5.15: fix uninizialized variable in rtl83xx qos driver
Christian Marangi [Sun, 7 May 2023 07:57:01 +0000 (09:57 +0200)]
realtek: 5.15: fix uninizialized variable in rtl83xx qos driver

Fix uninizialized variable in rtl83xx qos driver
Fix compilation error:
drivers/net/dsa/rtl83xx/qos.c: In function 'rtl838x_setup_prio2queue_matrix':
drivers/net/dsa/rtl83xx/qos.c:298:19: error: 'v' is used uninitialized [-Werror=uninitialized]
  298 |                 v |= i << (min_queues[i] * 3);
      |                 ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl83xx/qos.c:294:13: note: 'v' was declared here
  294 |         u32 v;
      |             ^
drivers/net/dsa/rtl83xx/qos.c: In function 'rtl83xx_setup_prio2queue_cpu_matrix':
drivers/net/dsa/rtl83xx/qos.c:320:19: error: 'v' is used uninitialized [-Werror=uninitialized]
  320 |                 v |= max_queues[i] << (i * 3);
      |                 ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl83xx/qos.c:316:13: note: 'v' was declared here
  316 |         u32 v;
      |             ^
cc1: all warnings being treated as errors
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agorealtek: 5.15: comment unused part of realtek ethernet driver
Christian Marangi [Sun, 7 May 2023 03:22:47 +0000 (05:22 +0200)]
realtek: 5.15: comment unused part of realtek ethernet driver

Comment unused part of realtek phy driver.
Fix compilation warning:
drivers/net/phy/rtl83xx-phy.c: In function 'rtl8380_configure_int_rtl8218b':
drivers/net/phy/rtl83xx-phy.c:747:21: error: unused variable 'ipd_flag' [-Werror=unused-variable]
  747 |                 int ipd_flag = 1;
      |                     ^~~~~~~~
drivers/net/phy/rtl83xx-phy.c: At top level:
drivers/net/phy/rtl83xx-phy.c:3333:13: error: 'rtl931x_sds_disable' defined but not used [-Werror=unused-function]
 3333 | static void rtl931x_sds_disable(u32 sds)
      |             ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Comment unused part of realtek dsa driver.
Fix compilation warning:
drivers/net/dsa/rtl83xx/common.c: In function 'rtl83xx_fib_event':
drivers/net/dsa/rtl83xx/common.c:1430:58: error: unused variable 'fen6_info' [-Werror=unused-variable]
 1430 |                         struct fib6_entry_notifier_info *fen6_info = ptr;
      |                                                          ^~~~~~~~~
drivers/net/dsa/rtl83xx/common.c: At top level:
drivers/net/dsa/rtl83xx/common.c:531:12: error: 'rtl83xx_octet_cntr_alloc' defined but not used [-Werror=unused-function]
  531 | static int rtl83xx_octet_cntr_alloc(struct rtl838x_switch_priv *priv)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Drop unused priv in realtek dsa driver.
Fix compilation warning:
drivers/net/dsa/rtl83xx/dsa.c: In function 'rtl83xx_port_lag_change':
drivers/net/dsa/rtl83xx/dsa.c:2016:37: error: unused variable 'priv' [-Werror=unused-variable]
 2016 |         struct rtl838x_switch_priv *priv = ds->priv;
      |                                     ^~~~
cc1: all warnings being treated as errors

Comment rtl838x_pie_rule_dump in realtek dsa driver for rtl83xx
Fix compilation warning:
drivers/net/dsa/rtl83xx/rtl838x.c:1294:13: error: 'rtl838x_pie_rule_dump' defined but not used [-Werror=unused-function]
 1294 | static void rtl838x_pie_rule_dump(struct  pie_rule *pr)
      |             ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Comment multiple function in realtek dsa driver for rtl930x
Fix compilation warning:
drivers/net/dsa/rtl83xx/rtl930x.c:1463:12: error: 'rtl930x_l3_intf_add' defined but not used [-Werror=unused-function]
 1463 | static int rtl930x_l3_intf_add(struct rtl838x_switch_priv *priv, struct rtl838x_l3_intf *intf)
      |            ^~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl83xx/rtl930x.c:1414:12: error: 'rtl930x_l3_mtu_del' defined but not used [-Werror=unused-function]
 1414 | static int rtl930x_l3_mtu_del(struct rtl838x_switch_priv *priv, int mtu)
      |            ^~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl83xx/rtl930x.c:995:12: error: 'rtl930x_l3_hash6' defined but not used [-Werror=unused-function]
  995 | static u32 rtl930x_l3_hash6(struct in6_addr *ip6, int algorithm, bool move_dip)
      |            ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

drivers/net/dsa/rtl83xx/rtl930x.c:1690:13: error: 'rtl930x_read_pie_fixed_fields' defined but not used [-Werror=unused-function]
 1690 | static void rtl930x_read_pie_fixed_fields(u32 r[], struct pie_rule *pr)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl83xx/rtl930x.c:1432:12: error: 'rtl930x_l3_mtu_add' defined but not used [-Werror=unused-function]
 1432 | static int rtl930x_l3_mtu_add(struct rtl838x_switch_priv *priv, int mtu)
      |            ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Comment rtl931x_read_pie_fixed_fields in realtek dsa driver for rtl931x
Fix compilation warning:
drivers/net/dsa/rtl83xx/rtl931x.c:1116:13: error: 'rtl931x_read_pie_fixed_fields' defined but not used [-Werror=unused-function]
 1116 | static void rtl931x_read_pie_fixed_fields(u32 r[], struct pie_rule *pr)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Comment rtl93xx_header_vlan_set in realtek ethernet driver for rtl838x
Fix compilation warning:
drivers/net/ethernet/rtl838x_eth.c: At top level:
drivers/net/ethernet/rtl838x_eth.c:164:13: error: 'rtl93xx_header_vlan_set' defined but not used [-Werror=unused-function]
  164 | static void rtl93xx_header_vlan_set(struct p_hdr *h, int vlan)
      |             ^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agorealtek: 5.15: fix warning for i2c_mii_valid_phy_id and i2c_mii_phy_addr
Christian Marangi [Sun, 7 May 2023 00:44:05 +0000 (02:44 +0200)]
realtek: 5.15: fix warning for i2c_mii_valid_phy_id and i2c_mii_phy_addr

Rework exposing i2c_mii_valid_phy_id and i2c_mii_phy_addr in global
include.
Fix compilation warning:
In file included from drivers/net/phy/sfp.c:11:
./include/linux/mdio/mdio-i2c.h:27:21: error: 'i2c_mii_phy_addr' defined but not used [-Werror=unused-function]
   27 | static unsigned int i2c_mii_phy_addr(int phy_id)
      |                     ^~~~~~~~~~~~~~~~
./include/linux/mdio/mdio-i2c.h:22:13: error: 'i2c_mii_valid_phy_id' defined but not used [-Werror=unused-function]
   22 | static bool i2c_mii_valid_phy_id(int phy_id)
      |             ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agorealtek: 5.15: fix compilation warning with PHY_INTERFACE_MODE_HSGMII
Christian Marangi [Sat, 6 May 2023 23:37:48 +0000 (01:37 +0200)]
realtek: 5.15: fix compilation warning with PHY_INTERFACE_MODE_HSGMII

PHY_INTERFACE_MODE_HSGMII was not handled in phylink_get_linkmodes and
phylink_parse_mode.
Fix compilation warning by adding it in the enum:
drivers/net/phy/phylink.c: In function 'phylink_get_linkmodes':
drivers/net/phy/phylink.c:360:9: error: enumeration value 'PHY_INTERFACE_MODE_HSGMII' not handled in switch [-Werror=switch]
  360 |         switch (interface) {
      |         ^~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoramips: 5.15: add patch fixing compilation warning for hsdma-mt7621
Christian Marangi [Sat, 6 May 2023 23:13:45 +0000 (01:13 +0200)]
ramips: 5.15: add patch fixing compilation warning for hsdma-mt7621

Add patch fixing compilation warning for hsdma-mt7621:
drivers/staging/mt7621-dma/hsdma-mt7621.c: In function 'mtk_hsdma_probe':
drivers/staging/mt7621-dma/hsdma-mt7621.c:685:9: error: ignoring return value of 'device_reset' declared with attribute 'warn_unused_result' [-Werror=unused-result]
  685 |         device_reset(&pdev->dev);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoralink: rt3833: fix compilation warning from device_reset in fe_probe
Christian Marangi [Sat, 6 May 2023 21:24:46 +0000 (23:24 +0200)]
ralink: rt3833: fix compilation warning from device_reset in fe_probe

Fix compilation warning from device_reset in fe_probe. On fail print a
warning but don't fail probe.
Fix compilation warning:
drivers/net/ethernet/ralink/mtk_eth_soc.c: In function 'fe_probe':
drivers/net/ethernet/ralink/mtk_eth_soc.c:1564:9: error: ignoring return value of 'device_reset' declared with attribute 'warn_unused_result' [-Werror=unused-result]
 1564 |         device_reset(&pdev->dev);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoralink: mt76x8: fix compilation warning in esw driver
Christian Marangi [Sat, 6 May 2023 21:21:27 +0000 (23:21 +0200)]
ralink: mt76x8: fix compilation warning in esw driver

Fix compilation warning for debug string in esw driver:
drivers/net/ethernet/ralink/esw_rt3050.c:1535:9: note: in expansion of macro 'dev_info'
 1535 |         dev_info(&pdev->dev, "mediatek esw at 0x%08lx, irq %d initialized\n",
      |         ^~~~~~~~
drivers/net/ethernet/ralink/esw_rt3050.c:1535:53: note: format string is defined here
 1535 |         dev_info(&pdev->dev, "mediatek esw at 0x%08lx, irq %d initialized\n",
      |                                                 ~~~~^
      |                                                     |
      |                                                     long unsigned int
      |                                                 %08p
cc1: all warnings being treated as errors

Fix unused variable causing compilation warning:
drivers/net/ethernet/ralink/esw_rt3050.c: In function 'esw_interrupt':
drivers/net/ethernet/ralink/esw_rt3050.c:769:13: error: unused variable 'i' [-Werror=unused-variable]
  769 |         int i;
      |             ^
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoramips: mtk-mcc: move cmd_buf for dbg under ifdef
Christian Marangi [Sat, 6 May 2023 21:16:13 +0000 (23:16 +0200)]
ramips: mtk-mcc: move cmd_buf for dbg under ifdef

Move cmd_buf for dbg under ifdef to fix compilation warning:
drivers/mmc/host/mtk-mmc/dbg.c:51:13: error: 'cmd_buf' defined but not used [-Werror=unused-variable]
   51 | static char cmd_buf[256];
      |             ^~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoralink: mt7620: fix compilation warning for device_reset in i2s driver
Christian Marangi [Sat, 6 May 2023 21:08:36 +0000 (23:08 +0200)]
ralink: mt7620: fix compilation warning for device_reset in i2s driver

Fix compilation warning for device_reset in i2s driver.
Fix compilation warning:
sound/soc/ralink/ralink-i2s.c: In function 'ralink_i2s_probe':
sound/soc/ralink/ralink-i2s.c:885:9: error: ignoring return value of 'device_reset' declared with attribute 'warn_unused_result' [-Werror=unused-result]
  885 |         device_reset(&pdev->dev);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errorralink: mt7620: fix compilation
warning for device_reset in i2s driver

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agooxnas: 5.15: fix mangle bootargs patch compilation warning
Christian Marangi [Sat, 6 May 2023 20:50:48 +0000 (22:50 +0200)]
oxnas: 5.15: fix mangle bootargs patch compilation warning

Fix mangle bootargs patch compilation warning due to defined but not
used functions.
Fix compilation warning:
arch/arm/boot/compressed/atags_to_fdt.c:63:17: error: 'get_cell_size' defined but not used [-Werror=unused-function]
   63 | static uint32_t get_cell_size(const void *fdt)
      |                 ^~~~~~~~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c:43:12: error: 'setprop_cell' defined but not used [-Werror=unused-function]
   43 | static int setprop_cell(void *fdt, const char *node_path,
      |            ^~~~~~~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c:25:12: error: 'setprop' defined but not used [-Werror=unused-function]
   25 | static int setprop(void *fdt, const char *node_path, const char *property,
      |            ^~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c: In function 'atags_to_fdt':
arch/arm/boot/compressed/atags_to_fdt.c:207:18: error: unused variable 'memsize' [-Werror=unused-variable]
  207 |         int ret, memsize;
      |                  ^~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c:206:13: error: unused variable 'memcount' [-Werror=unused-variable]
  206 |         int memcount = 0;
      |             ^~~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c:205:16: error: unused variable 'mem_reg_property' [-Werror=unused-variable]
  205 |         __be32 mem_reg_property[2 * 2 * NR_BANKS];
      |                ^~~~~~~~~~~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c: At top level:
arch/arm/boot/compressed/atags_to_fdt.c:174:13: error: 'hex_str' defined but not used [-Werror=unused-function]
  174 | static void hex_str(char *out, uint32_t value)
      |             ^~~~~~~
cc1: all warnings being treated as errors

Also make some variable const to fix compilation warning:
arch/arm/boot/compressed/atags_to_fdt.c: In function 'append_rootblock':
arch/arm/boot/compressed/atags_to_fdt.c:91:13: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
   91 |         ptr = str - 1;
      |             ^

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoramips: 5.15: handle return from device_reset in I2C driver
Christian Marangi [Sat, 6 May 2023 20:40:39 +0000 (22:40 +0200)]
ramips: 5.15: handle return from device_reset in I2C driver

Handle return from device reset in I2C driver. Don't fail on
device_reset error but print a warning.

Fix compilation warning:
sound/soc/ralink/ralink-i2s.c: In function 'ralink_i2s_probe':
sound/soc/ralink/ralink-i2s.c:885:9: error: ignoring return value of 'device_reset' declared with attribute 'warn_unused_result' [-Werror=unused-result]
  885 |         device_reset(&pdev->dev);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoramips: mt7620: handle request_irq fail in gsw ethernet driver
Christian Marangi [Sat, 6 May 2023 20:38:42 +0000 (22:38 +0200)]
ramips: mt7620: handle request_irq fail in gsw ethernet driver

Handle return from request_irq in gsw ethernet driver.
Fix compilation warning:
drivers/net/ethernet/ralink/gsw_mt7620.c: In function 'mtk_gsw_init':
drivers/net/ethernet/ralink/gsw_mt7620.c:236:17: error: ignoring return value of 'request_irq' declared with attribute 'warn_unused_result' [-Werror=unused-result]
  236 |                 request_irq(gsw->irq, gsw_interrupt_mt7620, 0,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  237 |                             "gsw", priv);
      |                             ~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agomac80211: brcm: fix compilation warning for unused brcmf_of_fwnames
Christian Marangi [Sat, 6 May 2023 17:28:36 +0000 (19:28 +0200)]
mac80211: brcm: fix compilation warning for unused brcmf_of_fwnames

If CPTCFG_BRCMFMAC_SDIO is not used brcmf_of_fwnames is defined but not
used in the case of CONFIG_OF not compiled.

Restrict brcmf_of_fwnames only with CPTCFG_BRCMFMAC_SDIO selected.
Fix compilation warning:
/__w/openwrt/openwrt/openwrt/build_dir/target-x86_64-openwrt-linux-musl_musl/linux-x86_64/backports-6.1.24/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h:16:1: error: 'brcmf_of_fwnames' defined but not used [-Werror=unused-function]
   16 | brcmf_of_fwnames(struct device *dev, u32 *map_count)
      | ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoath10k-ct: add patch fixing compilation warning for debug level
Christian Marangi [Sat, 6 May 2023 13:41:21 +0000 (15:41 +0200)]
ath10k-ct: add patch fixing compilation warning for debug level

Add patch fixing compilation warning for debug level read.
Fix compilation warning:
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-malta_be/ath10k-ct-regular/ath10k-ct-2022-05-13-f808496f/ath10k-5.15/debug.c: In function 'ath10k_read_debug_level': /__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-malta_be/ath10k-ct-regular/ath10k-ct-2022-05-13-f808496f/ath10k-5.15/debug.c:1388:1: error: the frame size of 1440 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
1388 | }
| ^

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agobcm47xx: 5.15: fix compilation warning for yenta socket patchi
Christian Marangi [Sat, 6 May 2023 23:24:04 +0000 (01:24 +0200)]
bcm47xx: 5.15: fix compilation warning for yenta socket patchi

Rework the patch to completely disable yenta_probe_irq function.
The generated mask is zero by lack due to the fact that probe_irq_mask
use a val never initialized. Correctly rework the ifdef to make the
function always return 0.

Fix compilation warning:
drivers/pcmcia/yenta_socket.c:926:13: error: unused variable 'i' [-Werror=unused-variable]
  926 |         int i;
      |             ^
drivers/pcmcia/yenta_socket.c:954:16: error: 'val' is used uninitialized [-Werror=uninitialized]
  954 |         mask = probe_irq_mask(val) & 0xffff;
      |                ^~~~~~~~~~~~~~~~~~~
drivers/pcmcia/yenta_socket.c:927:23: note: 'val' was declared here
  927 |         unsigned long val;
      |                       ^~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agomac80211: ath9k: handle error from copy_to_user in read_file_eeprom
Christian Marangi [Sat, 6 May 2023 10:41:46 +0000 (12:41 +0200)]
mac80211: ath9k: handle error from copy_to_user in read_file_eeprom

Handle error from copy_to_user in read_file_eeprom.
Fix compilarion warning:
/__w/openwrt/openwrt/openwrt/build_dir/target-x86_64-openwrt-linux-musl_musl/linux-x86_64/backports-6.1.24/drivers/net/wireless/ath/ath9k/debug.c: In function 'read_file_eeprom':
/__w/openwrt/openwrt/openwrt/build_dir/target-x86_64-openwrt-linux-musl_musl/linux-x86_64/backports-6.1.24/drivers/net/wireless/ath/ath9k/debug.c:1451:17: error: ignoring return value of 'copy_to_user' declared with attribute 'warn_unused_result' [-Werror=unused-result]
 1451 |                 copy_to_user(user_buf, from, bytes);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agolantiq: fix compilation warning in lantiq_etop_init
Aleksander Jan Bajkowski [Sat, 6 May 2023 13:59:24 +0000 (15:59 +0200)]
lantiq: fix compilation warning in lantiq_etop_init

Commit c5cc3d96109a ("lantiq: Change the data-type of mac address in ETOP driver")
changed the type of the mac variable. Since then, the priv->mac check always evaluates
as true, so this check can be removed.

This fix compilation warning:
drivers/net/ethernet/lantiq_etop.c: In function 'ltq_etop_init':
drivers/net/ethernet/lantiq_etop.c:775:13: warning: the comparison will always evaluate as 'true' for the address of 'mac' will never be NULL [-Waddress]
  775 |         if (priv->mac && !is_valid_ether_addr(mac.sa_data))
      |             ^~~~
drivers/net/ethernet/lantiq_etop.c:157:23: note: 'mac' declared here
  157 |         unsigned char mac[6];
      |
cc1: all warnings being treated as errors

Fixes: c5cc3d96109a ("lantiq: Change the data-type of mac address in ETOP driver")
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
[ fix wrong fixes tag format ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agolantiq: lzma-loader: fix mismatched function declaration
Aleksander Jan Bajkowski [Sat, 6 May 2023 14:49:40 +0000 (16:49 +0200)]
lantiq: lzma-loader: fix mismatched function declaration

This fix compilation warning:
printf.c:14:13: warning: type of 'board_putc' does not match original declaration [-Wlto-type-mismatch]
   14 | extern void board_putc(int ch);
      |             ^
board-lantiq.c:24:6: note: type mismatch in parameter 1
   24 | void board_putc(char c)
      |      ^
board-lantiq.c:24:6: note: type 'char' should match type 'int'
board-lantiq.c:24:6: note: 'board_putc' was previously declared here

Fixes: a328b6831c0f ("lantiq: bring back okli loader")
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
18 months agokernel: psb6970: drop unused variable in psb6970_config_init
Aleksander Jan Bajkowski [Sat, 6 May 2023 14:38:49 +0000 (16:38 +0200)]
kernel: psb6970: drop unused variable in psb6970_config_init

Drop unused variable in psb6970_config_init. This variable should have
been dropped in 0806f8fc80e6 ("lantiq: add Linux 5.10 support as testing kernel").

This fix compilation warning:
drivers/net/phy/psb6970.c: In function 'psb6970_config_init':
drivers/net/phy/psb6970.c:310:28: warning: unused variable 'dev' [-Wunused-variable]
  310 |         struct net_device *dev = pdev->attached_dev;
      |
cc1: all warnings being treated as errors

Fixes: 0806f8fc80e6 ("lantiq: add Linux 5.10 support as testing kernel")
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
18 months agolantiq: fix compilation warning in cfi_mtdset_0001
Aleksander Jan Bajkowski [Sat, 6 May 2023 13:19:25 +0000 (15:19 +0200)]
lantiq: fix compilation warning in cfi_mtdset_0001

Some write buffer functions are not used when FORCE_WORD_WRITE is set to 1.
So the compile warning messages are output if FORCE_WORD_WRITE is 1. To
resolve this disable the write buffer functions if FORCE_WORD_WRITE is 1.

This fix compilation warning:
drivers/mtd/chips/cfi_cmdset_0001.c:307:13: warning: 'fixup_use_write_buffers' defined but not used [-Wunused-function]
  307 | static void fixup_use_write_buffers(struct mtd_info *mtd)
      |             ^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
18 months agogeneric: 5.15: backport bcm63xx wdt patch fixing fallthrough warning
Christian Marangi [Sat, 6 May 2023 08:36:48 +0000 (10:36 +0200)]
generic: 5.15: backport bcm63xx wdt patch fixing fallthrough warning

Backport patch present upstream fixing error for bcm63xx:
drivers/watchdog/bcm63xx_wdt.c: In function 'bcm63xx_wdt_ioctl':
drivers/watchdog/bcm63xx_wdt.c:208:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
  208 |                 bcm63xx_wdt_pet();
      |                 ^~~~~~~~~~~~~~~~~
drivers/watchdog/bcm63xx_wdt.c:210:9: note: here
  210 |         case WDIOC_GETTIMEOUT:
      |         ^~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: gpio-nct5104d: drop unused variables in nct5104d_gpio_init
Christian Marangi [Sat, 6 May 2023 06:26:46 +0000 (08:26 +0200)]
kernel: gpio-nct5104d: drop unused variables in nct5104d_gpio_init

Drop unused variables in nct5104d_gpio_init. These variables should have
been dropped in d3b8e6b2a77d ("kernel: gpio-nct5104d remove boardname check").
Thix fix compilation warning:
/__w/openwrt/openwrt/openwrt/build_dir/target-x86_64-openwrt-linux-musl_musl/linux-x86_64/gpio-nct5104d/gpio-nct5104d.c: In function 'nct5104d_gpio_init':
/__w/openwrt/openwrt/openwrt/build_dir/target-x86_64-openwrt-linux-musl_musl/linux-x86_64/gpio-nct5104d/gpio-nct5104d.c:413:21: error: unused variable 'board_name' [-Werror=unused-variable]
  413 |         const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
      |                     ^~~~~~~~~~
/__w/openwrt/openwrt/openwrt/build_dir/target-x86_64-openwrt-linux-musl_musl/linux-x86_64/gpio-nct5104d/gpio-nct5104d.c:412:21: error: unused variable 'board_vendor' [-Werror=unused-variable]
  412 |         const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
      |                     ^~~~~~~~~~~~
cc1: all warnings being treated as errors

Fixes: d3b8e6b2a77d ("kernel: gpio-nct5104d remove boardname check")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: 5.15: add pending patch fixing binfmt compilation warning
Christian Marangi [Sat, 6 May 2023 06:18:11 +0000 (08:18 +0200)]
generic: 5.15: add pending patch fixing binfmt compilation warning

Add pending patch fixing binfmt compilation warning on some arch.
This fix compilation warning:
fs/binfmt_elf.c: In function 'parse_elf_properties.isra':
fs/binfmt_elf.c:821:1: error: the frame size of 1040 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
  821 | }
      | ^
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agobcm4908: 5.15: fix compilation error for BCM4908 pinmux patch
Christian Marangi [Sat, 6 May 2023 05:44:05 +0000 (07:44 +0200)]
bcm4908: 5.15: fix compilation error for BCM4908 pinmux patch

Fix compilation warning:
drivers/pinctrl/bcm/pinctrl-bcm4908.c: In function 'bcm4908_pinctrl_probe':
drivers/pinctrl/bcm/pinctrl-bcm4908.c:541:53: error: passing argument 3 of 'pinmux_generic_add_function' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
  541 |                                             function->groups,
      |                                             ~~~~~~~~^~~~~~~~
In file included from drivers/pinctrl/bcm/pinctrl-bcm4908.c:16:
drivers/pinctrl/bcm/../pinmux.h:153:46: note: expected 'const char **' but argument is of type 'const char * const*'
  153 |                                 const char **groups,
      |                                 ~~~~~~~~~~~~~^~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: 5.15: add pending patch fixing compilation warning in jffs2
Christian Marangi [Sat, 6 May 2023 05:06:09 +0000 (07:06 +0200)]
generic: 5.15: add pending patch fixing compilation warning in jffs2

Current gcc set a limit for each stack and complain if this limit is not
followed. JFSS2 in build_xattr function currently exceed the limit by
allocating a massive array of struct of 128 elements. Introduce a
pending patch that allocate this temp array dynamically fixing the
compilation warning:

fs/jffs2/xattr.c: In function 'jffs2_build_xattr_subsystem':
fs/jffs2/xattr.c:887:1: error: the frame size of 1088 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
  887 | }
      | ^

Affecting many target that require jffs2 support.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoath79: 5.15: drop unused res variable from pci ar724x OF convert patch
Christian Marangi [Sat, 6 May 2023 05:04:15 +0000 (07:04 +0200)]
ath79: 5.15: drop unused res variable from pci ar724x OF convert patch

Drop unused res variable from pci ar724x OF convert patch fixing
compilation warning:

arch/mips/pci/pci-ar724x.c: In function 'ar724x_pci_probe':
arch/mips/pci/pci-ar724x.c:387:26: error: unused variable 'res' [-Werror=unused-variable]
  387 |         struct resource *res;
      |                          ^~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoipq40xx: add PSGMII PHY mode to phylink_get_linkmodes()
Robert Marko [Sat, 6 May 2023 10:45:56 +0000 (12:45 +0200)]
ipq40xx: add PSGMII PHY mode to phylink_get_linkmodes()

Upstream commit ("net: phylink: add generic validate implementation") was
backported, however PSGMII PHY mode patch for ipq40xx was not updated to
add PSGMII to phylink_get_linkmodes() so the following warning would be
printed during kernel compilation:
drivers/net/phy/phylink.c: In function 'phylink_get_linkmodes':
drivers/net/phy/phylink.c:360:9: error: enumeration value 'PHY_INTERFACE_MODE_PSGMII' not handled in switch [-Werror=switch]
  360 |         switch (interface) {
      |         ^~~~~~

Resolve the warning by adding the PSGMII mode to phylink_get_linkmodes().

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agoramips: 5.15: handle error from device_reset in SPI ralink driver
Christian Marangi [Sat, 6 May 2023 01:33:54 +0000 (03:33 +0200)]
ramips: 5.15: handle error from device_reset in SPI ralink driver

Handle error from device reset in SPI ralink driver fixing compilation
warning:

drivers/spi/spi-rt2880.c: In function 'rt2880_spi_probe':
drivers/spi/spi-rt2880.c:474:17: error: ignoring return value of 'device_reset' declared with attribute 'warn_unused_result' [-Werror=unused-result]
  474 |                 device_reset(&pdev->dev);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoath79: 5.15: drop unused res variable from pci ar71xx OF convert patch
Christian Marangi [Sat, 6 May 2023 01:21:48 +0000 (03:21 +0200)]
ath79: 5.15: drop unused res variable from pci ar71xx OF convert patch

Drop unused res variable from pci ar71xx OF convert patch fixing
compilation warning:

arch/mips/pci/pci-ar71xx.c: In function 'ar71xx_pci_probe':
arch/mips/pci/pci-ar71xx.c:287:26: error: unused variable 'res' [-Werror=unused-variable]
  287 |         struct resource *res;
      |                          ^~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agonat46: bump to latest git HEAD
Christian Marangi [Sat, 6 May 2023 01:10:18 +0000 (03:10 +0200)]
nat46: bump to latest git HEAD

4c5beee get rid of VLA on the stack, and fix the resulting error of a too large stack frame
80dda1d Fix LAN->WAN ping failure with over MTU size on outgoing interface

Commit 4c5beee as a side effect fix a compilation warning with

/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-malta_be/nat46-2022-03-30-95ca1c3b/nat46/modules/nat46-netdev.c: In function 'nat46_remove':
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-malta_be/nat46-2022-03-30-95ca1c3b/nat46/modules/nat46-netdev.c:260:9: error: ISO C90 forbids variable length array 'config_remove' [-Werror=vla]
  260 |         char config_remove[buflen];
      |         ^~~~
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-malta_be/nat46-2022-03-30-95ca1c3b/nat46/modules/nat46-netdev.c:280:17: error: ISO C90 forbids variable length array 'config' [-Werror=vla]
  280 |                 char config[buflen];
      |                 ^~~~
cc1: all warnings being treated as errors

Also this now require nf_defrag_ipv6 as a new dependency.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoipq806x: 5.15: fix compilation warning from mangle bootargs patch
Christian Marangi [Sat, 6 May 2023 00:23:31 +0000 (02:23 +0200)]
ipq806x: 5.15: fix compilation warning from mangle bootargs patch

Fix compilation warning from mangle bootargs patch. Now that we flag
warning as error these cause compilation error.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: 5.15: enable Werror by default for kernel compile
Christian Marangi [Fri, 5 May 2023 23:49:14 +0000 (01:49 +0200)]
generic: 5.15: enable Werror by default for kernel compile

From 5.15 and up linux kernel introduced CONFIG_WERROR to flag any
warning as error. To improve code quality, enable this by default to
catch any warning and fix it.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoRevert "ath79: add empty squashfs-lzma filesystem"
Daniel Golle [Fri, 12 May 2023 00:23:10 +0000 (02:23 +0200)]
Revert "ath79: add empty squashfs-lzma filesystem"

This reverts commit 91e3419a33f3f0baa2fb25680f5c9a7b2240102b.
Now that squashfs3-lzma generates reproducible output we can drop the
empty binary. Having a binary file in the tree is not nice and we actually
also use squashfs3-lzma for devices which expect the kernel to be loaded
from a squashfs3...

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agotools: squashfs3-lzma: generate reproducible output
Daniel Golle [Fri, 12 May 2023 00:17:21 +0000 (02:17 +0200)]
tools: squashfs3-lzma: generate reproducible output

Always initialize header with zeros as otherwise we may end up with
uninitialized memory which ruins reproducibility.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agomediatek: apply stock configuration for WAN-LED
David Bauer [Sun, 30 Apr 2023 12:01:50 +0000 (14:01 +0200)]
mediatek: apply stock configuration for WAN-LED

Apply the same LED configuration used by the vendor-firmware for the
GPY211 controlled WAN LED in OpenWrt.

Signed-off-by: David Bauer <mail@david-bauer.net>
18 months agomediatek: configure TUF-AX4200 LAN LEDs
David Bauer [Thu, 27 Apr 2023 23:59:25 +0000 (01:59 +0200)]
mediatek: configure TUF-AX4200 LAN LEDs

As we can now configure the switch LED configuration, write the switch
LED configuration values from the vendor firmware to the switch-IC.

Previously, the switch-LEDs did not show any acitvity or link-status
whatsoever.

Signed-off-by: David Bauer <mail@david-bauer.net>
18 months agogeneric: add hack for MT753x LED configuration
David Bauer [Sun, 30 Apr 2023 11:46:26 +0000 (13:46 +0200)]
generic: add hack for MT753x LED configuration

This adds a small hack similar to the one used for ar8xxx switches to
read a reg:value map for configuring the LED configuration registers.

This allows OpenWrt to write device-specific LED action as well as blink
configurations. It is unlikely to be accepted upstream, as upstream
plans on integrating their own framework for handling these LEDs.

Signed-off-by: David Bauer <mail@david-bauer.net>
18 months agogeneric: mt7530: enable PHY configuration using OF
David Bauer [Sun, 30 Apr 2023 11:45:33 +0000 (13:45 +0200)]
generic: mt7530: enable PHY configuration using OF

The MT753x switches provide a switch-internal MDIO bus for the embedded
PHYs.

Register a OF sub-node on the switch OF-node for this internal MDIO bus.
This allows to configure the embedded PHYs using device-tree.

Signed-off-by: David Bauer <mail@david-bauer.net>
18 months agogeneric: enable CONFIG_ARM_CRYPTO for 32bit arm targets
Lu jicong [Wed, 10 May 2023 04:08:23 +0000 (12:08 +0800)]
generic: enable CONFIG_ARM_CRYPTO for 32bit arm targets

Fix following error when building 32bit arm targets with kmod-crypto-sha512
ERROR: module '/home/user/openwrt/build_dir/target-arm_xscale_musl_eabi/linux-kirkwood_generic/linux-5.15.109/arch/arm/crypto/sha512-arm.ko' is missing.

Signed-off-by: Lu jicong <jiconglu58@gmail.com>
18 months agogeneric: refresh 5.15 kernel config
Lu jicong [Wed, 10 May 2023 04:02:42 +0000 (12:02 +0800)]
generic: refresh 5.15 kernel config

prepare for enabling CONFIG_ARM_CRYPTO on these targets

Signed-off-by: Lu jicong <jiconglu58@gmail.com>
18 months agobuild: generate index.json
Paul Spooren [Tue, 9 May 2023 19:39:58 +0000 (21:39 +0200)]
build: generate index.json

The index.json file lies next to Packages index files and contains a
json dict with the package architecture and a dict of package names and
versions.

This can be used for downstream project to know what packages in which
versions are available.

Signed-off-by: Paul Spooren <mail@aparcar.org>
18 months agobase-files: Do not break on non-eth ports
Olliver Schinagl [Thu, 22 Sep 2022 10:05:00 +0000 (12:05 +0200)]
base-files: Do not break on non-eth ports

When using OpenWRT with DSA and 'lan' ports, we could get an empty
`next_eth`. This is of course not desirable, as this causes `sh: out of
range` errors when trying to determine which one would be greater.

It turns out, that we don't even need this check at all because, when
looking for all existin eth*s on a system, and take the highest index
and then iterate a set of devices and rename to eth${highest_index+n},
it is guaranteed that there will be no conflict.

Fixes: b688bf83f9d6 ("base-files: rename ethernet devs on known boards")
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
18 months agoRevert "scripts: run ipkg-make-index through shellcheck"
Paul Spooren [Tue, 9 May 2023 19:32:26 +0000 (21:32 +0200)]
Revert "scripts: run ipkg-make-index through shellcheck"

This reverts commit e6aa1a70e6c870cfeac838b52ad57b6888e6629d.

18 months agoscripts: run ipkg-make-index through shellcheck
Paul Spooren [Tue, 9 May 2023 17:06:23 +0000 (19:06 +0200)]
scripts: run ipkg-make-index through shellcheck

Use quotes and replace `` by $() to pass the shellcheck tests.

Signed-off-by: Paul Spooren <mail@aparcar.org>
18 months agoramips: add support for Linksys RE7000
Christoph Krapp [Sun, 12 Mar 2023 09:40:45 +0000 (10:40 +0100)]
ramips: add support for Linksys RE7000

Hardware specification:

- SoC: MediaTek MT7621AT (880 MHz)
- Flash: 16 MB (Macronix MX25L12835FM2I-10G)
- RAM: 128 MB (Nanya NT5CC64M16GP-DI)
- WLAN 2.4 GHz: 2x2 MediaTek MT7603EN
- WLAN 5 GHz: 2x2 MediaTek MT7615N
- Ethernet: 1x 10/100/1000 Mbps
- LED: Power, Wifi, WPS
- Button: Reset, WPS
- UART: 1:VCC, 2:GND, 3:TX, 4:RX (from LAN port)
  Serial console @ 57600,8n1

Flash instructions:

Connect to serial console and start up the device. As the bootloader got
locked you need to type in a password to unlock U-Boot access.
When you see the following output on the console:

relocate_code Pointer at: 87f1c000

type in the super secure password:

1234567890

Then select TFTP boot from RAM by selecting option 1 in the boot menu.
As Linksys decided to leave out a basic TFTP configuration you need to
set server- & client ip as well as the image filename the device will
search for. You need to use the initramfs openwrt image for the TFTP
boot process.

Once openwrt has booted up, upload the sysupgrade image via scp and run
sysupgrade as normal.

Signed-off-by: Christoph Krapp <achterin@gmail.com>
18 months agokernel: other: limit mhi-pci-generic to devices with PCI support
Aleksander Jan Bajkowski [Sun, 7 May 2023 09:08:03 +0000 (11:08 +0200)]
kernel: other: limit mhi-pci-generic to devices with PCI support

Kmod-mhi-pci-generic supports Qualcomm modems over PCIe bus. On targets
without PCI support, this package is empty. Symbol CONFIG_MHI_BUS_PCI_GENERIC
depends on CONFIG_PCI.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
18 months agokernel: other: limit serial-8250-exar to devices with PCI support
Aleksander Jan Bajkowski [Fri, 2 Dec 2022 22:48:02 +0000 (23:48 +0100)]
kernel: other: limit serial-8250-exar to devices with PCI support

Kmod-serial-8250-exar supports Serial cards connected via PCIe bus. On targets
without PCI support, this package is empty.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
18 months agokernel: i2c: limit i2c-designware-pci to devices with PCI support
Aleksander Jan Bajkowski [Fri, 2 Dec 2022 22:42:22 +0000 (23:42 +0100)]
kernel: i2c: limit i2c-designware-pci to devices with PCI support

Kmod-i2c-designware-pci supports Synopsys I2C over PCIe bus. On targets
without PCI support, this package is empty. Symbol CONFIG_I2C_DESIGNWARE_PCI
depends on CONFIG_PCI.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
18 months agotools/cpio: update to 2.14
Linhui Liu [Sun, 7 May 2023 07:28:32 +0000 (15:28 +0800)]
tools/cpio: update to 2.14

Noteworthy changes in this release:

* New option --ignore-dirnlink

Valid in copy-out mode, it instructs cpio to ignore the actual number
of links reported for each directory member and always store 2
instead.

* Changes in --reproducible option

The --reproducible option implies --ignore-dirlink.  In other words,
it is equivalent to --ignore-devno --ignore-dirnlink --renumber-inodes.

* Use GNU ls algorithm for deciding timestamp format in -tv mode

* Bugfixes

** Fix cpio header verification.

** Fix handling of device numbers on copy out.

** Fix calculation of CRC in copy-out mode.

** Rewrite the fix for CVE-2015-1197.

** Fix combination of --create --append --directory.

** Fix appending to archives bigger than 2G.

Removed upstreamed:
- 001-duplicate-program-name.patch
- 010-clang.patch

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
18 months agotools/pkgconf: update to 1.9.5
Linhui Liu [Sun, 7 May 2023 10:43:43 +0000 (18:43 +0800)]
tools/pkgconf: update to 1.9.5

Release Notes:
https://github.com/pkgconf/pkgconf/blob/master/NEWS

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
18 months agorockchip: disable UHS speed for ROC-RK3328-CC
Tianling Shen [Sun, 23 Apr 2023 17:03:25 +0000 (01:03 +0800)]
rockchip: disable UHS speed for ROC-RK3328-CC

The previously stated speed of sdr-104 in is too high for the hardware
to reliably communicate with some fast SD cards.
Rockchip boards have a common bug when operating uhs speed, which will
hang the system during a soft reboot.

To be on the safe side, lower the speed to workaround.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
18 months agorockchip: enable rk805 pinctrl driver
Tianling Shen [Sun, 23 Apr 2023 17:00:04 +0000 (01:00 +0800)]
rockchip: enable rk805 pinctrl driver

This is required for ROC-RK3328-CC to light up the LED-s which are
connected to rk805's gpio.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
18 months agorockchip: add Firefly ROC-RK3328-CC support
Tianling Shen [Fri, 7 Apr 2023 15:50:49 +0000 (23:50 +0800)]
rockchip: add Firefly ROC-RK3328-CC support

Hardware
--------
RockChip RK3328 ARM64 (4 cores)
4GB DDR4 RAM
1x 1000 Base-T
2 LEDs (POWER / USER)
HDMI 2.0
3.5mm TRRS AV jack
Micro-SD slot
eMMC slot
1x USB 3.0 Port
2x USB 2.0 Port

Installation
------------
Uncompress the OpenWrt sysupgrade and write it to a micro SD card using
dd.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
18 months agouboot-rockchip: add ROC-RK3328-CC support
Tianling Shen [Fri, 7 Apr 2023 15:46:43 +0000 (23:46 +0800)]
uboot-rockchip: add ROC-RK3328-CC support

Add support for the Firefly ROC-RK3328-CC.
Manually generated of-platdata files to avoid swig dependency.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>