Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14958790rwb; Mon, 28 Nov 2022 06:40:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Bb/9P1ZHWysimBdY6Re6dQWR/+yLGOlMyR9dY1OeZHxO2EZQOYiqvPyeprvgJRYNH+w3n X-Received: by 2002:a17:906:1ecf:b0:7ad:902c:d1d6 with SMTP id m15-20020a1709061ecf00b007ad902cd1d6mr31723848ejj.143.1669646411031; Mon, 28 Nov 2022 06:40:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669646411; cv=none; d=google.com; s=arc-20160816; b=Q0ess1RBiw3eVwAn0V+K4jkELXqZtuSm2Pw5qxK0AUPiPaDSI36C1saD/cNGAj2zta u10DshmGg75MBfYG6FZE7OFsKwZq3PX1Ydw7VjlSRG7RwzASBTsG5Uvmz9/FHkksDpQU LaQCdETChmovsg7oERr1HR6u7OIg40XZv06oWGrnEobLelatAPHh+mKXkslo8pwgCF49 81SbBiaDddz6QAvvXtpKNwaKHHwz4v74n3WZ1D8lGxs7akiR9pUx3+4vGqC93qqCFcOT WzYNSJ/zWi1wqBVGrTxJKzaSkf2qxgTmWjt2AdhwMNgQapyD+UVZN4LPKLQPvIwKdtIu G+6Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=JRfHVOSy1x5zSUZnNNo8B/RCQ9WtNVjtDDCpFqPXI2I=; b=CFnEFOUSQGiC7ZdOSaNgjh1IQqiX6Y00OxJwQPPenHqyQzmo61lfeA/JeJaUgS38Rs W0S20Yuk4Isb2kzoDXGE5fy2ptHnQ+4nbc+PqLPyAgxgbrTCpiVI8hLQIZmXRcTldagy nGDof5Z4f1+RuXqm/B/b5CWX+8r3lB7E5SwP5BqZcxSXGfV4biy488NwUs/gjpmGJ5P2 LvWqcSNPhqK/19HDxGjNapkZOv+XTdILIuj53zRJuj+68fYBl4Q3u4SUq3BbsA8/ZWpu yipkuUx8k5t1Ao9Z4XUP7tZTQkMd/Zs5+jRPHZ18odzkoP4PJilLPQw6Roz1+nA9Fees 7P0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Oeuvle2N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc36-20020a1709071c2400b0070fc7c9d71dsi9725681ejc.989.2022.11.28.06.39.50; Mon, 28 Nov 2022 06:40:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Oeuvle2N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231701AbiK1OAx (ORCPT + 84 others); Mon, 28 Nov 2022 09:00:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229878AbiK1OAv (ORCPT ); Mon, 28 Nov 2022 09:00:51 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7D71B86B; Mon, 28 Nov 2022 06:00:50 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 6AE6BB80D9E; Mon, 28 Nov 2022 14:00:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E91F3C433C1; Mon, 28 Nov 2022 14:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669644048; bh=0ELPsvk3FLg1BIlCM+py6A5OLl2DQuOQYYfbE5wR6Ow=; h=From:To:Cc:Subject:Date:From; b=Oeuvle2NspMTbgCO8EbQi8zXPdGNsIjszEUe1o3MJWH/k+jXmQCkvSRGSMJ2piuT+ yNcvtrL1FRxkscSZvYzwxmKjIkVejk2WsSTGoVD0ygKj41lGgo3r4OyDU/wre+IhiP ERDpgjSEJwyFLR2R9XG3bRnao/aGtQR3cHolha5xnLnokcHIgSqJlkVUUFsn9LtsnD VN8kLPX6aaAgzIpaUmSfaEEl5BsKuo7pCiwLGvXAxdG2ZGfRc7CEoBUKsyMrUGK2sB eYvX8RkZQMD5vGJmkv+1wIRESIAqj4DW5W0W6mYfINXfeYuKuAbkJHXbrfX31ViNff qRswGR/eJGCJg== From: Jisheng Zhang To: Alexander Viro Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] coredump: fix compile warning when ELF_CORE=n while COREDUMP=y Date: Mon, 28 Nov 2022 21:50:56 +0800 Message-Id: <20221128135056.325-1-jszhang@kernel.org> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fix below build warning when ELF_CORE=n while COREDUMP=y: fs/coredump.c:834:12: warning: ‘dump_emit_page’ defined but not used [-Wunused-function] 834 | static int dump_emit_page(struct coredump_params *cprm, struct page *page) | ^~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang --- fs/coredump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/coredump.c b/fs/coredump.c index 7bad7785e8e6..8663042ebe9c 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -831,6 +831,7 @@ static int __dump_skip(struct coredump_params *cprm, size_t nr) } } +#ifdef CONFIG_ELF_CORE static int dump_emit_page(struct coredump_params *cprm, struct page *page) { struct bio_vec bvec = { @@ -863,6 +864,7 @@ static int dump_emit_page(struct coredump_params *cprm, struct page *page) return 1; } +#endif int dump_emit(struct coredump_params *cprm, const void *addr, int nr) { -- 2.37.2