From patchwork Tue May 11 18:06:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas De Marchi X-Patchwork-Id: 12251675 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=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT 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 D1BC0C433B4 for ; Tue, 11 May 2021 18:06:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC83061625 for ; Tue, 11 May 2021 18:06:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231789AbhEKSHl (ORCPT ); Tue, 11 May 2021 14:07:41 -0400 Received: from mga03.intel.com ([134.134.136.65]:17395 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231551AbhEKSHl (ORCPT ); Tue, 11 May 2021 14:07:41 -0400 IronPort-SDR: BlNTZ/I2mEDT+0UZfZ6qSwR309Fnpk//AnR0FNxX69yE1qgTjzEAPcM7NBVTTe24PgkKPz/sL8 0eKjiMvear2A== X-IronPort-AV: E=McAfee;i="6200,9189,9981"; a="199562595" X-IronPort-AV: E=Sophos;i="5.82,291,1613462400"; d="scan'208";a="199562595" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 11:06:33 -0700 IronPort-SDR: RwTEmXnl7md6fnURO3YDja7TDCqj8FAlwcTUJd1pKF30plu7cp24SRL7tSWNzjdw/M2h7oLwvY FkzvZyPcEHlA== X-IronPort-AV: E=Sophos;i="5.82,291,1613462400"; d="scan'208";a="609588620" Received: from yueqiaor-mobl.amr.corp.intel.com (HELO ldmartin-desk2.intel.com) ([10.254.1.104]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 11:06:33 -0700 From: Lucas De Marchi To: linux-modules@vger.kernel.org Cc: Peter Kjellerstedt Subject: [PATCH 1/3] Fix return value doc for kmod_module_get_info() Date: Tue, 11 May 2021 11:06:13 -0700 Message-Id: <20210511180615.400191-2-lucas.demarchi@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210511180615.400191-1-lucas.demarchi@intel.com> References: <20210511180615.400191-1-lucas.demarchi@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: We don't return 0 on success, we return the number of elements we added to the list. --- libkmod/libkmod-module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c index 76a6dc3..b6320cc 100644 --- a/libkmod/libkmod-module.c +++ b/libkmod/libkmod-module.c @@ -2277,7 +2277,7 @@ list_error: * * After use, free the @list by calling kmod_module_info_free_list(). * - * Returns: 0 on success or < 0 otherwise. + * Returns: number of entries in @list on success or < 0 otherwise. */ KMOD_EXPORT int kmod_module_get_info(const struct kmod_module *mod, struct kmod_list **list) { From patchwork Tue May 11 18:06:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas De Marchi X-Patchwork-Id: 12251673 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=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT 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 A4904C433ED for ; Tue, 11 May 2021 18:06:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D7E761155 for ; Tue, 11 May 2021 18:06:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231561AbhEKSHl (ORCPT ); Tue, 11 May 2021 14:07:41 -0400 Received: from mga03.intel.com ([134.134.136.65]:17395 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231459AbhEKSHk (ORCPT ); Tue, 11 May 2021 14:07:40 -0400 IronPort-SDR: BR++npvhxQqQSb3yjWpHXljUVsvuHNuLaVbSLSDkmDNxHKd3Kbhgg/VLbgpzT9EsDfEpOqqutU zhk/Gj/xqjng== X-IronPort-AV: E=McAfee;i="6200,9189,9981"; a="199562599" X-IronPort-AV: E=Sophos;i="5.82,291,1613462400"; d="scan'208";a="199562599" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 11:06:33 -0700 IronPort-SDR: FDUgRtoAlwMgYE3ihFgztGnidlYyctIuc6F+bWzuOWaucf7mNuAmjsoT7086qtfhGvqwEyB/sj HY0cyku4G/fw== X-IronPort-AV: E=Sophos;i="5.82,291,1613462400"; d="scan'208";a="609588624" Received: from yueqiaor-mobl.amr.corp.intel.com (HELO ldmartin-desk2.intel.com) ([10.254.1.104]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 11:06:33 -0700 From: Lucas De Marchi To: linux-modules@vger.kernel.org Cc: Peter Kjellerstedt Subject: [PATCH 2/3] depmod: fix modules.builtin.alias.bin output Date: Tue, 11 May 2021 11:06:14 -0700 Message-Id: <20210511180615.400191-3-lucas.demarchi@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210511180615.400191-1-lucas.demarchi@intel.com> References: <20210511180615.400191-1-lucas.demarchi@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: Due to wrong documentation on kmod_module_get_info() we ended up checking for 0 as return. Check for > 0 to decided if we want to write the index to the file, otherwise we would output a 0-sized index on success. --- tools/depmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/depmod.c b/tools/depmod.c index 170a1d8..eb810b8 100644 --- a/tools/depmod.c +++ b/tools/depmod.c @@ -2457,7 +2457,7 @@ static int output_builtin_alias_bin(struct depmod *depmod, FILE *out) out: /* do not bother writing the index if we are going to discard it */ - if (!ret) + if (ret > 0) index_write(idx, out); if (builtin) From patchwork Tue May 11 18:06:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas De Marchi X-Patchwork-Id: 12251677 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=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT 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 D513BC43461 for ; Tue, 11 May 2021 18:06:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2D7B61155 for ; Tue, 11 May 2021 18:06:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231459AbhEKSHm (ORCPT ); Tue, 11 May 2021 14:07:42 -0400 Received: from mga03.intel.com ([134.134.136.65]:17395 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231551AbhEKSHl (ORCPT ); Tue, 11 May 2021 14:07:41 -0400 IronPort-SDR: EyKipZCCQOTgwwD5t/S8IyelJuy3GsNgLVN2+SH26ckLuTw++BfBCZUFQkoRM8SjZ3BsgDZwvL ofwD8+ZSC7ag== X-IronPort-AV: E=McAfee;i="6200,9189,9981"; a="199562602" X-IronPort-AV: E=Sophos;i="5.82,291,1613462400"; d="scan'208";a="199562602" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 11:06:34 -0700 IronPort-SDR: Lem5w9umnWwxnyNL59FeTupFA2Zuay5LGnuDYAVtyMOr/DjQSsGWn1sbzJDatP6moQX7lDE846 FLcTZwDR0yRw== X-IronPort-AV: E=Sophos;i="5.82,291,1613462400"; d="scan'208";a="609588629" Received: from yueqiaor-mobl.amr.corp.intel.com (HELO ldmartin-desk2.intel.com) ([10.254.1.104]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 11:06:33 -0700 From: Lucas De Marchi To: linux-modules@vger.kernel.org Cc: Peter Kjellerstedt Subject: [PATCH 3/3] testsuite: update gitignore Date: Tue, 11 May 2021 11:06:15 -0700 Message-Id: <20210511180615.400191-4-lucas.demarchi@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210511180615.400191-1-lucas.demarchi@intel.com> References: <20210511180615.400191-1-lucas.demarchi@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: --- testsuite/module-playground/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/module-playground/.gitignore b/testsuite/module-playground/.gitignore index fca12f3..6d9c7b1 100644 --- a/testsuite/module-playground/.gitignore +++ b/testsuite/module-playground/.gitignore @@ -1,4 +1,3 @@ -*o.cmd *.ko !mod-simple-*.ko !cache/*.ko @@ -8,6 +7,7 @@ *.mod *.a *.cmd +*.o.d modules.order Module.symvers