From patchwork Tue Feb 16 18:35:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Kresin X-Patchwork-Id: 1441068 X-Patchwork-Delegate: openwrt@kresin.me Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=cZlzrTWp; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kresin-me.20150623.gappssmtp.com header.i=@kresin-me.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=jfzf4goK; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dg8pP44sYz9sBy for ; Wed, 17 Feb 2021 05:37:17 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=FnTyYmB6P2FXSD+vL8nfpxIBOa01IYtmHoDxnMSy+q4=; b=cZlzrTWppd79MnmgF0bZhd/Jdz cJ3ghGY2sR+KASoKy4K9nfXawJgksZ9VyvrZRO44OURVaXBVkqQVwPnUIsRIVzoB58cgBYYREEted 96sfHpk8EwGfj94KntDITWkpbzxbw6ihQrzAc6CUN64/K756/raqAco3Rw1uUCXaIQ/wEOAf0bdSX hfWLYISFBN9lmo75cFTG75I+U07a06kqg92fylL5rMGqf91koDDJjQzaEVOW0/K3EvAVdnwyVuasO bwSL7HdkRGtRI1xpDpAr5I3/JwGDri+UXrmFhMRqXbUGdCbn3SP9ePE85XZ7DambLzvb4T1sgR0tu jEcxIrQQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lC5Bs-0000sK-4I; Tue, 16 Feb 2021 18:35:16 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lC5Bp-0000rJ-Ou for openwrt-devel@lists.openwrt.org; Tue, 16 Feb 2021 18:35:14 +0000 Received: by mail-wr1-x42d.google.com with SMTP id v14so14420221wro.7 for ; Tue, 16 Feb 2021 10:35:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kresin-me.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=csqGq/KvrAItro/O4BETMEGB03nJZ7gCojNkoPQtvbA=; b=jfzf4goKIife1IenC2FVvU0jkd3+C0wGAQiTGL/xjkdGqa92wCVgWmipJ2+3FTyRLL sQpUUVnIzT1ovOkA4KFwOMDPCLsKKGh1A+OhNnomuL4N0lfG25QoN/7O7IuyYUEuNgy1 KadBW2t2ebrcGqLFFNurutZfqPkXMTPytqInoPapeQnkE5r8Nw4sxfcw+criu960N761 V7mD/U7cdUMmosV2evvKE8fcjuU06rABU/8heLSmNpzKwkUCM9Klr2S62YtwTBvNkRLD qiFYEDwABDJyzFybpIZiM5CgIlm2FvOqxHPCmjLRrLHpuqyevaG211xbf8HVPlRdEnER Y/Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=csqGq/KvrAItro/O4BETMEGB03nJZ7gCojNkoPQtvbA=; b=AiwdLZ3hvrdDzxMem5cHshx1swulDm4zUBjX4D7eu+H/6jINYEH1Ds6S0iISrmdCRc IkBJx9EZeF33B2BtR1TJeMuZq9hQ8d/GImp09k78QvK++W+UIUA7yIdPEWxD8ZWsGant CHBy3pP+6RbOCq1xN+35EffT3kupDeJg3oOSRBwG+pc2VHQqcPVIr6c0B7DiL9+iq/lL /p8AgA/ZP+UMihiUg+POYhIMG55u1MZ1AWhaa4oaUzxfTDQG/dcWLVrrQFZ4zwm94hWQ 0g+NSBrmmTsqxu5HCFBTWOuicxUaFvofVhcQSHbeD/tw2Efqd/YuWH2Gs6+YNWW53x2l 9x2A== X-Gm-Message-State: AOAM530OpLVYJWO+Sly2PEVlHPfdTXZvqtXLytFMZyZshzEc9YCPxAZn fFYL70e0JZjZ1IVf7gWAvVfPc7G7Wd++zQsP X-Google-Smtp-Source: ABdhPJxXxjhIUL58C77k6HtVpag06TnItJ1traPvtsY01y1CutXreFESdmZ25qx/GgFa4IU9EAoJ7A== X-Received: by 2002:a5d:4564:: with SMTP id a4mr26077807wrc.66.1613500512500; Tue, 16 Feb 2021 10:35:12 -0800 (PST) Received: from desktop.wvd.kresin.me (p200300ec2f24b900e91f102e315eb599.dip0.t-ipconnect.de. [2003:ec:2f24:b900:e91f:102e:315e:b599]) by smtp.gmail.com with ESMTPSA id b7sm4268695wmj.35.2021.02.16.10.35.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Feb 2021 10:35:12 -0800 (PST) From: Mathias Kresin To: openwrt-devel@lists.openwrt.org Subject: [PATCH] ltq-vdsl-app: fix -Wundef warnings Date: Tue, 16 Feb 2021 19:35:07 +0100 Message-Id: <20210216183507.2334136-1-dev@kresin.me> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210216_133513_846174_6E1FFD4B X-CRM114-Status: GOOD ( 14.73 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:42d listed in] [list.dnswl.org] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The following warnings are shown during build: /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) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ The headers are provided by the MEI driver, but the defines are never set by the vdsl app. While the struct with the MEI_SUPPORT_OPTIMIZED_FW_DL conditional isn't used by the vdsl app, however CMV_USED_PAYLOAD_8BIT_SIZE which value depends on MEI_SUPPORT_DEBUG_STREAMS is. Since the MEI driver doesn't provide an autogenerated header with compile flags, the flags are hardcoded for the vdsl app. Set them for the MEI driver as well, to indicate a relation to the values used for the vdsl app and to be not surprised by a changed default in case the MEI driver gets updated. Use the current default values defined in the MEI driver. Signed-off-by: Mathias Kresin --- package/kernel/lantiq/ltq-vdsl-mei/Makefile | 11 ++++++++++- package/network/config/ltq-vdsl-app/Makefile | 16 ++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/package/kernel/lantiq/ltq-vdsl-mei/Makefile b/package/kernel/lantiq/ltq-vdsl-mei/Makefile index 4a305d9c27..a15d0c931c 100644 --- a/package/kernel/lantiq/ltq-vdsl-mei/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-mei/Makefile @@ -54,6 +54,15 @@ endef MAKE_FLAGS += \ SHELL="$(BASH)" +# ltq-vdsl-app uses a header provided by the MEI driver which has some +# conditionals. +# Define the conditionals here to have the same view on both sides. If you +# change them, you need to change them for the ltq-vdsl-app as well +MEI_DRV_CFLAGS = \ + -DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1 \ + -DMEI_SUPPORT_DEBUG_STREAMS=1 \ + -DMEI_SUPPORT_OPTIMIZED_FW_DL=1 + CONFIGURE_ARGS += \ --enable-kernelincl="$(LINUX_DIR)/include" \ --enable-device=vr9 \ @@ -63,7 +72,7 @@ CONFIGURE_ARGS += \ --enable-error_print \ --enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos/" \ --enable-ifxos-library="-L$(STAGING_DIR)/usr/lib" \ - --enable-add_drv_cflags="-DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1" \ + --enable-add_drv_cflags="$(MEI_DRV_CFLAGS)" \ --enable-linux-26 \ --enable-kernelbuild="$(LINUX_DIR)" \ --enable-drv_test_appl=yes \ diff --git a/package/network/config/ltq-vdsl-app/Makefile b/package/network/config/ltq-vdsl-app/Makefile index 0968811984..7665f37514 100644 --- a/package/network/config/ltq-vdsl-app/Makefile +++ b/package/network/config/ltq-vdsl-app/Makefile @@ -36,6 +36,18 @@ define Package/ltq-vdsl-app/description Userland tool needed to control Lantiq VDSL CPE endef +# ltq-vdsl-app uses a header provided by the MEI driver which has some +# conditionals. +# +# Define them here with the default values they would get in the MEI driver, +# have the same view on both sides. +# +# If you change them, you need to change them for the ltq-vdsl-app as well +VDSL_APP_CFLAGS = \ + -DMAX_CLI_PIPES=1 \ + -DMEI_SUPPORT_DEBUG_STREAMS=1 \ + -DMEI_SUPPORT_OPTIMIZED_FW_DL=1 + CONFIGURE_ARGS += \ --enable-vrx \ --enable-vrx-device=vr9 \ @@ -44,10 +56,10 @@ CONFIGURE_ARGS += \ --enable-ifxos \ --enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos" \ --enable-ifxos-library="-I$(STAGING_DIR)/usr/lib" \ - --enable-add-appl-cflags="-DMAX_CLI_PIPES=1" \ + --enable-add-appl-cflags="$(VDSL_APP_CFLAGS)" \ --enable-debug \ --disable-dti \ - --with-channels-per-line="1" \ + --with-channels-per-line="1" #CONFIGURE_ARGS += --enable-model=full #CONFIGURE_ARGS += --enable-model=lite