Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2651170rdb; Mon, 4 Dec 2023 03:58:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBM1NNCuBbZ434e8jiSq4t3l0TrJComYKNIFy4a2XFDyoAHR6yK2lt2JCJiF68jAS/zoWo X-Received: by 2002:a05:6358:3417:b0:170:17eb:203a with SMTP id h23-20020a056358341700b0017017eb203amr5050121rwd.35.1701691091221; Mon, 04 Dec 2023 03:58:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701691091; cv=none; d=google.com; s=arc-20160816; b=bIMsLmpQwfRN8+ECkD65FcaqVDtXq2/vGTTST7FaRHmD087Niq7z97w4dpFKREmh3a Ship/4SGw7pVP/N97SdtK3u85bdmO2VOV9XihsqaRKQ6dm+u7YosGqL02vgkU6fm3sbK 9sl1yCzyY2upiY+MiaFZkCRE4YS7I5XFWf1GoQOzNL/xe9XAyaegbIK1mV3kUE9TVZIs e28v3+QhZiYc3++EAgptnpyrRIkRpn56yYeC08vBvgItfo1TC9CXTaqKEmqTi8lvdOwF pg1PaelEvZUdKVtEkoDje1GwHMXnrnCkfoL1nqFwGqGxoRA6eOeH/bDFy6OCJF+4n2r4 ifKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3tDYA5S47o5dB1hdL4qhp/5ZaUr8W0IbbWvebiILMzo=; fh=ZaUu8Qu87y0sWtsc/L1xWJKMgHMvIjP9DS2ujBqzc8w=; b=05WoFM4bELsxokzIiHU4e+usskr2y+BK3VVcvPFZOaH4wuKuVOzWv4tm3iUqqGSEQP QNRishVvnHixd/zAfdEovsLCsGtqXX8tsSBnf38qhwa3Y9Hffbi8ceHt+8V9AJZDwbIx moFTTCJbFhs8HVe1yhU7j0i8fZoqT+DsEf0fo7uCJRHmW++yT3u11KksDjpHBaCS4khk e1gAtOPppQg8cedi7wNs2WbytP2KNz67xXqu5Ivq0p+Ii9qkloHvbWvemkTMBJAGeo4G uG11w42ckdm+NQAsoY8lTAJe1mD7rm5IOxeW3gD5LQbP+EkoD2IfQwZgHHajgXXWh2AR wpyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=femcIS3o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id u191-20020a6385c8000000b005c6634fa849si3580482pgd.89.2023.12.04.03.58.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 03:58:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=femcIS3o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 12671805CEA9; Mon, 4 Dec 2023 03:58:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234953AbjLDL5j (ORCPT + 99 others); Mon, 4 Dec 2023 06:57:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232203AbjLDL5X (ORCPT ); Mon, 4 Dec 2023 06:57:23 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 477321BD for ; Mon, 4 Dec 2023 03:57:21 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA6FCC433C7; Mon, 4 Dec 2023 11:57:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691041; bh=fRSxX8E7EKRIPQBydKhoEniyM3aLhKn+xL3XzYVaAk8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=femcIS3omFfgXtyufGHVJom0uXomMX8jSMxADx9BQCYIjldQAsUEIf8MhP4M978r7 O7bai8L2nmJW3W8l56yzH9LN3RtLW8Y0TulhUd4noZ38Gr6atBE96UZ1N2ObjY1F4x hqu3OmhDd2LYanShqrKOZDDRBLQzSn6unOCaFnNxVXTrlc4L252xz+J2q0/Qy+YIJs GGlZ0H2R7AskDgd3KWUtZyW1Gz1LorE2/k+I9ur+2cTDTfYiYfQlt9kt3Li3WR+zJB vXjedYrAzAKBdNoLauwN22lUVaZ67lAkiPv3lPxnW9flUNhK1V640WBFjIWiucJ455 rk+M1ei9P3PpQ== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 01/20] mips: decompress: fix add missing prototypes Date: Mon, 4 Dec 2023 12:56:51 +0100 Message-Id: <20231204115710.2247097-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 04 Dec 2023 03:58:08 -0800 (PST) From: Arnd Bergmann The mips decompressor has some string functions defined locally that are not declared in the right place: arch/mips/boot/compressed/dbg.c:12:13: error: no previous prototype for 'putc' [-Werror=missing-prototypes] arch/mips/boot/compressed/dbg.c:16:6: error: no previous prototype for 'puts' [-Werror=missing-prototypes] arch/mips/boot/compressed/dbg.c:26:6: error: no previous prototype for 'puthex' [-Werror=missing-prototypes] arch/mips/boot/compressed/string.c:11:7: error: no previous prototype for 'memcpy' [-Werror=missing-prototypes] arch/mips/boot/compressed/string.c:22:7: error: no previous prototype for 'memset' [-Werror=missing-prototypes] arch/mips/boot/compressed/string.c:32:15: error: no previous prototype for 'memmove' [-Werror=missing-prototypes] arch/mips/boot/compressed/decompress.c:43:6: error: no previous prototype for 'error' [-Werror=missing-prototypes] arch/mips/boot/compressed/decompress.c:91:6: error: no previous prototype for 'decompress_kernel' [-Werror=missing-prototypes] Include the string.h header where needed and add a decompress.h header to have shared prototypes for the rest. Signed-off-by: Arnd Bergmann --- arch/mips/boot/compressed/dbg.c | 2 ++ arch/mips/boot/compressed/decompress.c | 16 ++-------------- arch/mips/boot/compressed/decompress.h | 24 ++++++++++++++++++++++++ arch/mips/boot/compressed/string.c | 1 + 4 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 arch/mips/boot/compressed/decompress.h diff --git a/arch/mips/boot/compressed/dbg.c b/arch/mips/boot/compressed/dbg.c index f6728a8fd1c3..2f1ac38fe1cc 100644 --- a/arch/mips/boot/compressed/dbg.c +++ b/arch/mips/boot/compressed/dbg.c @@ -9,6 +9,8 @@ #include #include +#include "decompress.h" + void __weak putc(char c) { } diff --git a/arch/mips/boot/compressed/decompress.c b/arch/mips/boot/compressed/decompress.c index c5dd415254d3..adb6d5b0e6eb 100644 --- a/arch/mips/boot/compressed/decompress.c +++ b/arch/mips/boot/compressed/decompress.c @@ -19,6 +19,8 @@ #include #include +#include "decompress.h" + /* * These two variables specify the free mem region * that can be used for temporary malloc area @@ -26,20 +28,6 @@ unsigned long free_mem_ptr; unsigned long free_mem_end_ptr; -/* The linker tells us where the image is. */ -extern unsigned char __image_begin[], __image_end[]; - -/* debug interfaces */ -#ifdef CONFIG_DEBUG_ZBOOT -extern void puts(const char *s); -extern void puthex(unsigned long long val); -#else -#define puts(s) do {} while (0) -#define puthex(val) do {} while (0) -#endif - -extern char __appended_dtb[]; - void error(char *x) { puts("\n\n"); diff --git a/arch/mips/boot/compressed/decompress.h b/arch/mips/boot/compressed/decompress.h new file mode 100644 index 000000000000..073b64593b3d --- /dev/null +++ b/arch/mips/boot/compressed/decompress.h @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0 +#ifndef _DECOMPRESSOR_H +#define _DECOMPRESSOR_H + +/* The linker tells us where the image is. */ +extern unsigned char __image_begin[], __image_end[]; + +/* debug interfaces */ +#ifdef CONFIG_DEBUG_ZBOOT +extern void putc(char c); +extern void puts(const char *s); +extern void puthex(unsigned long long val); +#else +#define putc(s) do {} while (0) +#define puts(s) do {} while (0) +#define puthex(val) do {} while (0) +#endif + +extern char __appended_dtb[]; + +void error(char *x); +void decompress_kernel(unsigned long boot_heap_start); + +#endif diff --git a/arch/mips/boot/compressed/string.c b/arch/mips/boot/compressed/string.c index 0b593b709228..f0eb251e44e5 100644 --- a/arch/mips/boot/compressed/string.c +++ b/arch/mips/boot/compressed/string.c @@ -7,6 +7,7 @@ #include #include +#include void *memcpy(void *dest, const void *src, size_t n) { -- 2.39.2