From nobody Sun Apr 12 20:03:51 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BE7FC4332F for ; Mon, 19 Dec 2022 19:19:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232587AbiLSTTO (ORCPT ); Mon, 19 Dec 2022 14:19:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232381AbiLSTTB (ORCPT ); Mon, 19 Dec 2022 14:19:01 -0500 Received: from mail-il1-x14a.google.com (mail-il1-x14a.google.com [IPv6:2607:f8b0:4864:20::14a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6D7011C0D for ; Mon, 19 Dec 2022 11:19:00 -0800 (PST) Received: by mail-il1-x14a.google.com with SMTP id x10-20020a056e021bca00b00302b6c0a683so7193204ilv.23 for ; Mon, 19 Dec 2022 11:19:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=JPHDmjOz4kw82vudyh2gpNSeY/P1g0Ll1cHkuMKd04M=; b=Hl9NxWeWRbBMNIcYbJvo9h4lOhGhAZEsdPi5MbDF9oJxtlLgXY3/mwkDZQWTaIwfkQ uRsDLcZ4I/U1gY4gCmXSISAxWk/Q+4bC9AjBLvXBDAGpdcTe6ZvPzE244kYMz+eA42M7 wUWTlTn5N9Ycs5PdWjiOwiuS4D24OyLvoF1F0RZuvYaBBxdnihvlB8yySBabO1K/gMER IlHNuvhH7i1NM5Zkqc62EZrJphOMVnPQVdcgqbAIpZbhRekeIOeieN7xMd/0cZm4sCYW wHN2yrmAvyiCOSq4m09u35HFC2IdBGxzUUkasE0xaZ33SnBQTRz5fBVfqCSpGlQ3qR0I 8geg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JPHDmjOz4kw82vudyh2gpNSeY/P1g0Ll1cHkuMKd04M=; b=jhPAlyBNoWjGI/lYQmvSmSxA3qCODwv5mv3etLInu1b20lHqet+hSqgAqAGke9OA3G lkKonBdu/qUiPqpaikCtuXGxT1t7yKLt0WtHQ3H7ky+KxEp//mpUSoJ/rCoBiOs6OPx7 sJKJDYfHcJwcGdQzinu5yIZW0Tde+gnvGJ/9qfEFUonuDHH4MGfMYgQVCivpQsTjOhfo 4HBj7TrCkHeYxpgrCA3b3cHGruFgY70XLSFKu4Ki84CtlY37xoSzNIMbjyegd/Qu/Plv gDbGdSDk9khXCuv9Y5TNbc5G83/76DKWIHFwZbcKT2MOr0UdhUT0aYv9K737bDTym2Ny wEyw== X-Gm-Message-State: ANoB5pmF7BM4bvvrbMmKOesZxlymPGNE1Mfg7TtIbFCr+3XdrpUOjf00 Xx7zCCrKYR8D271OSDDjsENjtnvURBYqFEU= X-Google-Smtp-Source: AA0mqf7amPioeMnlA+AUyAIaYb0aW6unNmd1qq3ubnJMOsmcaI05zjSC6BLtBwo3k1pZCRKGf3aTO/JDpU7ONFw= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a02:a117:0:b0:38a:7675:fd26 with SMTP id f23-20020a02a117000000b0038a7675fd26mr5696278jag.300.1671477540032; Mon, 19 Dec 2022 11:19:00 -0800 (PST) Date: Mon, 19 Dec 2022 13:18:47 -0600 In-Reply-To: <20221219191855.2010466-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221216221703.294683-1-allenwebb@google.com> <20221219191855.2010466-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219191855.2010466-2-allenwebb@google.com> Subject: [PATCH v8 1/9] imx: Fix typo From: Allen Webb To: "linux-modules@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: Luis Chamberlain , Greg Kroah-Hartman , "Rafael J. Wysocki" , Allen Webb , kernel test robot Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" A one character difference in the name supplied to MODULE_DEVICE_TABLE breaks a future patch set, so fix the typo. Reported-by: kernel test robot Signed-off-by: Allen Webb --- drivers/soc/imx/imx8mp-blk-ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/soc/imx/imx8mp-blk= -ctrl.c index 0e3b6ba22f943..344a0a71df14a 100644 --- a/drivers/soc/imx/imx8mp-blk-ctrl.c +++ b/drivers/soc/imx/imx8mp-blk-ctrl.c @@ -743,7 +743,7 @@ static const struct of_device_id imx8mp_blk_ctrl_of_mat= ch[] =3D { /* Sentinel */ } }; -MODULE_DEVICE_TABLE(of, imx8m_blk_ctrl_of_match); +MODULE_DEVICE_TABLE(of, imx8mp_blk_ctrl_of_match); =20 static struct platform_driver imx8mp_blk_ctrl_driver =3D { .probe =3D imx8mp_blk_ctrl_probe, --=20 2.37.3 From nobody Sun Apr 12 20:03:51 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC1D8C4332F for ; Mon, 19 Dec 2022 19:19:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232677AbiLSTTY (ORCPT ); Mon, 19 Dec 2022 14:19:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232489AbiLSTTC (ORCPT ); Mon, 19 Dec 2022 14:19:02 -0500 Received: from mail-io1-xd4a.google.com (mail-io1-xd4a.google.com [IPv6:2607:f8b0:4864:20::d4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C69F012AA4 for ; Mon, 19 Dec 2022 11:19:01 -0800 (PST) Received: by mail-io1-xd4a.google.com with SMTP id e15-20020a056602158f00b006e01d8fa493so4502357iow.3 for ; Mon, 19 Dec 2022 11:19:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=SrckFgIzMRVl6+GO1T3v4CruUzPwCuVcCKFsHg7YtbI=; b=UUg8L5dKlwXq1e+434Szr7yJM4I3XvLE2Kj3IAUcBAJhzycVgHnpnDWZJixg41Bzu0 Bglv5AuYNxO4yUAs5anz/yyS/SJZIxhFBGSp1o1H+JBbVbP4ZQPdtshdi2G7b6zQ2TRm a1ckZr585Q1ZQDCPi/esiX5NCl5hcCwsaHGRTgZLQPCmDpFuA8dGAPqVCPGDdTrSCyjc L9498BQ4QGUn0ANdxFu/Q6/wpthwE6O/mvrppdfsZIGK22MLbQE9BxASuBhA7zsI0xP3 3oTjQw/sT5gVvSgvGlauwxYSrZBsMdrkBbJuPXF6dAxhgtkTuK7ZS3butDgZzyABglCb n70g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SrckFgIzMRVl6+GO1T3v4CruUzPwCuVcCKFsHg7YtbI=; b=RwRUgwX65DtXmBvk7uOBgUzJeGVWY7Vldz2wcTQ2SbSmkZQpgAedH5kMMDxXYA1/QN 6J3D70wo0U5eVTIo9MkC90bRiCOnDcQVONAYCCEWmRVeDRzem+JptjEWTJ/yweXseyNL 1UFUyEh6eNisC5ICnGnCsf7um8HzK2GwVYAfJppvkB3sH52xH3SzjxCbIPKPimnzPDNQ LuJjc71XXyCwelCRJnXeTsaVvWs3cfLPmogsYCz4DzFSWrkNkmmebO/LkIi21knyE4Sg uXR2CviHQlS32UYxox40deBwNeJBYxExcRjZHjzlQPQs7LBfSzxzMUiTxhqi0SA215l2 acDw== X-Gm-Message-State: ANoB5pnZT9Ak9Xm3mmYq3o0G7zHRFpsJPVDk5NrCuL9Qfp5q6nOUTh6r eH2bI0DBMAsABpqKP2lc8GMeo/HBjA6akYY= X-Google-Smtp-Source: AA0mqf6JCC52SozjS5ylrKtkpi02QdTsujBz6LZgGENwtkn6N6otc3tBkW107xbibsd3ona8Ic+arlAKgL/LDgo= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a92:d750:0:b0:302:4bf3:237d with SMTP id e16-20020a92d750000000b003024bf3237dmr35832752ilq.312.1671477541236; Mon, 19 Dec 2022 11:19:01 -0800 (PST) Date: Mon, 19 Dec 2022 13:18:48 -0600 In-Reply-To: <20221219191855.2010466-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221216221703.294683-1-allenwebb@google.com> <20221219191855.2010466-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219191855.2010466-3-allenwebb@google.com> Subject: [PATCH v8 2/9] rockchip-mailbox: Fix typo From: Allen Webb To: "linux-modules@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: Luis Chamberlain , Greg Kroah-Hartman , "Rafael J. Wysocki" , Allen Webb , kernel test robot Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" A one character difference in the name supplied to MODULE_DEVICE_TABLE breaks a future patch set, so fix the typo. Reported-by: kernel test robot Signed-off-by: Allen Webb --- drivers/mailbox/rockchip-mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mailbox/rockchip-mailbox.c b/drivers/mailbox/rockchip-= mailbox.c index 979acc810f307..ca50f7f176f6a 100644 --- a/drivers/mailbox/rockchip-mailbox.c +++ b/drivers/mailbox/rockchip-mailbox.c @@ -159,7 +159,7 @@ static const struct of_device_id rockchip_mbox_of_match= [] =3D { { .compatible =3D "rockchip,rk3368-mailbox", .data =3D &rk3368_drv_data}, { }, }; -MODULE_DEVICE_TABLE(of, rockchp_mbox_of_match); +MODULE_DEVICE_TABLE(of, rockchip_mbox_of_match); =20 static int rockchip_mbox_probe(struct platform_device *pdev) { --=20 2.37.3 From nobody Sun Apr 12 20:03:51 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 772E7C3DA71 for ; Mon, 19 Dec 2022 19:19:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232631AbiLSTTT (ORCPT ); Mon, 19 Dec 2022 14:19:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232498AbiLSTTD (ORCPT ); Mon, 19 Dec 2022 14:19:03 -0500 Received: from mail-io1-xd4a.google.com (mail-io1-xd4a.google.com [IPv6:2607:f8b0:4864:20::d4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D3EF12D02 for ; Mon, 19 Dec 2022 11:19:02 -0800 (PST) Received: by mail-io1-xd4a.google.com with SMTP id h21-20020a05660224d500b006debd7dedccso4488222ioe.9 for ; Mon, 19 Dec 2022 11:19:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=OWNuZYCaMdD0VqCL395Kor3n/H1hGaRkxYaUC/R9e30=; b=RevcIhrqWVnTCyAyG1KYmPiklVQWXA6oi8x63005w1ZE4ju2L/vacA4mHJ3tzsUG9w tm5E52DZ1yKiQv8pr++SD+Rs/mldhfd1d6nlHjOudWQnSdRCzhgib95wcTln9tJ3kCOV nGeUsUR+5Jpjs+vcGTPCLqGeHyTnuYy6ssOnebtfbiqypMz1LCoi/zuDJNTwvpDetH7v hiZapLh9uGgpwQz708WoD8g3H+Bd3jbX2yfQIs2qyjU2B9q8K63mGE5vwX/1b1TWKFAD ggRTtY0Rvl9k6GEbhiURa3jZBTCeNq4aOO+ob4U7EhG7P4rK1sOpl9qhG2jmBzOoGN0R /ZxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OWNuZYCaMdD0VqCL395Kor3n/H1hGaRkxYaUC/R9e30=; b=oDfuKulV7UXOing6byp042eyB1vWVB54q7iCI5Q5AJ5M+Bn8lj8WNAitQbXx0JQrp6 4sATlP0JNs84/lVCAYWCFO3Uesnhi07JAhFGtmy8Xo7rj0KeI2gu3499i1eOm6RcaKhk YRwt36dAJCZsFdM+5Ln9S1SjVgJOPbtgqZTt76u+gtZlIR+HVKMpbxszr2ab4Zb4RwO4 Bf6WR8iB6Z4SSqhB0UGvI0UdlScUVGcp/CXNzc20uwhzgQswG9ZYRFeXWZMD9wesxxI5 TmKBfSpxj9NuRHwnyWrmTkO4RjWQBOvyWPYmQgffPB539BeifsZZER/dvwhWem3wWATh DYTA== X-Gm-Message-State: ANoB5plQZeJ8ljFfsB8q+c8tA7BMc2TFee4Of1W3wixgagJ0ea1f4ubi 4naVrxtf10Uy5Y+rQsNk4JR6VAjGPPGML1k= X-Google-Smtp-Source: AA0mqf6anYld01mlT0bgsEUW2E614uK1xY0nfYX11Z7gH5gt8Lz/huRlMVEEPaCK3ttoKX4XoKeMyd/3padWXCE= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a5d:9158:0:b0:6df:b406:273c with SMTP id y24-20020a5d9158000000b006dfb406273cmr21977487ioq.110.1671477542105; Mon, 19 Dec 2022 11:19:02 -0800 (PST) Date: Mon, 19 Dec 2022 13:18:49 -0600 In-Reply-To: <20221219191855.2010466-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221216221703.294683-1-allenwebb@google.com> <20221219191855.2010466-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219191855.2010466-4-allenwebb@google.com> Subject: [PATCH v8 3/9] scsi/BusLogic: Always include device id table From: Allen Webb To: "linux-modules@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: Luis Chamberlain , Greg Kroah-Hartman , "Rafael J. Wysocki" , Allen Webb , kernel test robot Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" A future patch makes use of the device table for built-in modules, so do not ifdef out the match id table. Reported-by: kernel test robot Signed-off-by: Allen Webb --- drivers/scsi/BusLogic.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index f2abffce26599..0c60867c9e7c0 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c @@ -3715,7 +3715,6 @@ static void __exit blogic_exit(void) =20 __setup("BusLogic=3D", blogic_setup); =20 -#ifdef MODULE /*static struct pci_device_id blogic_pci_tbl[] =3D { { PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, @@ -3731,7 +3730,6 @@ static const struct pci_device_id blogic_pci_tbl[] = =3D { {PCI_DEVICE(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT)}, {0, }, }; -#endif MODULE_DEVICE_TABLE(pci, blogic_pci_tbl); =20 module_init(blogic_init); --=20 2.37.3 From nobody Sun Apr 12 20:03:51 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B630C10F1B for ; Mon, 19 Dec 2022 19:19:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232723AbiLSTT3 (ORCPT ); Mon, 19 Dec 2022 14:19:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232507AbiLSTTE (ORCPT ); Mon, 19 Dec 2022 14:19:04 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC94012AD7 for ; Mon, 19 Dec 2022 11:19:03 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id x188-20020a2531c5000000b00716de19d76bso11760571ybx.19 for ; Mon, 19 Dec 2022 11:19:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=j2p26kH68+WgnYwnXdelBfFnvRqAaD40WaeHNedYNHU=; b=QurtRDMPyKpTVAoluohEB6g89BkGj8nHIYN7x9twKCAjVVb7Z46MJGnl+S3vvpr5+j 6yQN6KoZRmWqvR+PQICSzwW0SIBq3vnWF1bdtSxg0ys/WHdrLRqBWqz3I6gskka/ncN7 ScbBIuOIZKjYiKW7knbqHoPeksu80g8Y+4f1ucjpYcoYrWkEpD2pDXM/JSeg+IOGBRMO RldP9MyuMDt10ZAp4YzpM0wjcHF2Z2jCGkHh0o38Xi3o6kxazRqNxbhrGscrszWsCaQh TgaXJR6YHRbmbYjmKo/3iT5ZpLG3wTcyfvBmqcWd5P5SbAC4Aw76h4FgbU9zdffjfhR4 3A8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=j2p26kH68+WgnYwnXdelBfFnvRqAaD40WaeHNedYNHU=; b=tSwPKZzAWb1g+weGep5/WJ7U8j1K57d8GF9rdwyRvLsvQaRW9wNRWK3szxqIDkmpgy Jw9G5rdP2Lbo/YSqerauwV4AhX0I55bPj02WduvMQadh0WXdlfTYG5goJ1rAir22die/ nHUlU5zhnXGzQ1qQ1Zw6hTfzgeOnviVB3NrlhAM9Y0K/SRPNwzZgT6N7qh/3HqrbwUS6 ybPdV2DvcZLGGgRy+RomrdCm0a7bGiME5Jc1QQMKvzT+SAJJ+qpNC7gTiMhQat2zReas tA+A9c4d321KdgxoJ24DLOSb8ki/ekvPXCkth19mp/FJB53kUZfkyOAfaE8ZgNw1AHBc ficw== X-Gm-Message-State: ANoB5pknmk3YTrHtIeRHsj2grK8qrlHtteu0/ApPQhxW0VPxEeK4olLm HfV0m9EZUbpGI+KLb1lKtw1hwD1kZtSTIz4= X-Google-Smtp-Source: AA0mqf6dX4h6UF+praOlBe6Ty1rhwe854U2JXGDWpDmBDTz0mT+rdaatesm+Zwdhvx8UPT5OVavHDrHoykap2zU= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a05:690c:f8a:b0:3b4:8af5:48e with SMTP id df10-20020a05690c0f8a00b003b48af5048emr3893210ywb.383.1671477542998; Mon, 19 Dec 2022 11:19:02 -0800 (PST) Date: Mon, 19 Dec 2022 13:18:50 -0600 In-Reply-To: <20221219191855.2010466-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221216221703.294683-1-allenwebb@google.com> <20221219191855.2010466-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219191855.2010466-5-allenwebb@google.com> Subject: [PATCH v8 4/9] stmpe-spi: Fix typo From: Allen Webb To: "linux-modules@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: Luis Chamberlain , Greg Kroah-Hartman , "Rafael J. Wysocki" , Allen Webb , kernel test robot Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" A small difference in the name supplied to MODULE_DEVICE_TABLE breaks a future patch set, so fix the typo. Reported-by: kernel test robot Signed-off-by: Allen Webb --- drivers/mfd/stmpe-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/stmpe-spi.c b/drivers/mfd/stmpe-spi.c index ad8055a0e2869..6791a53689777 100644 --- a/drivers/mfd/stmpe-spi.c +++ b/drivers/mfd/stmpe-spi.c @@ -129,7 +129,7 @@ static const struct spi_device_id stmpe_spi_id[] =3D { { "stmpe2403", STMPE2403 }, { } }; -MODULE_DEVICE_TABLE(spi, stmpe_id); +MODULE_DEVICE_TABLE(spi, stmpe_spi_id); =20 static struct spi_driver stmpe_spi_driver =3D { .driver =3D { --=20 2.37.3 From nobody Sun Apr 12 20:03:51 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F55AC4332F for ; Mon, 19 Dec 2022 19:19:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232730AbiLSTTe (ORCPT ); Mon, 19 Dec 2022 14:19:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232517AbiLSTTF (ORCPT ); Mon, 19 Dec 2022 14:19:05 -0500 Received: from mail-il1-x149.google.com (mail-il1-x149.google.com [IPv6:2607:f8b0:4864:20::149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9721912AD0 for ; Mon, 19 Dec 2022 11:19:04 -0800 (PST) Received: by mail-il1-x149.google.com with SMTP id z19-20020a921a53000000b0030b90211df1so3338470ill.2 for ; Mon, 19 Dec 2022 11:19:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=eqmNATfXsr4DizCCpcth0y0vfLVrabd2UB2TT6EQhwI=; b=nRXB21sdSHLfWpo7N4XIXagu8tN6MLNzEf/XK5MEcty8CuPQL5YMnsqfai5Q+IbdIF 14DWDkSr96sCp8k/zeJi6r+/dxB35qGUcm/v4Imy4LtNfr1hENCjQfCdPqCCXcw1NOpf X5brWGCUwXzedJ4uBBYdErJSmBmo9bZ+VhN4ropseS0jooJkefrkjJCxLUyqEg4yrqwA 2JbTOWGNMctd6cY471HxpoKlkDPq/qR70l7yRpzMa443BWcv5Z/L3CP/YeVU+uugx6+O 8OYloy1b30G4FeiksfDhGmD3kXgh7vcE1sRJe4lOtLajRMKuDx9f2PisIfIiQAmzA7uY UjYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eqmNATfXsr4DizCCpcth0y0vfLVrabd2UB2TT6EQhwI=; b=Ux0U/PcPm2Js44n26gzHkydUVt4fIgZPkBpt/GRIa9Q0FdIjHjbSC18c4ZRgM/ybbg rKp57w7/hpmip3RDJB0dHmAKDx4wl4O02O+klVwDvHWH7beZnRFac2/0TcrpT6zjcoqi PLKp7wZl6pCFUPdcj+GK4Z8HASDe4m+i943ZLkKfUD0kpREVkRdRuXheJS33LX2KtWGP TNmmuUJMhZtD5UhVu8M4FUdtZZI24KnI6wanbc9ppRW/ZcAVQoZjR7vnXMU5ZbvcJiwY peigGXwp7bfzdz0Ah6tQx45S2GE2wOZtIepJhx5L9YCI8H89v1n3nb4kDHY2Q/s2m2Vs wFsg== X-Gm-Message-State: ANoB5pmBK5WZxUbIgFYKmGBuzw+CyhX7mPIrSDzGcTm0phDy9pUgG03r y9XHauRr+3riLyRJQtDp41mRTFV+ZJfHask= X-Google-Smtp-Source: AA0mqf6/69oC+XVcb8sc3AmTmcabYuhNR/zI/qvKBjqLFxGT52ZtwxDb0ia9EL4d7otrnLTHTSp8eFpx2JtnIhc= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a05:6e02:1d84:b0:302:ce48:40ee with SMTP id h4-20020a056e021d8400b00302ce4840eemr35088599ila.157.1671477543996; Mon, 19 Dec 2022 11:19:03 -0800 (PST) Date: Mon, 19 Dec 2022 13:18:51 -0600 In-Reply-To: <20221219191855.2010466-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221216221703.294683-1-allenwebb@google.com> <20221219191855.2010466-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219191855.2010466-6-allenwebb@google.com> Subject: [PATCH v8 5/9] module.h: MODULE_DEVICE_TABLE for built-in modules From: Allen Webb To: "linux-modules@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: Luis Chamberlain , Greg Kroah-Hartman , "Rafael J. Wysocki" , Allen Webb Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Implement MODULE_DEVICE_TABLE for build-in modules to make it possible to generate a builtin.alias file to complement modules.alias. Signed-off-by: Allen Webb --- include/linux/module.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/include/linux/module.h b/include/linux/module.h index ec61fb53979a9..3d1b04ca63505 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -243,7 +243,20 @@ extern void cleanup_module(void); extern typeof(name) __mod_##type##__##name##_device_table \ __attribute__ ((unused, alias(__stringify(name)))) #else /* !MODULE */ -#define MODULE_DEVICE_TABLE(type, name) +/* + * The names may not be unique for built-in modules, so include the module= name + * to guarantee uniqueness. + * + * Note that extern is needed because modpost reads these symbols to gener= ate + * modalias entries for each match id in each device table. They are not u= sed + * at runtime. + */ +#define MODULE_DEVICE_TABLE(type, name) \ +extern void *CONCATENATE( \ + CONCATENATE(__mod_##type##__##name##__, \ + __KBUILD_MODNAME), \ + _device_table) \ + __attribute__ ((unused, alias(__stringify(name)))) #endif =20 /* Version of form [:][-]. --=20 2.37.3 From nobody Sun Apr 12 20:03:51 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E40EEC4332F for ; Mon, 19 Dec 2022 19:19:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232736AbiLSTTh (ORCPT ); Mon, 19 Dec 2022 14:19:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232248AbiLSTTG (ORCPT ); Mon, 19 Dec 2022 14:19:06 -0500 Received: from mail-il1-x149.google.com (mail-il1-x149.google.com [IPv6:2607:f8b0:4864:20::149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8989812D29 for ; Mon, 19 Dec 2022 11:19:05 -0800 (PST) Received: by mail-il1-x149.google.com with SMTP id o10-20020a056e02102a00b003006328df7bso7082766ilj.17 for ; Mon, 19 Dec 2022 11:19:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=QPz4DVz3tZDZwOVeqeTus3Hhdj8ABoJzZwaMAiF7Nxg=; b=HmQ2kiymwOL9kUhLxZJM5G/ssb7viDDO+nKpbR8v8lfSPSJVTzx9nWNNUPPmk32ot4 AYAQGLqdfd2uQnxuJeTBLLzf9JIUunUmXYjXMZVs5D4iEcx0gZ3qiZuPD68M8OmMfX1D P25V4wPBj0wABkx5DUwHuZHIeo8TuT+lW/YpcHxZa2FbT4yAra6jb7zi784dg0mGYxxz dZzJRLxKZAVI9t9aVegiOumN+hBaZLIEEn0DtpTYJVec+5fYEaRFt1C0qlB4Ere3GNiO T4FDM93EieTv4NNVjwjxXEfgriNZTNAPXWacGUOFzKucVaFUUv2EgcDK8276jLq9SkjG Mjjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QPz4DVz3tZDZwOVeqeTus3Hhdj8ABoJzZwaMAiF7Nxg=; b=nubUZOhmvcTqBoX+j/T0ymwX/W0hJB8cKHw6+jBAm76QiBeG2XvEEvwd0KqhpxvCMC YXC6cQVxwiZiYJCnBOg68HhLlgEV6B1jdnM7VOwJbzoxBmPH5idoU4xFTnOmwLq1PXvf KYewZ9HaOHpPwJ3BorCkT7LnMnAQUoDkv6aKH/ePa5RkDRPWUsWPYOkz1ojnb0yTKR+d x/BxTWmKd/KgHO3QIkpWT079h4WYFlQatl/hWX6rofJ4Ff5Hh9slW4w8Qkrtd4d8leJh rg1T0YRDictz+Dz7H0sIMhWE+pm1EJQh9BoNY1TlgQSBNrYJ8KtM+c0MuUnM/hyitFKQ c4hA== X-Gm-Message-State: ANoB5pnXBzV08L/YAHAfuDIJBIqR5IZ+kpYKS5bClCTK2VA0GxgnNEr3 roYCemiYn8jk/Mod1ozQ3aK4yYO6RzF9nJo= X-Google-Smtp-Source: AA0mqf6t5nkMBwgRaVv39PyR4Pntw8jUtKj60DAOxmDGxiaFq1PK1JoSJo+d+K7MDtRnJa5HBj0/t3YUMlD6fbY= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a6b:fb06:0:b0:6e0:c4d:65e2 with SMTP id h6-20020a6bfb06000000b006e00c4d65e2mr10765676iog.30.1671477545287; Mon, 19 Dec 2022 11:19:05 -0800 (PST) Date: Mon, 19 Dec 2022 13:18:52 -0600 In-Reply-To: <20221219191855.2010466-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221216221703.294683-1-allenwebb@google.com> <20221219191855.2010466-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219191855.2010466-7-allenwebb@google.com> Subject: [PATCH v8 6/9] modpost: Track module name for built-in modules From: Allen Webb To: "linux-modules@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: Luis Chamberlain , Greg Kroah-Hartman , "Rafael J. Wysocki" , Allen Webb Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Keep track of the module name when processing match table symbols. Signed-off-by: Allen Webb --- scripts/mod/file2alias.c | 39 +++++++++++++++++++++++++++++++++++---- scripts/mod/modpost.h | 1 + 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 80d973144fded..e41ff8de7a876 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -28,6 +28,7 @@ typedef Elf64_Addr kernel_ulong_t; #include #endif =20 +#include #include #include =20 @@ -1540,9 +1541,9 @@ void handle_moddevtable(struct module *mod, struct el= f_info *info, Elf_Sym *sym, const char *symname) { void *symval; - char *zeros =3D NULL; - const char *name, *identifier; - unsigned int namelen; + char *zeros =3D NULL, *modname_str =3D NULL; + const char *name, *identifier, *modname; + unsigned int namelen, modnamelen; =20 /* We're looking for a section relative symbol */ if (!sym->st_shndx || get_secindex(info, sym) >=3D info->num_sections) @@ -1552,7 +1553,12 @@ void handle_moddevtable(struct module *mod, struct e= lf_info *info, if (ELF_ST_TYPE(sym->st_info) !=3D STT_OBJECT) return; =20 - /* All our symbols are of form __mod____device_table. */ + /* + * All our symbols are either of form + * __mod____device_table + * or + * __mod_____kmod__device_table + */ if (strncmp(symname, "__mod_", strlen("__mod_"))) return; name =3D symname + strlen("__mod_"); @@ -1564,8 +1570,30 @@ void handle_moddevtable(struct module *mod, struct e= lf_info *info, identifier =3D strstr(name, "__"); if (!identifier) return; + modnamelen =3D namelen; namelen =3D identifier - name; =20 + /* + * In the vmlinuz.o case we want to handle __kmod_ so aliases from + * builtin modules are attributed correctly. + */ + modname =3D strstr(identifier + 2, "__kmod_"); + if (modname) { + modname +=3D strlen("__kmod_"); + modnamelen -=3D (modname - name) + strlen("_device_table"); + modname_str =3D malloc(modnamelen + 1); + /* We don't want to continue if the allocation fails. */ + assert(modname_str); + memcpy(modname_str, modname, modnamelen); + modname_str[modnamelen] =3D '\0'; + } + + if (modname_str) + modname =3D modname_str; + else + modname =3D mod->name; + mod->builtin_name =3D modname; + /* Handle all-NULL symbols allocated into .bss */ if (info->sechdrs[get_secindex(info, sym)].sh_type & SHT_NOBITS) { zeros =3D calloc(1, sym->st_size); @@ -1597,6 +1625,9 @@ void handle_moddevtable(struct module *mod, struct el= f_info *info, } } free(zeros); + mod->builtin_name =3D NULL; + if (modname_str) + free(modname_str); } =20 /* Now add out buffered information to the generated C source */ diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index 1178f40a73f3d..34fe5fc0b02cb 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@ -128,6 +128,7 @@ struct module { struct list_head missing_namespaces; // Actual imported namespaces struct list_head imported_namespaces; + const char *builtin_name; char name[]; }; =20 --=20 2.37.3 From nobody Sun Apr 12 20:03:51 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46F84C4332F for ; Mon, 19 Dec 2022 19:19:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232754AbiLSTTt (ORCPT ); Mon, 19 Dec 2022 14:19:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232531AbiLSTTH (ORCPT ); Mon, 19 Dec 2022 14:19:07 -0500 Received: from mail-il1-x149.google.com (mail-il1-x149.google.com [IPv6:2607:f8b0:4864:20::149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC3A912D20 for ; Mon, 19 Dec 2022 11:19:06 -0800 (PST) Received: by mail-il1-x149.google.com with SMTP id l13-20020a056e021c0d00b003034e24b866so7210765ilh.22 for ; Mon, 19 Dec 2022 11:19:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=s1QcpBS4B8OCRMlI6Nk9ugzJN1lhkA3oxgxR2mhdmU8=; b=aZSbLaOZ+GBeKFR5sV7mPGP78KGpvjTZ3MVNmDTTr3vK2vxqlTxaSwFQJjSYRriUaB hBXx8NVlBOEdWV0XBakPDChmJfeYXq/KDIQtSrKNqPloEIfLgX2nHAG7k6X+lB1tnjYM 0mFrrmAZ7Mmm3N+9dFxfanyG1qvWdmzDesSLvdrE11LszZWtyNsUREiJyWszo93d8/8s HkCNzmvjGCBnKWb9Mx+udAyuhWBHsxVW94Qy+oRRLOnen7JvimnimXhXLv1EQ45OwmKM bKoLNuibpikmWKZ2I7QHTSn0jSdnhlhqur/sdZeXpjlm3604hHGT//rcrgKdKoByq94H dY9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=s1QcpBS4B8OCRMlI6Nk9ugzJN1lhkA3oxgxR2mhdmU8=; b=wf7fhBoPDXZHH5DxzUoQwOEB16PCgkRrOhCC6teAiD9F5o6BdaqKhpLWLitK984QeY kWyip3B+Vgu7NkLXR67773R1G0xr5RQW9i67OZub/dR3c8koOiJYUsv3JcYvlh0IezgB ZN64vsmBa5Ncl31t/7SkyI3S19KO/oMBJ/9G93+tim/DUEh+MyYgYc7ZLPs/Er8nkRC/ yfsSKYKiM7NtRno9q/kd3h22uFGI1e42G3e14hv3vgKV6FGsESQHyena9F1NDuhkO3b2 2GSrizGXUkixwRvCoSFKgNSnhQPsbmKntxNy+SsVeAvFtYDMpzGBdfLZl2V1pOKnX0Ii olSQ== X-Gm-Message-State: ANoB5pmDp59MjwLybE7x7C5aUp+LdvY06JEePAJK1T8kku9dYBUIKiW9 eR0TCQOsvkA0rWu/y9IzjMruqVBV4o/c2uU= X-Google-Smtp-Source: AA0mqf76MaacOi4aEpvJ1Isi5klDCra6Jw1gbQxSu25hAbLCWIci9uOG76PMh89gkoiPFeNvKRhu/nk8686ayas= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a02:c6a5:0:b0:38a:7bae:6a60 with SMTP id o5-20020a02c6a5000000b0038a7bae6a60mr5324846jan.37.1671477546412; Mon, 19 Dec 2022 11:19:06 -0800 (PST) Date: Mon, 19 Dec 2022 13:18:53 -0600 In-Reply-To: <20221219191855.2010466-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221216221703.294683-1-allenwebb@google.com> <20221219191855.2010466-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219191855.2010466-8-allenwebb@google.com> Subject: [PATCH v8 7/9] modpost: Add -b option for emitting built-in aliases From: Allen Webb To: "linux-modules@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: Luis Chamberlain , Greg Kroah-Hartman , "Rafael J. Wysocki" , Allen Webb Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This adds an unimplemented command line flag for writing the built-in aliases to a file. Signed-off-by: Allen Webb --- scripts/mod/modpost.c | 23 +++++++++++++++++++++-- scripts/mod/modpost.h | 1 + 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 2c80da0220c32..e38d6b2ceea40 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -2165,6 +2165,19 @@ static void write_if_changed(struct buffer *b, const= char *fname) write_buf(b, fname); } =20 +/* Write the builtin aliases to the specified file. */ +static void write_builtin(const char *fname) +{ + struct buffer buf =3D { }; + struct module *mod; + + list_for_each_entry(mod, &modules, list) + buf_write(&buf, mod->modalias_buf.p, mod->modalias_buf.pos); + + write_if_changed(&buf, fname); + free(buf.p); +} + static void write_vmlinux_export_c_file(struct module *mod) { struct buffer buf =3D { }; @@ -2321,13 +2334,16 @@ int main(int argc, char **argv) { struct module *mod; char *missing_namespace_deps =3D NULL; - char *dump_write =3D NULL, *files_source =3D NULL; + char *builtin_write =3D NULL, *dump_write =3D NULL, *files_source =3D NUL= L; int opt; LIST_HEAD(dump_lists); struct dump_list *dl, *dl2; =20 - while ((opt =3D getopt(argc, argv, "ei:mnT:o:awENd:")) !=3D -1) { + while ((opt =3D getopt(argc, argv, "b:ei:mnT:o:awENd:")) !=3D -1) { switch (opt) { + case 'b': + builtin_write =3D optarg; + break; case 'e': external_module =3D true; break; @@ -2390,6 +2406,9 @@ int main(int argc, char **argv) write_mod_c_file(mod); } =20 + if (builtin_write) + write_builtin(builtin_write); + if (missing_namespace_deps) write_namespace_deps_files(missing_namespace_deps); =20 diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index 34fe5fc0b02cb..c55a6aeb46bfd 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@ -123,6 +123,7 @@ struct module { bool has_init; bool has_cleanup; struct buffer dev_table_buf; + struct buffer modalias_buf; char srcversion[25]; // Missing namespace dependencies struct list_head missing_namespaces; --=20 2.37.3 From nobody Sun Apr 12 20:03:51 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D67B8C4332F for ; Mon, 19 Dec 2022 19:19:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232745AbiLSTTm (ORCPT ); Mon, 19 Dec 2022 14:19:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232386AbiLSTTJ (ORCPT ); Mon, 19 Dec 2022 14:19:09 -0500 Received: from mail-io1-xd4a.google.com (mail-io1-xd4a.google.com [IPv6:2607:f8b0:4864:20::d4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 276F511C0C for ; Mon, 19 Dec 2022 11:19:08 -0800 (PST) Received: by mail-io1-xd4a.google.com with SMTP id n10-20020a6b590a000000b006e03471b3eeso4473869iob.11 for ; Mon, 19 Dec 2022 11:19:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=cjGe6fxSS7cTt3mra7vAbJD0wH3tbfNYD/FCvl4NRMk=; b=FwO+EN0GRH6yMNy3i+aRaQi4k6ltrzQBDq0j2HgKcM4M/i0+GG/Tmh4ilo2ihykEDy Z3DOBVb7Hmq/tEN1Fv7roWQ+ePXHhHxxxbUSha5Tue3vGD0YSCIw5CdxZJ10vUa7j4sz /DDGenrw2NvJi/Pse/FoKztr5v6NXg/S7iy9zlEKswHs50EeHpMw/wCmWIvNVAAl/sJQ nVcs8jSLbqOYsGA7sZaPExqgzl0/OLlwn7nJM5YDweKk2lSBKB2VNh6AdN/9jDCPPRDt k8HINHwwMp2JVSAhC7XTE1zZqkTsd+OcFG5w7tdcU20hhKaWWMZrWhIcKMp2nvsSChQ9 4WzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cjGe6fxSS7cTt3mra7vAbJD0wH3tbfNYD/FCvl4NRMk=; b=wlfurP+ETf7jho14DmPMb7DWSoDJJJTIG3/CYT75pRShF9OTphsOsz3BHhZJ+nTeZZ nkJS4Ki01AO/xSHHL/UVJp2aeFbn7AmoKt8ZAiBsw4irpIXTpAH4NyN8tTPV1jPjq9J8 Sktfi+jcot4YXyOVc2oa4YysqO/yswEKX2x8EdcNYNw0DQ0hy92wr/cFO5gOOFXm0FaX 1X+sH4F9b+CsDG7q2JbXFhHCSSt7N1D77XMH6tYGOVBNf1mzCiXtm7IhBjDdiZblYgHm o7H74EyCJ3LKGN/Z9+woTDlEqqrdlQdZAue0QIxXjasJFfKgAofGjqElu0LUiusHqVS+ P5HA== X-Gm-Message-State: AFqh2kpiMjPPmsX1wsqrz7bA9F8exKNWioOAdhzK8ya8ZxEOvog86zYu KJ/GDbW6h2ujLgXi1Dm8rgAjj9DgEMm5vxc= X-Google-Smtp-Source: AMrXdXtEWFR5m+TguTy7DMteh2YUscW21cjm7GoJQqd4O805GlSojiqfl7ZGAJOibTR3VFOZRn9mfAPK7+rMVYU= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a05:6e02:2207:b0:30b:c336:8a83 with SMTP id j7-20020a056e02220700b0030bc3368a83mr61889ilf.92.1671477547452; Mon, 19 Dec 2022 11:19:07 -0800 (PST) Date: Mon, 19 Dec 2022 13:18:54 -0600 In-Reply-To: <20221219191855.2010466-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221216221703.294683-1-allenwebb@google.com> <20221219191855.2010466-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219191855.2010466-9-allenwebb@google.com> Subject: [PATCH v8 8/9] file2alias.c: Implement builtin.alias generation From: Allen Webb To: "linux-modules@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: Luis Chamberlain , Greg Kroah-Hartman , "Rafael J. Wysocki" , Allen Webb Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This populates the mod->modalias_buf with aliases for built-in modules when modpost is run against vmlinuz.o. Signed-off-by: Allen Webb --- scripts/mod/file2alias.c | 55 +++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index e41ff8de7a876..e840cb51281a4 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -232,6 +232,8 @@ static void do_usb_entry(void *symval, add_wildcard(alias); buf_printf(&mod->dev_table_buf, "MODULE_ALIAS(\"%s\");\n", alias); + if (mod->builtin_name) + buf_printf(&mod->modalias_buf, "alias %s %s\n", alias, mod->builtin_name= ); } =20 /* Handles increment/decrement of BCD formatted integers */ @@ -376,9 +378,13 @@ static void do_of_entry_multi(void *symval, struct mod= ule *mod) *tmp =3D '_'; =20 buf_printf(&mod->dev_table_buf, "MODULE_ALIAS(\"%s\");\n", alias); + if (mod->builtin_name) + buf_printf(&mod->modalias_buf, "alias %s %s\n", alias, mod->builtin_name= ); strcat(alias, "C"); add_wildcard(alias); buf_printf(&mod->dev_table_buf, "MODULE_ALIAS(\"%s\");\n", alias); + if (mod->builtin_name) + buf_printf(&mod->modalias_buf, "alias %s %s\n", alias, mod->builtin_name= ); } =20 static void do_of_table(void *symval, unsigned long size, @@ -610,12 +616,18 @@ static void do_pnp_device_entry(void *symval, unsigne= d long size, =20 buf_printf(&mod->dev_table_buf, "MODULE_ALIAS(\"pnp:d%s*\");\n", *id); + if (mod->builtin_name) + buf_printf(&mod->modalias_buf, "alias pnp:d%s* %s\n", + *id, mod->builtin_name); =20 /* fix broken pnp bus lowercasing */ for (j =3D 0; j < sizeof(acpi_id); j++) acpi_id[j] =3D toupper((*id)[j]); buf_printf(&mod->dev_table_buf, "MODULE_ALIAS(\"acpi*:%s:*\");\n", acpi_id); + if (mod->builtin_name) + buf_printf(&mod->modalias_buf, "alias acpi*:%s:* %s\n", + acpi_id, mod->builtin_name); } } =20 @@ -637,6 +649,8 @@ static void do_pnp_card_entries(void *symval, unsigned = long size, const char *id =3D (char *)(*devs)[j].id; int i2, j2; int dup =3D 0; + char acpi_id[PNP_ID_LEN]; + int k; =20 if (!id[0]) break; @@ -662,19 +676,23 @@ static void do_pnp_card_entries(void *symval, unsigne= d long size, } =20 /* add an individual alias for every device entry */ - if (!dup) { - char acpi_id[PNP_ID_LEN]; - int k; - - buf_printf(&mod->dev_table_buf, - "MODULE_ALIAS(\"pnp:d%s*\");\n", id); - - /* fix broken pnp bus lowercasing */ - for (k =3D 0; k < sizeof(acpi_id); k++) - acpi_id[k] =3D toupper(id[k]); - buf_printf(&mod->dev_table_buf, - "MODULE_ALIAS(\"acpi*:%s:*\");\n", acpi_id); - } + if (dup) + continue; + + buf_printf(&mod->dev_table_buf, + "MODULE_ALIAS(\"pnp:d%s*\");\n", id); + if (mod->builtin_name) + buf_printf(&mod->modalias_buf, "alias pnp:d%s* %s\n", + id, mod->builtin_name); + + /* fix broken pnp bus lowercasing */ + for (k =3D 0; k < sizeof(acpi_id); k++) + acpi_id[k] =3D toupper(id[k]); + buf_printf(&mod->dev_table_buf, + "MODULE_ALIAS(\"acpi*:%s:*\");\n", acpi_id); + if (mod->builtin_name) + buf_printf(&mod->modalias_buf, "alias acpi*:%s:* %s\n", + acpi_id, mod->builtin_name); } } } @@ -1476,10 +1494,13 @@ static void do_table(void *symval, unsigned long si= ze, size -=3D id_size; =20 for (i =3D 0; i < size; i +=3D id_size) { - if (do_entry(mod->name, symval+i, alias)) { - buf_printf(&mod->dev_table_buf, - "MODULE_ALIAS(\"%s\");\n", alias); - } + if (!do_entry(mod->name, symval + i, alias)) + continue; + buf_printf(&mod->dev_table_buf, "MODULE_ALIAS(\"%s\");\n", alias); + if (!mod->builtin_name) + continue; + buf_printf(&mod->modalias_buf, "alias %s %s\n", alias, + mod->builtin_name); } } =20 --=20 2.37.3 From nobody Sun Apr 12 20:03:51 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDEDDC4167B for ; Mon, 19 Dec 2022 19:20:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232492AbiLSTT6 (ORCPT ); Mon, 19 Dec 2022 14:19:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232564AbiLSTTJ (ORCPT ); Mon, 19 Dec 2022 14:19:09 -0500 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58FD913CC2 for ; Mon, 19 Dec 2022 11:19:09 -0800 (PST) Received: by mail-yb1-xb49.google.com with SMTP id y133-20020a25328b000000b006f997751950so11675460yby.7 for ; Mon, 19 Dec 2022 11:19:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=iIc91OoDv/mBPCGHIucL2csPnIlsRLcBZ/NTNtcT38Q=; b=r8vPBYkfeyPzl0oDj/LTaQo+BZJ7LAkSF5428uTADVbbx4PH0krjcafDDu6HZWVLF/ 6PK65zYCRLx/WopxRxp3Uxjzj32xc++LBtmmCjcK2Lyfa7QDmG2wr1AIhBOfBpd0y3F7 rF2zLFeT9NcKM2MJOlwDxsbVXrKJh0y5EPJTqXSFHIG6d7wT5rmbIPq0ZDA/lSNQWRc5 KvvsyX7kLtAAyaI7OeQ02ycGiFds8HatG+Vilc1GVYOq7oIhPCaeyM5NLsyGFMozcp/1 bonJrRbgxss5V5/ewRa+AQlechuVqx9l2/cIaFE8w2rGn+vMfAefFzxcNb/DmiWg4tVI 5RLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iIc91OoDv/mBPCGHIucL2csPnIlsRLcBZ/NTNtcT38Q=; b=5i9RDjy3yFeh4gJTpjen4weBQeq73VRfgZe2EQ6VY/ZiuaKiJM5ZhV03Q2S134mjGN qz5CR/CIBc5lapYO1yl+4pdedhlOow0hvrHZVrRNVqrQLBbMxWmKXlAePGumwM3SFewB zEpURuHkAfFMJx9AvvZh4or7G8EVw2u2Vcz+kLE63tCiDagsK+EzhrB3rffQt5fqZRGo uGaCjS7J5L6zdemqo0ODJyYryZLNnIM+JARPoUiilGATORPp7uR4CtZTiiyK2xcrMXno UwtRnaA4c4bWY4tpzRWevcq8kOFpWwfVlqqbHsM85Wk1TIFa8HiUPNiOJHaKsE16PnNE Ycew== X-Gm-Message-State: AFqh2kqmav9Zd7F3/WZwYVA6FEp7otmU096QcT+Q5/ivpGB5toZidlRl TbLaEV88BW9I43rdkqbCGXBwmpoi1hiBP9Q= X-Google-Smtp-Source: AMrXdXu1UOgFHyAN6NsQ+1XaAW4P5yWDQtrcqIFXvJe7O6WezqPpzlP5r7QSr5cq4wj/GeiMHPgpVcqbt1X8myM= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a0d:c901:0:b0:349:a017:8dcc with SMTP id l1-20020a0dc901000000b00349a0178dccmr858068ywd.258.1671477548552; Mon, 19 Dec 2022 11:19:08 -0800 (PST) Date: Mon, 19 Dec 2022 13:18:55 -0600 In-Reply-To: <20221219191855.2010466-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221216221703.294683-1-allenwebb@google.com> <20221219191855.2010466-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219191855.2010466-10-allenwebb@google.com> Subject: [PATCH v8 9/9] build: Add modules.builtin.alias From: Allen Webb To: "linux-modules@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: Luis Chamberlain , Greg Kroah-Hartman , "Rafael J. Wysocki" , Allen Webb Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Generate modules.builtin.alias using modpost and install it with the modules. Signed-off-by: Allen Webb --- .gitignore | 1 + Makefile | 1 + scripts/Makefile.modpost | 17 ++++++++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 47229f98b327b..40a90bca89641 100644 --- a/.gitignore +++ b/.gitignore @@ -67,6 +67,7 @@ modules.order /System.map /Module.markers /modules.builtin +/modules.builtin.alias /modules.builtin.modinfo /modules.nsdeps =20 diff --git a/Makefile b/Makefile index 78525ebea8762..572f364f40538 100644 --- a/Makefile +++ b/Makefile @@ -1558,6 +1558,7 @@ __modinst_pre: fi @sed 's:^:kernel/:' modules.order > $(MODLIB)/modules.order @cp -f modules.builtin $(MODLIB)/ + @cp -f modules.builtin.alias $(MODLIB)/ @cp -f $(objtree)/modules.builtin.modinfo $(MODLIB)/ =20 endif # CONFIG_MODULES diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index e41dee64d429c..94c1d66c7769a 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -15,6 +15,7 @@ # 2) modpost is then used to # 3) create one .mod.c file per module # 4) create one Module.symvers file with CRC for all exported symbols +# 5) create modules.builtin.alias the aliases for built-in modules =20 # Step 3 is used to place certain information in the module's ELF # section, including information such as: @@ -51,6 +52,21 @@ ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),) modpost-args +=3D -n endif =20 +vmlinux.o-if-present :=3D $(wildcard vmlinux.o) +ifneq ($(vmlinux.o-if-present),) +output-builtin.alias :=3D modules.builtin.alias +modpost-args +=3D -b .modules.builtin.alias.in +.modules.builtin.alias.in: $(output-symdump) + @# Building $(output-symdump) generates .modules.builtin.alias.in as a + @# side effect. + @[ -e $@ ] || $(MODPOST) -b .modules.builtin.alias.in $(vmlinux.o-if-pres= ent) + +$(output-builtin.alias): .modules.builtin.alias.in + sort -o $@ $^ + +__modpost: $(output-builtin.alias) +endif + ifeq ($(KBUILD_EXTMOD),) =20 # Generate the list of in-tree objects in vmlinux @@ -78,7 +94,6 @@ targets +=3D .vmlinux.objs .vmlinux.objs: vmlinux.a $(KBUILD_VMLINUX_LIBS) FORCE $(call if_changed,vmlinux_objs) =20 -vmlinux.o-if-present :=3D $(wildcard vmlinux.o) output-symdump :=3D vmlinux.symvers =20 ifdef KBUILD_MODULES --=20 2.37.3