From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74686C48BDF for ; Fri, 18 Jun 2021 17:48:06 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F01526124C for ; Fri, 18 Jun 2021 17:48:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F01526124C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luIb7-0005ic-44 for qemu-devel@archiver.kernel.org; Fri, 18 Jun 2021 13:48:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luIZQ-0004lH-AF for qemu-devel@nongnu.org; Fri, 18 Jun 2021 13:46:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38827) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luIZO-0004Tm-Se for qemu-devel@nongnu.org; Fri, 18 Jun 2021 13:46:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624038378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OU8KTRuypteXsSafeQ8uuxh6LuP4xaFBhF5koy19PEk=; b=A34lZGn7nhpv4kmocWnBHmhiEnw89wVhjdUFE/Il8+iZ/gFVowwgOKZ8ldTXrpnxdmF34j uiWA9f+4nI1flttMtEMyTgvgZ9jv1f/n4s8XcUc8LcJlkyKz00vbjzZT0UF8cMT6uIVSwo 90KuVa+QWrPiOyDE2YshiG+I7fTP+7U= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-547-HNamD1P8NI-yjJHUKMQRFw-1; Fri, 18 Jun 2021 13:46:16 -0400 X-MC-Unique: HNamD1P8NI-yjJHUKMQRFw-1 Received: by mail-wr1-f72.google.com with SMTP id k25-20020a5d52590000b0290114dee5b660so4677168wrc.16 for ; Fri, 18 Jun 2021 10:46:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OU8KTRuypteXsSafeQ8uuxh6LuP4xaFBhF5koy19PEk=; b=sHFNSuK1QhxcWB6lbJBSeCH4TeKgzHzHiVdeaGIIh9O56p0rZSo3Cd1SJNlwvFwje+ hl07uuvLEA6f9enSUvMZBc1aIApkXSCspkmMFj09fGu5f4JT1oL41r1fgh8uteOcKAPF huS130EoT7k5yEHS18n3w/4usS6Yc1b57TI88OtdFI+2GVq9w9onxtuvSecYvpV16w/C KSUOrLz879si23qwpYgXlgz4knXgDnCbhUib8I7tWKKzwcOBgtAPkJOGk7w9lre2n9xq cnD0nKEHZChxvX2wNkxBvc+lcZuf2nzktNcRX3Ee3dJCQEzJuWYY13muwZLpy8mjgjX5 SRkg== X-Gm-Message-State: AOAM530GfnNVr4dEh9h1H1geB/vfzB1Pxatb/vv8He8fhqmcAkjdFvBW /p3dYaFnaF4zGKdXM/aF8DyN75ZD2p/tEWNDwd3mQuq2GUnJbzapIxYjcN4S8fNV7E0QrYMiNxs WzkA7bFITKGwGv9M= X-Received: by 2002:a5d:5182:: with SMTP id k2mr14027960wrv.262.1624038375874; Fri, 18 Jun 2021 10:46:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzh7N0FsTsPk9x/P0WSb0UxpBv19Y/QuncHU64guBmZruyTvXI8vOzI8FHbGFy/Uy1FzVqjVA== X-Received: by 2002:a5d:5182:: with SMTP id k2mr14027916wrv.262.1624038375606; Fri, 18 Jun 2021 10:46:15 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id t11sm9376665wrz.7.2021.06.18.10.46.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Jun 2021 10:46:14 -0700 (PDT) Subject: Re: [PATCH v3 01/24] modules: add modinfo macros To: Gerd Hoffmann , qemu-devel@nongnu.org References: <20210618045353.2510174-1-kraxel@redhat.com> <20210618045353.2510174-2-kraxel@redhat.com> From: Paolo Bonzini Message-ID: Date: Fri, 18 Jun 2021 19:46:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210618045353.2510174-2-kraxel@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.194, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.202, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Kevin Wolf , Thomas Huth , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Richard Henderson , Cornelia Huck , Peter Lieven , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, "Michael S. Tsirkin" , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 18/06/21 06:53, Gerd Hoffmann wrote: > Add macros for module info annotations. > > Instead of having that module meta-data stored in lists in util/module.c > place directly in the module source code. > > Signed-off-by: Gerd Hoffmann > --- > include/qemu/module.h | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > > diff --git a/include/qemu/module.h b/include/qemu/module.h > index 944d403cbd15..81ef086da023 100644 > --- a/include/qemu/module.h > +++ b/include/qemu/module.h > @@ -73,4 +73,29 @@ bool module_load_one(const char *prefix, const char *lib_name, bool mayfail); > void module_load_qom_one(const char *type); > void module_load_qom_all(void); > > +/* > + * module info annotation macros > + * > + * scripts/modinfo-collect.py will collect module info, > + * using the preprocessor and -DQEMU_MODINFO > + */ > +#ifdef QEMU_MODINFO > +# define modinfo(kind, value) \ > + MODINFO_START kind value MODINFO_END > +#else > +# define modinfo(kind, value) > +#endif > + > +/* module implements QOM type */ > +#define module_obj(name) modinfo(obj, name) > + > +/* module has a dependency on */ > +#define module_dep(name) modinfo(dep, name) > + > +/* module is for target architecture */ > +#define module_arch(name) modinfo(arch, name) > + > +/* module registers QemuOpts */ > +#define module_opts(name) modinfo(opts, name) > + > #endif > Let's ensure that the module system is documented in some file of docs/devel. Paolo