Received: by 10.192.165.148 with SMTP id m20csp3753078imm; Mon, 23 Apr 2018 11:44:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/K2ZDq4UG9J43DekON+uAAiKc9uV3HxpT7U3xsy7/wM8hMKKQ+2ylL3Cf1M+z2jNG/GiAJ X-Received: by 10.98.141.201 with SMTP id p70mr20779461pfk.72.1524509069028; Mon, 23 Apr 2018 11:44:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524509068; cv=none; d=google.com; s=arc-20160816; b=E5AS0l3/VKEUNBIZWAGmElKb6Ho7Wx3Hu9IalxQ6YocrplQAp5sVicmNjMUcpJewWO ks9ssaQJI11MQfYtGWGBC4o/RdehHdWM1J+lAEAEOwS0G2kytZ9kM3nek/zv2NPRtMvG AEMfrEAHD55NTD+k10sJnQheZJJxGvW5O/aq1uIJzDSES9H6ge1G3iIjH3QeU+aieZqx TmtJJFGdiRkpl73ihcs0RLtxu3pza/vLisDZNPWJLz2n4zHePyX+tH6B0QHLfXBYUjgP i05WH7sJKq16y2QZ/LSpzPZ98m4F/pQTFcC8XbSt35Y2TWpN1YI4Y5NZ7fF6gRAJzBob OSPg== 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:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=E3ZhHIx2bLp/Gew0FQPnQ8rRkdYzszMRFakgijblRgM=; b=uh9Hoothydja++C/d0KO60N6YmvCCmEM2E3ATVxSiSTgUYKEYkvBBoyRxMR0K1/G6H kt/bOx8c/lsf0f6O2Uh4jUGIHeGjmegZMvwhnrt/fYncPhzNIwrn3hB1md/qQTZY1Cfs /WSItrbUMqOQgny3wvpfrbffZEZ25W96+8mRvFtutV18HtuFBvtzLIyjWMhOnhv5ejWM 58rUmrc5P0/uReba3h+XJewLJDQ5ygOPxJpEv0eeZJVvAv2bxOBTdvGpjxI3HNmpe6aF 2vqHAx1nAjbeR5XdXE3RGyosAi9VQp2Gq3WFSzWfJWWVqU3fXGhHNUSN9E1B+oddJYgj E7Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=RP+ESiaC; 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 x3-v6si11945813plb.478.2018.04.23.11.44.14; Mon, 23 Apr 2018 11:44:28 -0700 (PDT) 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=fail header.i=@gmail.com header.s=20161025 header.b=RP+ESiaC; 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 S932360AbeDWSmF (ORCPT + 99 others); Mon, 23 Apr 2018 14:42:05 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:43365 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932303AbeDWSmA (ORCPT ); Mon, 23 Apr 2018 14:42:00 -0400 Received: by mail-ot0-f196.google.com with SMTP id y10-v6so5378288otg.10 for ; Mon, 23 Apr 2018 11:42:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=E3ZhHIx2bLp/Gew0FQPnQ8rRkdYzszMRFakgijblRgM=; b=RP+ESiaCr3PY90PnMvWJwB9skqApu/sTINVZbuJ4A0Ke5WTlcysDLpp0i8F2zfyAPS ovk20kSDXBY1DrHiPw2PFLCSUksjHw03XZ1CVfPTDo7qV3WSP7DnFP9eZM3LBzhy1gaj UMDJvnxzT74MWew4PkW5Uwxa4BAxrqCYL6eY0+c7yAJ5h9+8tUSIbOCz3JpC81UD/5WB 4O1Mdh5/ifQsUCGTNdSdCWLIcyAYafktuKX6PLzouQ45nVZlmqyl7K3z2N6dgCyVgRRH Bml5XIo8/VkReUzxXMfj5ViHLdAdcijBUGR8A4CH+t8b4WHHgO3XZgh8SU16LdsF/KkP 3Luw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=E3ZhHIx2bLp/Gew0FQPnQ8rRkdYzszMRFakgijblRgM=; b=p2wc533oA4vUIkjQ210lhZBvZ3LtLmprrBk2BTN3mJArL/1TbKrIh3tH3lp5O2+WWa PZraWgSmO4TieTsJT3vYFOgwHINasFjkMsJlxY1gJ8zt/ds5kQUwt2A/9pljzJw1pppb r4l6Cyv/Sl8MBfTbsRA4BE3KgGSCqioyRvg2V7L+CbChj8AJud8o4jKd7Xspgjyxe6Jf xHwCDZkA10GzaceUeWhteVeVvgNs6ZGi4QNYFiDAgz7sqnGilelnZFGfQzKuKriq4SBH VVZR4lmwqqhZb1SQF9FhLdMpPYc+5rgjjS0c+EFv6Y4OH+wVtOri0QUId2SMxV/6uFxQ MNeQ== X-Gm-Message-State: ALQs6tBwE900Duq2Y+2Bg6JkEFVHKAtuQijLUamyTifgVCgAHl6mAM+0 s4FiduiVagQI0UTfVdFxswiPgOdzPqIg0kShjo9aJA== X-Received: by 2002:a9d:3044:: with SMTP id w4-v6mr14138361otd.281.1524508919442; Mon, 23 Apr 2018 11:41:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.138.3.5 with HTTP; Mon, 23 Apr 2018 11:41:39 -0700 (PDT) In-Reply-To: References: <20180411190509.24995-1-malat@debian.org> <20180416171106.rlm2nrvrxfoodcvf@redbean> From: Mathieu Malaterre Date: Mon, 23 Apr 2018 20:41:39 +0200 X-Google-Sender-Auth: 98--8mHYfVn1tkFL8OpvhAmXVCo Message-ID: Subject: Re: [PATCH] kernel/module: silence a gcc warning To: Jessica Yu Cc: LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 19, 2018 at 7:15 PM, Mathieu Malaterre wrote= : > Hi Jessica, > > On Mon, Apr 16, 2018 at 7:11 PM, Jessica Yu wrote: >> +++ Mathieu Malaterre [11/04/18 21:05 +0200]: >>> >>> In commit 8c8ef42aee8f ("module: include other structures in module >>> version >>> check"), the function `struct_module` was renamed to `module_layout` bu= t >>> no >>> prototype was added to `include/linux/module.h`. Remove warning trigger= ed >>> at W=3D1: >>> >>> kernel/module.c:4378:6: warning: no previous prototype for >>> =E2=80=98module_layout=E2=80=99 [-Wmissing-prototypes] >>> >>> Signed-off-by: Mathieu Malaterre >>> --- >>> include/linux/module.h | 8 ++++++++ >>> 1 file changed, 8 insertions(+) >>> >>> diff --git a/include/linux/module.h b/include/linux/module.h >>> index d44df9b2c131..28046e8b7e9d 100644 >>> --- a/include/linux/module.h >>> +++ b/include/linux/module.h >>> @@ -786,6 +786,14 @@ extern int module_sysfs_initialized; >>> >>> #define symbol_request(x) try_then_request_module(symbol_get(x), "symbo= l:" >>> #x) >>> >>> +#ifdef CONFIG_MODVERSIONS >>> +void module_layout(struct module *mod, >>> + struct modversion_info *ver, >>> + struct kernel_param *kp, >>> + struct kernel_symbol *ks, >>> + struct tracepoint * const *tp); >>> +#endif /* CONFIG_MODVERSIONS */ >>> + >> >> >> Hi Mathieu, >> >> We're going to need a forward declaration in module.h for struct tracepo= int >> to address the kbuild warnings. > > Well that what I also thought at first. But since line 433 already does: > > struct tracepoint * const *tracepoints_ptrs; > > I suspect I should instead add sentinels: #ifdef CONFIG_TRACEPOINTS/#endi= f No that's missing totally the point. > Will try out shortly. Please drop the patch, fix is uglier than leaving the warning. >> Thanks, >> >> Jessica >> >> >>> /* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */ >>> >>> #define __MODULE_STRING(x) __stringify(x) >>> -- >>> 2.11.0 >>> >>