From patchwork Sun Dec 29 17:26:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 182569 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5467172ild; Sun, 29 Dec 2019 09:56:07 -0800 (PST) X-Google-Smtp-Source: APXvYqw8NWsWIqItJgUS8ntdOOwVIAmXQKzv33an9FagHllOMEOetm9vZ24mDQw+VYAybSHVK0m+ X-Received: by 2002:a05:6830:147:: with SMTP id j7mr70686004otp.44.1577642167132; Sun, 29 Dec 2019 09:56:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577642167; cv=none; d=google.com; s=arc-20160816; b=R+WwNv/S/1NgXoER6n6ofwlZdas9vpjzqtWADNYtRGe0H4fgDv8ovJc27+Ha5QlK+6 gnFz8n9AsQ3D/f2Ydrf77kQO/NXLCpG9KLt1gyTLwKJh5u4igDiLlEJyG7o23XDLcXN5 mDagYyUmscWk9AKrvU2pk5ohws5e0FCdba2kIbeaub6rrUbqVQusfo+ettESNazM8Afz /GtqHkDAPMQWjccN4fYtMsYh94eSwxFBflMZtn718ZFf+X1ccyXcguR3MSeUs9mqK4qP 3xkcV0TDiOkxSFDC2w8K1JUn6SGFJOBZXMNtatlqp9WpKaIcSyg1hBrMfaZs5eSrwlGe F9sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wSeLO5c06AjN+QDHmTL4Rnp8su9OfUfRHeOKPNYEiHI=; b=hmrQ979C4bMZZe+BmfEfC1BpVTTG8jwQ0SVQph4NLWIRxCq2Iu+7GypPULkKhoFFy5 NVM+wlGI92+d6yQ0K+pBhyqcaWjuruKL3GQ8sKf3ZQsUox4Vy8WrPYwCySWc67qqAGMd hOUFs/P/pggJqQSw5HFcC/Bqs3ZG2rOA8pAVgfu71S0JyvjR3LowKxwzkko522Fk4VQ0 12QWFgUv19b4o5YE7vOJLlVJzUIuofzD35nrJuVVoGLch4gd/BSCXL+pA6m/hGOCi5gu fFaZ/bkdRSNsZ/d/NEjfV7rGaph7KeN2dPK9Sd4ywlqGYXVRRQqJll5weolHXNw5awxn K71g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fCciJXhx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u16si20726136otq.92.2019.12.29.09.56.06; Sun, 29 Dec 2019 09:56:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fCciJXhx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733020AbfL2R4F (ORCPT + 27 others); Sun, 29 Dec 2019 12:56:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:45044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733013AbfL2Rz4 (ORCPT ); Sun, 29 Dec 2019 12:55:56 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 87D3B206DB; Sun, 29 Dec 2019 17:55:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577642156; bh=6w5Mp700T+oUr+mAfo2QJAurvqTx7c9BUWomuOfLvjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fCciJXhxUNzneDOWxEExJRhye+7fD5MrEHctdnYwmQtqeQ8nKtvO6YVcak9RBNNE5 lAQTPixfhKbLv4DvN3LtqPiFNYeD/8ZburVNENz4O8npIfGURSXvuH00BQ9SP4GiZm Lvw9p3qSs5W7EdYxl8WIh7SpyrZRWyo3RGFG8IAk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stephan Gerhold , Linus Walleij , Luis Chamberlain , Sasha Levin Subject: [PATCH 5.4 328/434] firmware_loader: Fix labels with comma for builtin firmware Date: Sun, 29 Dec 2019 18:26:21 +0100 Message-Id: <20191229172723.757283624@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Walleij [ Upstream commit 553671b7685972ca671da5f71cf6414b54376e13 ] Some firmware images contain a comma, such as: EXTRA_FIRMWARE "brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt" as Broadcom firmware simply tags the device tree compatible string at the end of the firmware parameter file. And the compatible string contains a comma. This doesn't play well with gas: drivers/base/firmware_loader/builtin/brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt.gen.S: Assembler messages: drivers/base/firmware_loader/builtin/brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt.gen.S:4: Error: bad instruction `_fw_brcm_brcmfmac4334_sdio_samsung,gt_s7710_txt_bin:' drivers/base/firmware_loader/builtin/brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt.gen.S:9: Error: bad instruction `_fw_brcm_brcmfmac4334_sdio_samsung,gt_s7710_txt_name:' drivers/base/firmware_loader/builtin/brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt.gen.S:15: Error: can't resolve `.rodata' {.rodata section} - `_fw_brcm_brcmfmac4334_sdio_samsung' {*UND* section} make[6]: *** [../scripts/Makefile.build:357: drivers/base/firmware_loader/builtin/brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt.gen.o] Error 1 We need to get rid of the comma from the labels used by the assembly stub generator. Replacing a comma using GNU Make subst requires a helper variable. Cc: Stephan Gerhold Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191115225911.3260-1-linus.walleij@linaro.org Acked-by: Luis Chamberlain Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/base/firmware_loader/builtin/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/base/firmware_loader/builtin/Makefile b/drivers/base/firmware_loader/builtin/Makefile index 37e5ae387400..4a66888e7253 100644 --- a/drivers/base/firmware_loader/builtin/Makefile +++ b/drivers/base/firmware_loader/builtin/Makefile @@ -8,7 +8,8 @@ fwdir := $(addprefix $(srctree)/,$(filter-out /%,$(fwdir)))$(filter /%,$(fwdir)) obj-y := $(addsuffix .gen.o, $(subst $(quote),,$(CONFIG_EXTRA_FIRMWARE))) FWNAME = $(patsubst $(obj)/%.gen.S,%,$@) -FWSTR = $(subst /,_,$(subst .,_,$(subst -,_,$(FWNAME)))) +comma := , +FWSTR = $(subst $(comma),_,$(subst /,_,$(subst .,_,$(subst -,_,$(FWNAME))))) ASM_WORD = $(if $(CONFIG_64BIT),.quad,.long) ASM_ALIGN = $(if $(CONFIG_64BIT),3,2) PROGBITS = $(if $(CONFIG_ARM),%,@)progbits