Skip to content

Commit

Permalink
Fix compilation for Openwrt
Browse files Browse the repository at this point in the history
  CC [M]
/media/Standard/openwrt/openwrt-sdk-24.10.0-rc2-mediatek-filogic_gcc-13.3.0_musl.Linux-x86_64/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/rtw88-usb-2024.11.27~611874c6/usb.o
/media/Standard/openwrt/openwrt-sdk-24.10.0-rc2-mediatek-filogic_gcc-13.3.0_musl.Linux-x86_64/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/rtw88-usb-2024.11.27~611874c6/usb.c:
In function 'rtw_usb_init_rx':
/media/Standard/openwrt/openwrt-sdk-24.10.0-rc2-mediatek-filogic_gcc-13.3.0_musl.Linux-x86_64/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/rtw88-usb-2024.11.27~611874c6/usb.c:943:22:
error: cast between incompatible function types from 'void (*)(struct
rtw_usb *)' to 'void (*)(long unsigned int)'
[-Werror=cast-function-type]
  943 |                      (void(*)(unsigned long))rtw_usb_rx_handler,
      |                      ^
cc1: all warnings being treated as errors

Fixes #253.

Signed-off-by: Bitterblue Smith <[email protected]>
  • Loading branch information
Bitterblue Smith committed Dec 10, 2024
1 parent 611874c commit 1c22482
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,9 @@ static void rtw_usb_rx_handler(struct work_struct *work)
{
struct rtw_usb *rtwusb = container_of(work, struct rtw_usb, rx_work);
#else
static void rtw_usb_rx_handler(struct rtw_usb *rtwusb)
static void rtw_usb_rx_handler(unsigned long shut_up_gcc)
{
struct rtw_usb *rtwusb = (struct rtw_usb *)shut_up_gcc;
#endif
struct rtw_dev *rtwdev = rtwusb->rtwdev;
const struct rtw_chip_info *chip = rtwdev->chip;
Expand Down Expand Up @@ -939,8 +940,7 @@ static int rtw_usb_init_rx(struct rtw_dev *rtwdev)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0)
rtwusb->rxwq = alloc_workqueue("rtw88_usb: rx wq", WQ_BH, 0);
#else
tasklet_init(&rtwusb->rx_tasklet,
(void(*)(unsigned long))rtw_usb_rx_handler,
tasklet_init(&rtwusb->rx_tasklet, rtw_usb_rx_handler,
(unsigned long)rtwusb);

rtwusb->rxwq = create_singlethread_workqueue("rtw88_usb: rx wq");
Expand Down

0 comments on commit 1c22482

Please sign in to comment.