kernel: ltq-vmmc: fix compilation warning/error
authorDaniel Golle <daniel@makrotopia.org>
Wed, 3 Apr 2024 21:54:51 +0000 (22:54 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 4 Apr 2024 14:12:45 +0000 (15:12 +0100)
Fix compilation warning enum-int-mismatch which results in failure to
build kmod-ltq-vmmc in case CONFIG_KERNEL_WERROR is set.
.../build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_vmmc-1.9.0/src/mps/drv_mps_vmmc_common.c:392:14: error: conflicting types for 'ifx_mps_fastbuf_init' due to enum/integer mismatch; have 'IFX_return_t(void)' [-Werror=enum-int-mismatch]
  392 | IFX_return_t ifx_mps_fastbuf_init (IFX_void_t)
      |              ^~~~~~~~~~~~~~~~~~~~
.../build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_vmmc-1.9.0/src/mps/drv_mps_vmmc_common.c:120:13: note: previous declaration of 'ifx_mps_fastbuf_init' with type 'IFX_int32_t(void)' {aka 'int(void)'}
  120 | IFX_int32_t ifx_mps_fastbuf_init (IFX_void_t);
      |             ^~~~~~~~~~~~~~~~~~~~
.../build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_vmmc-1.9.0/src/mps/drv_mps_vmmc_common.c:420:14: error: conflicting types for 'ifx_mps_fastbuf_close' due to enum/integer mismatch; have 'IFX_return_t(void)' [-Werror=enum-int-mismatch]
  420 | IFX_return_t ifx_mps_fastbuf_close (IFX_void_t)
      |              ^~~~~~~~~~~~~~~~~~~~~
.../build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_vmmc-1.9.0/src/mps/drv_mps_vmmc_common.c:121:13: note: previous declaration of 'ifx_mps_fastbuf_close' with type 'IFX_int32_t(void)' {aka 'int(void)'}
  121 | IFX_int32_t ifx_mps_fastbuf_close (IFX_void_t);
      |             ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Refresh patches and bump PKG_RELEASE while at it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
package/kernel/lantiq/ltq-vmmc/Makefile
package/kernel/lantiq/ltq-vmmc/patches/600-fix-compilation-warning-fallthrough.patch
package/kernel/lantiq/ltq-vmmc/patches/602-fix-compilation-warning-int-conversion.patch [new file with mode: 0644]

index 4972f1c374a98f62675eb88d736b6b47c5c1c4c6..8cd6b3de451fd5ece77cfac760cac592acfee3f0 100644 (file)
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=drv_vmmc
 PKG_VERSION:=1.9.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_HASH:=707f515eb727c032418c4da67d7e86884bb56cdc2a606e8f6ded6057d8767e57
index 7282bc446ddb13f9139cd7ae211ee5a2d67c13f7..aaacf2e7ca8ea3a1b7d1da5affe18f4d5cd3991e 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/drv_vmmc_bbd.c
 +++ b/src/drv_vmmc_bbd.c
-@@ -1025,6 +1025,7 @@ static IFX_int32_t vmmc_BBD_WhiteListedCmdWr(VMMC_CHANNEL *pCh,
+@@ -1025,6 +1025,7 @@ static IFX_int32_t vmmc_BBD_WhiteListedC
                 }
              }
           }
diff --git a/package/kernel/lantiq/ltq-vmmc/patches/602-fix-compilation-warning-int-conversion.patch b/package/kernel/lantiq/ltq-vmmc/patches/602-fix-compilation-warning-int-conversion.patch
new file mode 100644 (file)
index 0000000..f95407b
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/src/mps/drv_mps_vmmc_common.c
++++ b/src/mps/drv_mps_vmmc_common.c
+@@ -117,8 +117,8 @@ IFX_void_t ifx_mps_mbx_event_upstream (I
+ #endif /* CONFIG_MPS_EVENT_MBX */
+ IFX_void_t *ifx_mps_fastbuf_malloc (IFX_size_t size, IFX_int32_t priority);
+ IFX_void_t ifx_mps_fastbuf_free (const IFX_void_t * ptr);
+-IFX_int32_t ifx_mps_fastbuf_init (IFX_void_t);
+-IFX_int32_t ifx_mps_fastbuf_close (IFX_void_t);
++IFX_return_t ifx_mps_fastbuf_init (IFX_void_t);
++IFX_return_t ifx_mps_fastbuf_close (IFX_void_t);
+ IFX_uint32_t ifx_mps_reset_structures (mps_comm_dev * pDev);
+ IFX_boolean_t ifx_mps_ext_bufman (IFX_void_t);
+ extern IFX_uint32_t danube_get_cpu_ver (IFX_void_t);
+--- a/src/mps/drv_mps_vmmc_device.h
++++ b/src/mps/drv_mps_vmmc_device.h
+@@ -216,8 +216,8 @@ typedef struct /**< mps buffer monitorin
+    mps_buffer_state_e buf_state;
+    IFX_void_t *(*malloc) (IFX_size_t size, IFX_int32_t priority); /**< Buffer alloc function (def. kmalloc) */
+    IFX_void_t (*free) (const IFX_void_t *ptr);  /**< Buffer free  function (def. kfree) */
+-   IFX_int32_t (*init) (IFX_void_t); /** Manager init function */
+-   IFX_int32_t (*close) (IFX_void_t); /** Manager shutdown function */
++   IFX_return_t (*init) (IFX_void_t); /** Manager init function */
++   IFX_return_t (*close) (IFX_void_t); /** Manager shutdown function */
+ } mps_buf_mng_t;
+ typedef IFX_uint32_t *mem_seg_t[MPS_MAX_PROVISION_SEGMENTS_PER_MSG];