From patchwork Wed May 17 13:19:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13245004 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C35FC77B7F for ; Wed, 17 May 2023 13:19:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C7DC9280005; Wed, 17 May 2023 09:19:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C2E76280001; Wed, 17 May 2023 09:19:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B1CC0280005; Wed, 17 May 2023 09:19:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id A14AA280001 for ; Wed, 17 May 2023 09:19:45 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 5F74FADF1A for ; Wed, 17 May 2023 13:19:45 +0000 (UTC) X-FDA: 80799804330.15.258FEAD Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf21.hostedemail.com (Postfix) with ESMTP id A194F1C000C for ; Wed, 17 May 2023 13:19:43 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ZvaPaFRk; spf=pass (imf21.hostedemail.com: domain of arnd@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=arnd@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684329583; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=uXcpxHEQxtZ9MtQl3RG7vLkgZndWbXH3pQWmktUqB5o=; b=Qoxq6QT1wLA/0loDTGZV5yen/qCOzeFVr1JIaTaF4K/sB+O8AjdSg9L/ZZN+0ZV5CNkmT/ PHVrbEXzwjMp/PVidvEjAMHz65XVTz3G2nqzSU57qNJg8MJFOLWkEi4OyGkltSNR+o5w/T aAlEayJllcWyO51DHP6WLeH7D0Totv4= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ZvaPaFRk; spf=pass (imf21.hostedemail.com: domain of arnd@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=arnd@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684329583; a=rsa-sha256; cv=none; b=YBSOVr3PplASjoBPSfczP5VuY9SxduUVzjWiwG5cFiKv2RfLLBF/lZF4JFxoVO+T4SJaFQ 5n+OKsBC5lzyCw9zT7gzH3FpkUW2TRPCyXR5Mv+rVO+AZGusYIyGLVwDJ192PhzVya4TkM F1R1szVm2dOp1vR8saZaA4KN+6gstwY= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9427A64703; Wed, 17 May 2023 13:19:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF762C433EF; Wed, 17 May 2023 13:19:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329582; bh=aywvvDRPNw0N00F0h3QEaRNcGvMODB+TxD21Tej3Lsk=; h=From:To:Cc:Subject:Date:From; b=ZvaPaFRkLsehNX2loEbOvDVae+1gWgD0Ic2WOkv7wxF1IPFtcmlrUL0im6guBRNxR +nkj2hepVCk7Vijdc0PYTMFjBI+/tbCyFFYyC2z7ntZ7SOh+IzX1gCsAo0UoETwQcx t/XuI179xCx4vHxkPY0hEAokDqksHrgjMzNL6808mhV9F2tTenRXJY8hEVs8gd8duu 8/nSBouTPWLGEiHh01kNSsfMuFcd8gk+5ggFpmqrPp8YhxDQw5m5c2WM7jbYkDPAX+ 85t3QZEdPuLNBImnMpJqCD2JAeERkLfZmmPIqQQWjLanTAnT6T9iQuJop1StyB9F6Z sZe4Ql1zzScbQ== From: Arnd Bergmann To: Andrew Morton , Nick Terrell Cc: linux-mm@kvack.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH] decompressor: provide missing prototypes Date: Wed, 17 May 2023 15:19:31 +0200 Message-Id: <20230517131936.936840-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Stat-Signature: g1pzfwkexzqngfngya6qwzaysby1386e X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: A194F1C000C X-Rspam-User: X-HE-Tag: 1684329583-54265 X-HE-Meta: U2FsdGVkX1/YMpaysTPYYYVvtdimTtIzstMWoDb7e9LDZxS1TqMawTXJq72A0ZI3bqps1AeBnZFDRQ2ylwMXMX49siPfwy2B8I3F/Rui1vvBIWbA6zdinmnhD0pOIla6h7gdGL0M2JUkuLYhdEg5oPfQlyTwbEP1ekeldNOrqeq+qORDrrEMbK5T330qihIU0rc9yw9oYZmzlTJz2wARIaf4r74nX1inbldpbYUcH8V+uIIoG9XSnFapq+An3EbWQ2T9n/FZ7+4qjuEEGnPeMfHYvh+TjoqUEpjSwp8jKof4GGrnMWhE9izQvAA47pO0tFXqxuNruTLTJxyFCf9sraUoXYN7aQnheEaCiTjfLTo0Irdgh7p/MaWrQdaSEutCiisIJapqQwbAn8rLMlu+LhkUwSdVljh75zBikZfb5bOj5Oa21z5gbTo1UX0OF3oRLnmFwTkzwWQVevKaqaK0eeHcn3tDRJ76+Hf+/XakRrNlA/nxrfREjMLEwmfKi3xCLigOvQMrACbgJtjCqUXMy12zquAUAR1nYfoleoVHiKEDnRrotgYkUqRriioOyzrMT1zBT2iuvNWndVLlDQsPOw+WakkXaTDz/VRnhNee8qCwj2jTOinZo7Bb8Vpnmxv6FwABNS9SCqnRQ365UTBJdganXVUzTtyDfR7WpzdymBSfYifkBbuuyPeqC8kJP3uGmSTwcdqj2pOKQGOKuUN3m/1DEHYOBmUgenY99zHb8OqgCrk7bT8JRKWQ40skJF7aDIP5bUnNR6VfwvqEqD4JgoIITlscTTlm9g4CVkct49qBMFUn1rt9PIB82GUNtVnpfkyQjAiwpiRaI5LvL66ebUU2fpENrNiRdIS2wEFBnP62ZG1YQSgkhydsYvqISIGmQsxc/J1IHAdPI5ywTNN+ml2mvzeq/4FtxiycgjuPKrw4FnLlKCBlUygCsjvOLH5ktmWX8lNAYDthb0mFOXz QsQj11vo mvaWNvVVKudO1wDnMrFIqHRM8LO/uOyFD+huwDHoUn/Ba/OLYjLLiSDZfxtxdeq8bNf4FHqIbdxiD5o5X5NuqTGLvwG34rGXqIylISTubxeAqIlrt8wnwMO/ALvaHwdn7GUJh+y9XgCEpO/tW9zTKSmgz/l5KcvC94FEy3qELJ+VAWRk/rN6LDx5BKqGHga6HLj70nBnlMwQtDYuOWewFwjUUEnjUr4o0pKxDmBTqjg1oMQDMWpO3gmIOOSpcANB8p7NTLyvnmmzwFgst6hSi/LkGIQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Arnd Bergmann The entry points for the decompressor don't always have a prototype included in the .c file: lib/decompress_inflate.c:42:17: error: no previous prototype for '__gunzip' [-Werror=missing-prototypes] lib/decompress_unxz.c:251:17: error: no previous prototype for 'unxz' [-Werror=missing-prototypes] lib/decompress_unzstd.c:331:17: error: no previous prototype for 'unzstd' [-Werror=missing-prototypes] include the correct headers for unxz and unzstd, and mark the inflate function above as unconditionally 'static' to avoid these warnings. Signed-off-by: Arnd Bergmann --- lib/decompress_inflate.c | 2 +- lib/decompress_unxz.c | 2 ++ lib/decompress_unzstd.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c index 6130c42b8e59..e19199f4a684 100644 --- a/lib/decompress_inflate.c +++ b/lib/decompress_inflate.c @@ -39,7 +39,7 @@ static long INIT nofill(void *buffer, unsigned long len) } /* Included from initramfs et al code */ -STATIC int INIT __gunzip(unsigned char *buf, long len, +static int INIT __gunzip(unsigned char *buf, long len, long (*fill)(void*, unsigned long), long (*flush)(void*, unsigned long), unsigned char *out_buf, long out_len, diff --git a/lib/decompress_unxz.c b/lib/decompress_unxz.c index 9f4262ee33a5..353268b9f129 100644 --- a/lib/decompress_unxz.c +++ b/lib/decompress_unxz.c @@ -102,6 +102,8 @@ */ #ifdef STATIC # define XZ_PREBOOT +#else +#include #endif #ifdef __KERNEL__ # include diff --git a/lib/decompress_unzstd.c b/lib/decompress_unzstd.c index a512b99ae16a..bba2c0bb10cb 100644 --- a/lib/decompress_unzstd.c +++ b/lib/decompress_unzstd.c @@ -69,6 +69,8 @@ # define UNZSTD_PREBOOT # include "xxhash.c" # include "zstd/decompress_sources.h" +#else +#include #endif #include