Received: by 10.192.165.156 with SMTP id m28csp959571imm; Thu, 19 Apr 2018 10:17:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+279f4d6/vboiHkroejSP9AvEZOjSCkkuc+cJJEYiHw93B5FusG4rX93B44WUEab7CuE+7 X-Received: by 10.98.144.205 with SMTP id q74mr6489219pfk.55.1524158257420; Thu, 19 Apr 2018 10:17:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524158257; cv=none; d=google.com; s=arc-20160816; b=S2GYqpeskmeYCKSTgF4yL/rwsJUWZpfPVRyOKYBi+K0iH+CCSxhpUcpjnBDkP1vWQm mENUwPToz+PYjY/Xsnx2+JlwIn1TQMUymGlt1O6c1GBgdDn6Zkfw5EcBxWjF4JB8P4BD As6WLXq7qS0Df0TKZrwNPpeuQJkLJfTXZ8gUuVxzPbdXHW+1RyiMUeyzrrDb7mK5cuqy xw9nOSvLNxQyK/Lt1Y6s091vUmvtuqSa2D4on6rXGQacSj6RRH158V0pZOAP4MSjcJCc AYC8swWdNsLI1jxk/DwPtKIchgHJCL+5+uFanI8UB7h0HPCsRkl0NetKm0VyVZQbOWG2 c7lQ== 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=EmN0P8J7K3aJvBYZsxkHu7BfOoXO+QiN08Zmzz04SQY=; b=hD+SRO3PkAVDZInIBf539tmkI8a1fdRUa//mhqGcA9+NDGf5bO/5SPEQMtm0HbIejp ZIcmRxI2GnUKylS3zqhUPG7HsARwBivnf76Obo/UiIKDcMcx0VM5HILI+MLlsoi6rg7G YOteolSKOkbp/sqE7qwgGAqt45ARXNTErzLycCztn2Olt9aVfohiIMFJR5EqHDovqZZZ eBH8VxO/cYHzjcbQQtlLQSBhKbYxppWGwkFhiaNvMRGAYId1qJ8GYMBMq9CFj+3GJhwv XiZbJNMNSGbywMyqgULv5ssLhxfTW4f2o3kp154x9s90a6MHlerGj/9ujEg3ugaeRWM6 F67Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Nh1HKWtH; 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 i63si3554963pfk.159.2018.04.19.10.17.20; Thu, 19 Apr 2018 10:17:37 -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=Nh1HKWtH; 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 S1753328AbeDSRQK (ORCPT + 99 others); Thu, 19 Apr 2018 13:16:10 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:47042 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752684AbeDSRQI (ORCPT ); Thu, 19 Apr 2018 13:16:08 -0400 Received: by mail-ot0-f196.google.com with SMTP id v64-v6so6651627otb.13 for ; Thu, 19 Apr 2018 10:16:08 -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=EmN0P8J7K3aJvBYZsxkHu7BfOoXO+QiN08Zmzz04SQY=; b=Nh1HKWtHu0na4LzukzozLjZxhNN5F/sAi+F0oxnB2PHTAH2RTyte4ZQ1Ly73sx17Mn NWhcQMz48ZtBMFtGf10M7S0qLAa6X/oxSushSkaYq2MlBppEAmy+m8pwL894TuHOYP7j Pzy8VvbeVv6lAJ/+Iyk3XHAVfzqF9lTG4q9ja2o+FPj+QEDZWliKw0kK0RMqd1ro0l0G c3BD3tKfvu8fYXtZ+Hv/Zjc/A+g+MNfMRjU6XRoIRmcYA9OjfjymTn+cOd7zAHqwHSCw GwB6REiEeOYyrFEpHks7qb3k3ZiSwUZhKuRF1sSKJQa3ET6j1xc9OfjFGtsGfOaHYCyq /fZg== 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=EmN0P8J7K3aJvBYZsxkHu7BfOoXO+QiN08Zmzz04SQY=; b=Xz4Lvhbt7tQpq8gkXd1Qlwrfur6fh+u9EtQLS7iESxajiYyFRHg3rRFCjpcTds/u/w oxY6YeCmhsQyMDpldypsO2n6rv0F06kn052dgeK9v/YT8M0c/aUublXEgO7wrird4Pph IvUwsrZN8L5Proo2fnKxaA967m8W4aCEMKTNolsXAf1sLZfFAH2H4CwWTuJ69vOOH1FO +LVrrZMezLMY8vRBazkGR0jWDDlPEPRj40YOVmZKm/KN09jZgoXXdvS/yDUPhsrs/JOL X8olb4GQ2wxyWCZvrAfpPl/ePMhxMAdq2G0Po+xI66Ukq+vy/AZAlbybPeq6tYW3v4bq qIig== X-Gm-Message-State: ALQs6tC5dbHqCZuBVMqiRBHO6T8M45FwPT81RnyfvcEtoDyqx/p8QyqR BQs2gn/NJNPQyb4HsIkejysWhC4ENKvSog2APGc= X-Received: by 2002:a9d:524d:: with SMTP id q13-v6mr4694059otg.241.1524158168037; Thu, 19 Apr 2018 10:16:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.138.3.77 with HTTP; Thu, 19 Apr 2018 10:15:47 -0700 (PDT) In-Reply-To: <20180416171106.rlm2nrvrxfoodcvf@redbean> References: <20180411190509.24995-1-malat@debian.org> <20180416171106.rlm2nrvrxfoodcvf@redbean> From: Mathieu Malaterre Date: Thu, 19 Apr 2018 19:15:47 +0200 X-Google-Sender-Auth: xTG_DKqMNuL-NomsmzG7-6DZV2Y 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 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` but >> no >> prototype was added to `include/linux/module.h`. Remove warning triggere= d >> 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), "symbol= :" >> #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 tracepoi= nt > 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/#endif Will try out shortly. > Thanks, > > Jessica > > >> /* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */ >> >> #define __MODULE_STRING(x) __stringify(x) >> -- >> 2.11.0 >> >