[PATCH 02/13] ltq-vdsl-app: fix -Wundef warnings
Mathias Kresin
dev at kresin.me
Fri Dec 11 14:07:18 EST 2020
12/11/20 7:44 PM, Andre Heider:
> On 11/12/2020 18:59, Mathias Kresin wrote:
>> 12/11/20 1:05 PM, Andre Heider:
>>> Shut up these warnings:
>>>
>>> /usr/include/vdsl/cmv_message_format.h:33:6: warning:
>>> "MEI_SUPPORT_DEBUG_STREAMS" is not defined, evaluates to 0 [-Wundef]
>>> #if (MEI_SUPPORT_DEBUG_STREAMS == 1)
>>> ^~~~~~~~~~~~~~~~~~~~~~~~~
>>> /usr/include/vdsl/drv_mei_cpe_interface.h:2256:6: warning:
>>> "MEI_SUPPORT_OPTIMIZED_FW_DL" is not defined, evaluates to 0 [-Wundef]
>>> #if (MEI_SUPPORT_OPTIMIZED_FW_DL == 1)
>>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>> Signed-off-by: Andre Heider <a.heider at gmail.com>
>>> ---
>>> package/network/config/ltq-vdsl-app/Makefile | 7 ++++++-
>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/package/network/config/ltq-vdsl-app/Makefile
>>> b/package/network/config/ltq-vdsl-app/Makefile
>>> index 5e2db1d5c6..ef81f7c8d7 100644
>>> --- a/package/network/config/ltq-vdsl-app/Makefile
>>> +++ b/package/network/config/ltq-vdsl-app/Makefile
>>> @@ -35,6 +35,11 @@ define Package/ltq-vdsl-app/description
>>> Userland tool needed to control Lantiq VDSL CPE
>>> endef
>>> +APPL_CFLAGS= \
>>> + -DMAX_CLI_PIPES=1 \
>>> + -DMEI_SUPPORT_DEBUG_STREAMS=0 \
>>> + -DMEI_SUPPORT_OPTIMIZED_FW_DL=0
>>
>> Hey Andre,
>>
>> optimized firmware download is enabled in the MEI driver by default:
>>
>> drv_mei_cpe-1.5.17.6/src/drv_mei_cpe_config.h
>>
>> #ifndef MEI_SUPPORT_OPTIMIZED_FW_DL
>> # define MEI_SUPPORT_OPTIMIZED_FW_DL 1
>> #else
>>
>> cat /proc/driver/mei_cpe/status/00 shows the FwDownlOpt counter, which
>> confirms the above.
>>
>> MEI_SUPPORT_OPTIMIZED_FW_DL should be rather defined as 1 to be on
>> safe side, even if the IOCTL_MEI_statistic_t struct isn't used at all
>> in the vdsl-app.
>
> fishy...
>
> Maybe drv_mei_cpe_config.h should be included before
> drv_mei_cpe_interface.h then?
Would only kind of work, since drv_mei_cpe_config.h isn't auto generated
and might miss compile flags. As far as I can see,
MEI_SUPPORT_OPTIMIZED_FW_DL can be only defined via compile flags.
Different story for MEI_SUPPORT_DEBUG_STREAMS. It's a configure option
for the MEI driver, but passed as compile flag as well.
Right now, it seems to me that there is no way around keeping the flags
manually synchronized between the MEI driver and the vdsl-app. Maybe we
should pass them in the MEI driver as CFLAGS as well. Just to have the
same config and make it more obvious that they need to be changed for
both packages as the same time.
Mathias
More information about the openwrt-devel
mailing list