From patchwork Mon Dec 19 20:46:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Webb X-Patchwork-Id: 34763 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2607384wrn; Mon, 19 Dec 2022 12:47:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXvX127/I1t2ki16B8fZIPRKkNV0iC7ZmCeRTlHC4rhxk07oVX8CsYyqiylzyjdBmZVnUib6 X-Received: by 2002:a17:902:ef8b:b0:191:271f:4789 with SMTP id iz11-20020a170902ef8b00b00191271f4789mr3927081plb.27.1671482855387; Mon, 19 Dec 2022 12:47:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671482855; cv=none; d=google.com; s=arc-20160816; b=aqCCqxMXQj2u1msP3hS3OVqU9jrlWwoZSYXVjnfA+dwygYm2RwvX5hC7vWwU0Kv+ZE v+4Mi9Fa87GyQID9f6ektq8XMNGkJw4mWoFaaDXJiqDrtS3DaQKY25FhD9iUJUdnpu5b v0o/jSo+9VGVC5YzsaWuGn9y2DXRj0XKB9l+Ro9rCfE4vKZPv3GyGIiC/3ZXJK52NxsF Xi/mRJvBvPYuEa+thIs7/ETBWimGfAoVdbn2flbBfQfuKc7bJ/eo/20KgA5MSU5u55Yw ByrDUzaaoTgOHSMTqlQKDISOr0lS9BkLFvU1kO08UGBgp3/QILKrxrvqrArjhQNzUASu wnEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=w/Gqg4YrMLjJiJaPudpqPxo3JMr/czsipkBHlpgnkpY=; b=cwnEobKPYky7TFTDNdt6ElSs0/DZg81kMrkD7bQWV3EToSsAbwa2cFLWyiizQIJRGH 4QDAtxt05gWeQK0hkXbgJsKEsrJzhzE7VucDuZZZ5y4BUtfm7cN+J7DiOGzYjcHvzR+i eS4W9c044iQje/g0FqrJM9DGHWAYFWs09MYA5LhFGqH0aieGzOIdkDV/+40a9VWd5srs jjnfDTTCADHs6CzV1WEHi9YUGaqKyhqPDL1+fcwRR3BK6mpSyBBMkXdfYVviUHoiMJI/ CyTsCl+1daw2QLBgJ7TzPhpp9f0vM+lubu/d2xj1OkMYXExYVYHOP0t+z4x8Un4UNsTX UdYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ndN2I2ji; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 200-20020a6300d1000000b0048d1729453csi1430430pga.225.2022.12.19.12.47.21; Mon, 19 Dec 2022 12:47:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ndN2I2ji; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232682AbiLSUqa (ORCPT + 99 others); Mon, 19 Dec 2022 15:46:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232399AbiLSUqY (ORCPT ); Mon, 19 Dec 2022 15:46:24 -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 936A012630 for ; Mon, 19 Dec 2022 12:46:23 -0800 (PST) Received: by mail-yb1-xb49.google.com with SMTP id h66-20020a252145000000b0071a7340eea9so11934959ybh.6 for ; Mon, 19 Dec 2022 12:46:23 -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=w/Gqg4YrMLjJiJaPudpqPxo3JMr/czsipkBHlpgnkpY=; b=ndN2I2jiGwpc8MXc/JM2wIcpg63LQ0N88uByf+lCP7EUUvNLgJ7/Aoy4qQFqYVpl0g SCKRXpZZOA0x3OsI8dVGtGuyvH0Zd6V45Fby6zPRuUq0lvbWZxJ+vlgXN6JzavmUfDAX 1K7hMGMGnTMtZQ3v0pHazPH92wtCC81d53Snj/7oFlXwF0FJMY+n73/d776Hd3wIYK7s oXGmgH5QGBo0XfmYb4MElR763fEXMT3a+Z9EIa5gqIF108x2T43KfAiKVcurToqJiLPy 4aLVTykL4Ud6W5RiukK3/hNmLb1DpIN/QWWHXsAtuErZQr+vfJ6ry8z2SvgYviEgCwO3 P19A== 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=w/Gqg4YrMLjJiJaPudpqPxo3JMr/czsipkBHlpgnkpY=; b=FlY40AXQtl3zN7OVNgWC4YizIyVozdp0Ys1Zzw6hnSDRYHstwN4cAK7rI4QuKx3mXD I2rULw949hy4g8g9PYbS+TOHZYu1lo8WjB23H4ps94ZyqlU3qoHuwXsvhJx6OpIThJko 2WDICdfhAoYil/YKisxhyUyg0sTcFUGjvaBQiBg4s16ifVi9tmkHXrpJogxx6TNZlX1k /CMlOIEv0m8v11BkT+upZ6kvqcqBUPdEFt0BXy2h3ycUQG7FAQiRnYAM/oIjIJDc537J iZXROTKEJaQeTafjxDPdywGInOq2VsSlk1uyjQ8cB+idWcG+QEz+WQ+T6Sj2gj3X8eXm A9XA== X-Gm-Message-State: AFqh2kpkti/FopBBncXjyUasG1No74Nf9+Kx7U/fzZOOc21L4hdOwBkw FLNurK9MSriOk9dX9jSR0M5Yvu0OUHMc/vI= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a81:6dd0:0:b0:3e7:c742:f827 with SMTP id i199-20020a816dd0000000b003e7c742f827mr617806ywc.91.1671482782916; Mon, 19 Dec 2022 12:46:22 -0800 (PST) Date: Mon, 19 Dec 2022 14:46:09 -0600 In-Reply-To: <20221219204619.2205248-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221219191855.2010466-1-allenwebb@google.com> <20221219204619.2205248-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219204619.2205248-2-allenwebb@google.com> Subject: [PATCH v9 01/10] 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 , stable@vger.kernel.org, kernel test robot X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752671288541274539?= X-GMAIL-MSGID: =?utf-8?q?1752676806553527173?= A one character difference in the name supplied to MODULE_DEVICE_TABLE breaks a future patch set, so fix the typo. Cc: stable@vger.kernel.org Fixes: 556f5cf9568a ("soc: imx: add i.MX8MP HSIO blk-ctrl") 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 0e3b6ba22f94..344a0a71df14 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_match[] = { /* Sentinel */ } }; -MODULE_DEVICE_TABLE(of, imx8m_blk_ctrl_of_match); +MODULE_DEVICE_TABLE(of, imx8mp_blk_ctrl_of_match); static struct platform_driver imx8mp_blk_ctrl_driver = { .probe = imx8mp_blk_ctrl_probe, From patchwork Mon Dec 19 20:46:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Webb X-Patchwork-Id: 34764 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2607391wrn; Mon, 19 Dec 2022 12:47:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf7in7UVjr3PAG7w/2YPEiu2vuTjhqSLMwEcUsH76rmDc5Ghemt9ktD++0QIuiA6h/fyCLeC X-Received: by 2002:a05:6a20:9296:b0:a7:882e:3a2f with SMTP id q22-20020a056a20929600b000a7882e3a2fmr39832262pzg.28.1671482856965; Mon, 19 Dec 2022 12:47:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671482856; cv=none; d=google.com; s=arc-20160816; b=AUBmTx9KAkZ1HZD7iG4+YJU9a7k69RvpEFcLr2lCAHehpirEJkyhp9eSHrJMva1Loq MvyCnB6STdD939lIraBfw0euiU6AgNRyPF42lmjxEC/y8d8yK2H96Ir1bLxTPT+punUN vWBx9JtT1eXSA3dwEns3n3RFKhrmXo3o06wfDwlgJiafMn99v7azvGtMn3ePteMEExoQ 3ywljtI6ISJzsScgWeus2qBaANqG9m+9B+S6FEuBr2aiAKoOS4AKkDInMkr+Fs7tGBsf B15PGezxHp4t/mNRl8Yr1DqqmxD01k2ImQUThR95xezstjR9qLdsgauD508K6gpDodK2 zRgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=6S5anngOGqBeJ8dWJgoyIXF8JBImIfN2OM+kqAQMiJE=; b=IfMruLVxCviA0caUHPzj1ZzhQCBz0VljKKNGwy8hwpzm3LEMz1D5ip/HIqT525Kogs lh51154XqREmPCIPaCL4w5QNMo22DzJAcJvKNsakof+SevpZHFoAy23bDlc6uFB3IBHm JwrgvjXUCV8mbvQXkL2CIGPRfYsksPP1zxHy5UQZookYWux1wW70i1+xlIgBsZkmRafU Ih3rSKYnWWSfcK5c1pzJjFhayOHITIug1YlMcdk5qUnOswv/FlVh8J3Lvj8K6Pw38m3l 3NzzlsQscadq0EZIGy4f2AG7pcFXwfwRlOLJlukRhftrwiOYfLda2Dln6NEchhXR5sGw qkCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=gnQMVJ3x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i7-20020a17090332c700b0018922404e22si12944203plr.474.2022.12.19.12.47.23; Mon, 19 Dec 2022 12:47:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=gnQMVJ3x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232444AbiLSUqe (ORCPT + 99 others); Mon, 19 Dec 2022 15:46:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232543AbiLSUqZ (ORCPT ); Mon, 19 Dec 2022 15:46:25 -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 9654512759 for ; Mon, 19 Dec 2022 12:46:24 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id 195-20020a2505cc000000b0071163981d18so12070515ybf.13 for ; Mon, 19 Dec 2022 12:46:24 -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=6S5anngOGqBeJ8dWJgoyIXF8JBImIfN2OM+kqAQMiJE=; b=gnQMVJ3xF+K9w4Ke8/SF9LQfX63JngjuAaaKEfwICm0afC0ubsmlLvX2d+aJYYPPut xwDVxhQ+UVNR6WozYsWHk2OzoMgMuRCsS7/M2n8kC3agf1OnnvKkjN3Vajtk5OGqxQFA 7xXkYzcDyqKcOR4oR0UgA1nDOo/Cmx29kWXiVsRI8HQqaTtfntgrPzQGh9MJJepxkBbX bU/wUvhMA1u9zzQq9V+8A6YAURGA388ei9l+gpGY8fr57zm3z7k2LLw5klooWKkMe/iT G7qCAr3jLShHNmsds2xY+/62uvMpDO/xyAprxT1lJZ4oAusILamm3Cvn4cN/R3SAIwlB PvYA== 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=6S5anngOGqBeJ8dWJgoyIXF8JBImIfN2OM+kqAQMiJE=; b=YkKEV+0Br+2+g2QqfOF7DRvM8chwUtiqzIqXdntXOCjLU+EohDx3ZA1CS0qqsXTHCc dUs21H71JMJrSx2xxA+eWOe/JAMKpED3ZseO33KKlXpayYN2JBD+chp0b4BRpHgflxEH jF46sQwNZtj/5mLg1f9blBK7bQLfj+9zH4Zb7s88z+6SOPstI7cEGLchdZo5NsWbIq6u 6n+A4QC1ds+t++dToG7rvRQLDzXG9eyk03z09W2/+oP0a+Bh0PsPEsYrfcT36ftNsOLv dbwprabtDR76M6GYUXUtWNkv+evFj0oaNdP519nLxnlnNpi7iST3OYNV9K2wEJqUAIaD GW5A== X-Gm-Message-State: ANoB5pm28P4aCBCQFQz3Kklpi3xnZpaNyXiVg1z4IhfhrAl50wgEASyw HCqSvtxwcTtwi3QzMdtWIHB2ZxRJt2FtvXY= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a25:e807:0:b0:6f8:a76c:7a23 with SMTP id k7-20020a25e807000000b006f8a76c7a23mr45891538ybd.513.1671482783822; Mon, 19 Dec 2022 12:46:23 -0800 (PST) Date: Mon, 19 Dec 2022 14:46:10 -0600 In-Reply-To: <20221219204619.2205248-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221219191855.2010466-1-allenwebb@google.com> <20221219204619.2205248-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219204619.2205248-3-allenwebb@google.com> Subject: [PATCH v9 02/10] 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 , stable@vger.kernel.org, kernel test robot X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752671412160708845?= X-GMAIL-MSGID: =?utf-8?q?1752676807982861594?= A one character difference in the name supplied to MODULE_DEVICE_TABLE breaks a future patch set, so fix the typo. Cc: stable@vger.kernel.org Fixes: f70ed3b5dc8b ("mailbox: rockchip: Add Rockchip mailbox driver") Reported-by: kernel test robot Signed-off-by: Allen Webb 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 979acc810f30..ca50f7f176f6 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[] = { { .compatible = "rockchip,rk3368-mailbox", .data = &rk3368_drv_data}, { }, }; -MODULE_DEVICE_TABLE(of, rockchp_mbox_of_match); +MODULE_DEVICE_TABLE(of, rockchip_mbox_of_match); static int rockchip_mbox_probe(struct platform_device *pdev) { From patchwork Mon Dec 19 20:46:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Webb X-Patchwork-Id: 34765 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2607411wrn; Mon, 19 Dec 2022 12:47:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXu3zxOr6XfBvnGuF7Nvrpn5c2HZKU2AXHsqPKI19AYir9FC3denGFiabJxCz6f6qdcxmBhD X-Received: by 2002:a05:6a20:b829:b0:ae:7f1d:1912 with SMTP id fi41-20020a056a20b82900b000ae7f1d1912mr10215071pzb.38.1671482859582; Mon, 19 Dec 2022 12:47:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671482859; cv=none; d=google.com; s=arc-20160816; b=GnBsjREebnWAkKup+k60ZvsxC9My22lwIhH+XkMXG75fNHpXZE5Y/6wRnSRBRmlPtX JW4dIXLswbLV3C2skazWV+BlwI+kXtEnX0N/mUybO4toj6JYnawqu47a4DK3Lr5iSpUG K17Iq7itWRPYFVgni/NB4TRVTjJ6akCBqZo1QyMMSULNlxpmlATSDPoyDgGR0mIfJkOZ 0xrQXjjE0x1zSMUAeUD82AlObhjoEVFGbjpU6qWa6lRmh0uTkYCqhye86Sw5IfNP9mn8 sxIVqYuPoN/rhh7PbgM3BuX43k48TGZJSD73Jwzzgp+De5F1pPsdYr22hpEUlIMeknnV N1HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=UfA/1MB8RCHraPM1ZZUmCBSUNYuUoVh3fP3DF148QbI=; b=gw7rrKfUYylGdDKCXmf47rbeUZGtW6CI9htD0eAJy558FtPeVrVDiA2Tet8eoGPShs AwK/J0XCty662KiFriELeXqjlEs/MAxY+ARTiPOs28+nuAJ0/h/pyMEAj0gIpmG3XWRw cKmf65RyOUOqEl44+QdLZ02g+dZ71S/+AO1JR4R/9vZoYrMsLJ8YGgD6oKAoyARTjPMN AoJRG12BMhH7OI+tBYxPWTmjaih3NU2q56nTKjrOx/invoBkUH7OA0ZRdhGIot8XR+vQ seInaULm9b+yIbqVozqR5KkWbVp2D77QXyBw7Wzze8dQVT0qkqcI6L6LaQ/kEdDsr/Qj LveQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=QMFV2eSA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j69-20020a638048000000b004789f4ef89fsi11049318pgd.875.2022.12.19.12.47.26; Mon, 19 Dec 2022 12:47:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=QMFV2eSA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231942AbiLSUqk (ORCPT + 99 others); Mon, 19 Dec 2022 15:46:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229977AbiLSUq0 (ORCPT ); Mon, 19 Dec 2022 15:46:26 -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 8D54A1262B for ; Mon, 19 Dec 2022 12:46:25 -0800 (PST) Received: by mail-io1-xd4a.google.com with SMTP id f23-20020a5d8157000000b006dfb209094fso4607860ioo.18 for ; Mon, 19 Dec 2022 12:46:25 -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=UfA/1MB8RCHraPM1ZZUmCBSUNYuUoVh3fP3DF148QbI=; b=QMFV2eSAxUPCmTJI+06ooZ3vGoXfoKx9XX7IFkpYAWPmeSDxtIfwAsBfcWJN3ni5CY 25IOWkIGivPYJA0uHFNBUp35c/G0iYTakt4DY1MuCHflFGzugguEePHY+Vu2CKxLAjFp J3ZmBGY6/+5Z4rEPgWVdX1UEwAkvBCZ1G1zuAQu0z+SJiGnK7fTmMyLdgdDm8wi6UGne Cdh4YEx0jvHcPTK9u4UIUZmhQzMFoZSwy+SG4IkGOKvNoNrQRrj3FbfeQD7SyJJujU/M T9HJPmiiYpy3SNigeHCTqpnQ6orCvOXBTd8k+sG4aeEYDIpL5//nDkDulHNYEviaf3FE AUYg== 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=UfA/1MB8RCHraPM1ZZUmCBSUNYuUoVh3fP3DF148QbI=; b=1IqMLqxLJw1pbuEbGPWOqUerWYNzYHMsk8VqW+hUpXKnGNi76qVTaOsHR90i0fmWPI /xxA24mxMKH5VxoE5oHlgb9/xnBZllC9aVFh1c0ZY1/+VjdwjovZOve3TD9uvwKynbdh 38xsGnW5q7Z8lMGhhEWbT4qLReTVeTQwA+rAQH/enJbzB9qyaiBDQem/4y5QjnjXx0wP xa84c8MdUfG+5oELgK3dbZE1GsMO3P3s7+G/uuVxxC/Vg6y0Iubp1yOh7XGUqRUzKyiJ Wvw8FlzY0EhpAwqCdL+wuNkXsVCPU141URVxHKap52yC5kNG30CndPq3sU7v7TY1mFAk jGgQ== X-Gm-Message-State: ANoB5pnhf/OJR9yeJ1ufhruVz5xsw8edRefqDf8Ewda2dmGpShM96aBf FsnKiPABUNVt5iS2ERjkFwyBtSaF7YUfA/4= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a6b:e719:0:b0:6e0:38cf:f538 with SMTP id b25-20020a6be719000000b006e038cff538mr6718031ioh.108.1671482784948; Mon, 19 Dec 2022 12:46:24 -0800 (PST) Date: Mon, 19 Dec 2022 14:46:11 -0600 In-Reply-To: <20221219204619.2205248-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221219191855.2010466-1-allenwebb@google.com> <20221219204619.2205248-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219204619.2205248-4-allenwebb@google.com> Subject: [PATCH v9 03/10] 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 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752671286495579543?= X-GMAIL-MSGID: =?utf-8?q?1752676811147150836?= 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 f2abffce2659..0c60867c9e7c 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c @@ -3715,7 +3715,6 @@ static void __exit blogic_exit(void) __setup("BusLogic=", blogic_setup); -#ifdef MODULE /*static struct pci_device_id blogic_pci_tbl[] = { { 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[] = { {PCI_DEVICE(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT)}, {0, }, }; -#endif MODULE_DEVICE_TABLE(pci, blogic_pci_tbl); module_init(blogic_init); From patchwork Mon Dec 19 20:46:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Webb X-Patchwork-Id: 34766 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2607464wrn; Mon, 19 Dec 2022 12:47:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXsvxO6OLFkXBiXKZem4rmG8N9myvlSQJDxczk9ufj8mO3gxW/5kwTBCBs8qQJOlg7iyAkn6 X-Received: by 2002:a05:6a00:813:b0:577:9182:19a7 with SMTP id m19-20020a056a00081300b00577918219a7mr14637656pfk.29.1671482866078; Mon, 19 Dec 2022 12:47:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671482866; cv=none; d=google.com; s=arc-20160816; b=S6MUR+ROoOAnymTsvAstud0ZaN2z2ReCVB8twJne0BRLTCiyAionTV1uuCMHVwHnV8 H+QuQspGO5N22IPKvntxMO+rHFP1bN4RIxZ698igCTAIWwQNxPr6efbTWI5vea4Pg0Pt +rfGDtZSz21PQJkAdeLejX+MLrXqere8TtpRJU7kC7ufz4My5WexqTODAeWQOgyvfSz4 bAwka0MvQdwMxPF+GVAV7c5HnzdbYnNG+QRLDEzYucIB2eVVmRjODIEsdzTlDhxn7S5U rKKepOJ5tx6cBXyYTXR4j7aIP90k5tywkfU3mDFAoli+sVvfzGuK85VgMH7U9ctDYxI+ ul9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=S7UrSOUGP+a8SdpdysICkGiHV2UeH0pTpanyW1FANts=; b=pb8TYikBvmFXP0dQPGYqweca2aCuJ1wY1u3jChFIWDNPnLqTCrunTUzCJJNHCVni5g w01Ws2dz55/QuHdxd2QbHHnrTWGgT44ftiFrwNhkBLg2jfIrCAC23/ZZmeVPFdgP79wt MpCQt/Z5syfqddRGlE8rMuXr88qhlq/FtB/XsfeF/UzwDPEE/69V87ZuohB8AYsKIKbH +7GOp/UnIX4I3P5YQxpGMhfIcczUhYCapLJogZDTnwZwJJUYSHloNUgxrv01RukefhA0 7T6zINO5duvoBmeNhlfyAJ6+9/gs+hv87LF79KH0l0wclzqvHcpb2+299XnFjChGkD4Q srrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=awanE9lk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z10-20020a056a00240a00b0056282b4a984si11676781pfh.126.2022.12.19.12.47.32; Mon, 19 Dec 2022 12:47:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=awanE9lk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232672AbiLSUqn (ORCPT + 99 others); Mon, 19 Dec 2022 15:46:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231391AbiLSUq1 (ORCPT ); Mon, 19 Dec 2022 15:46:27 -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 D90FE12771 for ; Mon, 19 Dec 2022 12:46:26 -0800 (PST) Received: by mail-il1-x149.google.com with SMTP id a11-20020a92c54b000000b003034a80704fso7239574ilj.1 for ; Mon, 19 Dec 2022 12:46:26 -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=S7UrSOUGP+a8SdpdysICkGiHV2UeH0pTpanyW1FANts=; b=awanE9lkV2lS1NwSLmOwByOYf9g/kmku46qRrN0Qko+KTOC8NCLFn939E5b1YSq9iE e8I9HjrFjaRH0YufjNA1YtUq9cELaJ/9oNQKRTURdsAHf0fZon3vCt85dCE7CkNfgrjC GXtBmi0BQRPJPJkYcQi54sqSOrS4J5dF1RyBWcpQyas9hZUtYOs4UVkV/JtfbIWA2egd cvWbTIKloG9IS/l1R1KDWneqFiiJf4OOK/QnHPK1LYTUrkxwjGNgcqRHPCMesXO+htkB kQtPISQPX62cnn3pPqXepP2ZWMru0HvYxM01YPdFLwKrtpmjVBJsOC3Ox96baIQSNggn BdlA== 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=S7UrSOUGP+a8SdpdysICkGiHV2UeH0pTpanyW1FANts=; b=jE5IfklSicFDGXFG8jDcb9bREbZW050107IqDPIC7aGYvBhGDa0LsxH0hc1H8XWfty q/bDCG61+8IyXepEkz2vV6wXFhFaB2qnBcSb7pvgXnhoEVYATd9WmH4hgVqvz93TCzXE TQfh4ausatsbUU1EK51R1rOb0NCLLQ46/WpRXupdgg76lJkNXjacrH2MdXrrfMf9KhLH zAJYz2RG2wNhVnmlrkUWjh5g3BywAy5W7p3UIVF3qtNM73Bt1XfGIJ5ksGcSd4c3B5CG sB1lAf9XNJH+c641T4Q6rx+Fv1MU034PQnHjZqWS3jx6OOhMP+JFzOooWCQ/IzaoB7em FDbw== X-Gm-Message-State: AFqh2kotDmfoI8QpY5SwIUCXgol/hcNgUfWhGc7MYIvr2tQFJhRZJW6p w6iSd2I89YMUc4bKxQeBSBwJwdLzXximIbQ= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a05:6e02:ec7:b0:30b:b665:fdc4 with SMTP id i7-20020a056e020ec700b0030bb665fdc4mr529287ilk.27.1671482786264; Mon, 19 Dec 2022 12:46:26 -0800 (PST) Date: Mon, 19 Dec 2022 14:46:12 -0600 In-Reply-To: <20221219204619.2205248-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221219191855.2010466-1-allenwebb@google.com> <20221219204619.2205248-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219204619.2205248-5-allenwebb@google.com> Subject: [PATCH v9 04/10] 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 , stable@vger.kernel.org, kernel test robot X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752671299820558509?= X-GMAIL-MSGID: =?utf-8?q?1752676817755173278?= A small difference in the name supplied to MODULE_DEVICE_TABLE breaks a future patch set, so fix the typo. Cc: stable@vger.kernel.org Fixes: e789995d5c61 ("mfd: Add support for STMPE SPI interface") 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 ad8055a0e286..6791a5368977 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[] = { { "stmpe2403", STMPE2403 }, { } }; -MODULE_DEVICE_TABLE(spi, stmpe_id); +MODULE_DEVICE_TABLE(spi, stmpe_spi_id); static struct spi_driver stmpe_spi_driver = { .driver = { From patchwork Mon Dec 19 20:46:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Webb X-Patchwork-Id: 34767 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2607469wrn; Mon, 19 Dec 2022 12:47:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf5+sgInUPN+WfSunSDduIsRdnHV08HVu8/DzQakq+SApR5m5A6uuMbc5za9owwpcj8EAsWI X-Received: by 2002:a05:6a20:12d6:b0:a7:8ce5:6fc6 with SMTP id v22-20020a056a2012d600b000a78ce56fc6mr63315573pzg.13.1671482866570; Mon, 19 Dec 2022 12:47:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671482866; cv=none; d=google.com; s=arc-20160816; b=v2NBer0QHZ37iglshSoQoCgfGB/5pgKl9dan2tO03dnE/vwquExYZPLZE9beXCcHwa LK4/H+7SzwzUXKiu5vbtTH+ZYJ3JKXispEKdbGV5hdg7FBoSFSriWvuebAjGBGhGTcsy WUC/WJT3DG9Q9uMXJ4ve79erzuLLlw1+p7Nr1Wpjbl1bX7RZ4Ovh5Nt84ZONjjwGOQq3 pE19/DrcSgx06DIWaEtMirRKQGYnLg4SgQ4ScuHMHDunMmg2JDh75GGX9KWM+9oaAs+o 8yDZqwRil0Pd6DrzS5jshFodaIJIAj5Df6M8AWHP0nX7EPf0EII4PQ+eWc7PuJFaLY/c LK4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=8H+688P7vbFiGJ1BQ5c1Gn7u2rmje2kOlAqfxbXizp0=; b=mpsdKSSVhfCLh2pJKV+nTPJPalzuN53eWa0qYoQuurfsZe+dXwpYHuE232iHXtLaBj mwG6ySt2RIzcVs7b6u7mT84l6z8hMVyQ0xcMsblwv5pXWriVKtUk4ID656Y7hsGMklED vS7BgO9Jb5oOxtjaxOGhD3DYCj0fprjd+zSMcNgC1xTvg/zGuMzKtA91jv8RUBUWdZnV pmX+YXJOINhKNuU+rWXS+LfiC4UKwdey03tsT6K4ffUM/RJIfPGQqeSqVbCW55imY6mP tfa4G02CrkSw8wpKErXlNyfo4xlkRO/PjznubjSmZoFLM4qTUjx1vHigniIR1aMAaJ0r Bj9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=hlLpYyCA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f19-20020a631013000000b0046fc9e82c99si12249361pgl.206.2022.12.19.12.47.32; Mon, 19 Dec 2022 12:47:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=hlLpYyCA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232725AbiLSUqr (ORCPT + 99 others); Mon, 19 Dec 2022 15:46:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232656AbiLSUq2 (ORCPT ); Mon, 19 Dec 2022 15:46:28 -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 E874E12A82 for ; Mon, 19 Dec 2022 12:46:27 -0800 (PST) Received: by mail-il1-x14a.google.com with SMTP id a10-20020a056e02180a00b0030bc09c6b94so900011ilv.6 for ; Mon, 19 Dec 2022 12:46:27 -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=8H+688P7vbFiGJ1BQ5c1Gn7u2rmje2kOlAqfxbXizp0=; b=hlLpYyCAQfl+MIvWNIXiPjtfE2Ac9W/jMEeedSCc9xOWKwW8B4pnGdF4IrFSo4ZBbv E0gMdAmwR7I2MkjyCMWTmbVPWclTfr6tnZ8k8i2JtR5E6sFpnzv4ALxFqm/Yg//ALMBj VA2NhNpbG+MNilIgP8azk/Y+U+Eg39zrLR35qwyKASquB12Lzlmt1kYibif8x3X8XD09 Cx0sWfwFTnuv15KXRd6ZlkspXo67DUuXIIrosUuK6Qq0MvNccg12PFiaAQ8yk7eYipN3 NHcCXdo5BCJM7j/CPt0n37dnA8/jrNrV+D0ULQjUKpNQGwqpb+kmo0RyJWJvqhA3Qrmb v8hQ== 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=8H+688P7vbFiGJ1BQ5c1Gn7u2rmje2kOlAqfxbXizp0=; b=8FYL9wohK9JWx65ityPMUYIyNrTla9iSCm7ehJaWZyBdgksES8kZEZzal3RgaSrgY1 f46xORSH/t//BC3jZNNiAXLlCOH7gccZ0U1yAPRvpBWX6n9ctkPPjtJueQu+X2PbiOHq Ssvy0A8Ohx5bAQfHWMndpUnfKEm38/oPipEVLx+O2UC+d7ftGCk3LkxUYmHrHDS6gdsM fkAqt1d5dLcMpWlM+TvKsJiZgXlO82lBhNOMXp7Ifv3Th9ri2Qy/H5ElaSyNckehcGhg tXLNJ4fHz2VsP0S+Wo0kTUjdo6yduEFeKi5xOSkAaXp2HTxz3jsa7R2IV06oB+Dbkoen aQqg== X-Gm-Message-State: ANoB5pmlFz3Cq2OV2YkN9nHJtVacwHtqSiwcgqjaYC07+imWbqMpbPn7 10l5yrtM+/YDGBSHWLFK5au1zlRgInDHU/w= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a6b:db1a:0:b0:6e2:f383:f68d with SMTP id t26-20020a6bdb1a000000b006e2f383f68dmr2494390ioc.75.1671482787431; Mon, 19 Dec 2022 12:46:27 -0800 (PST) Date: Mon, 19 Dec 2022 14:46:13 -0600 In-Reply-To: <20221219204619.2205248-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221219191855.2010466-1-allenwebb@google.com> <20221219204619.2205248-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219204619.2205248-6-allenwebb@google.com> Subject: [PATCH v9 05/10] 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 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752410910230946689?= X-GMAIL-MSGID: =?utf-8?q?1752676818395313541?= 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 ec61fb53979a..3d1b04ca6350 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 generate + * modalias entries for each match id in each device table. They are not used + * 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 /* Version of form [:][-]. From patchwork Mon Dec 19 20:46:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Webb X-Patchwork-Id: 34768 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2607475wrn; Mon, 19 Dec 2022 12:47:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf5GPN0C8CZUEodZgytkYwMRo5pqD6u7e++yCS7nhFAdViw4ZB/RYD4J7C10mvmRfGHpo0Sh X-Received: by 2002:a05:6a20:6f89:b0:a5:418:8341 with SMTP id gv9-20020a056a206f8900b000a504188341mr48853825pzb.28.1671482867029; Mon, 19 Dec 2022 12:47:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671482867; cv=none; d=google.com; s=arc-20160816; b=a5seyQ93C0leaPNqBz3C/Osajk1v5uv4xS4UjbkSgMCAvOc7HioO+ikVNr28dLRLLF V9zp7OOPM5Ds3diUlXZ2tqje+J+znBdzaM1SRmUJv9QwV0BrN7L4qUVJq5L3M7XWD2za wK1R5jcj/iNsl+HVB1WPQPZ+jXCYp17JS+RXeXVJV6X+2GZQjNvtHrbEIVQxSqrKTTAs 6+2+xMt7Fks27kuyPZn2xrU1essGXmJDVUS8VHOIOE91MkbROaprut0J7CheBFVfZyDU aYDuWMtj2a5MWjlK05HMXDI3upVdYyyK/qcDCJsEQdXGX57kbRNULEGXHhaC7Z/f/myF h+tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=VwPD0qy3Fd4MZbZ1UDU3b7vBqkh0mNCuHHOa6+XoRDI=; b=ZfnqMyUVMTlt/ZJVKJ8xvubbiLq6Agvf5kfPi1nzyK9mRUU57HlsvNjLDYb6eraer4 bulKNu8lvl2TUWhERFRR6MBKFXUkVyemeKv5r0IlfHSn/mIvAodaL1pkBaVYoErlyoJT r6XmRZj10MNzdwGaKbT0iDk91chkehQrDIE6e/Cyunnd/Lhd6mGuR8NtBWm4DoUSkKZM D83EXuIYgesNeQX5liZlYZ2u76nTqkdm9US9HZoH1FqApu3Tp98Ai4trmuI+aBAr46kR ffnudlPLIUkSoet7+xLsmQZ1ZRO88nPe+bhW9JyW0YMVDG5no6OLBgKz/Xq0nzgZFsi6 dAQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=IHg6+Gv3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 69-20020a621848000000b00537b1bc9683si11139729pfy.36.2022.12.19.12.47.34; Mon, 19 Dec 2022 12:47:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=IHg6+Gv3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232726AbiLSUqv (ORCPT + 99 others); Mon, 19 Dec 2022 15:46:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232679AbiLSUq3 (ORCPT ); Mon, 19 Dec 2022 15:46:29 -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 132AF120AA for ; Mon, 19 Dec 2022 12:46:29 -0800 (PST) Received: by mail-io1-xd4a.google.com with SMTP id z200-20020a6bc9d1000000b006e003aecf04so4604074iof.16 for ; Mon, 19 Dec 2022 12:46:29 -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=VwPD0qy3Fd4MZbZ1UDU3b7vBqkh0mNCuHHOa6+XoRDI=; b=IHg6+Gv3Z3EE3ZvZcHJip+nkzkOLPOiU2MKzy/1YcYpE9p6Vhub6QpTm6zYdFvxZSr vC1qM6HZkvMXHTT+cMTj7gfPLbh4je7ixHxoyyvg140Jnt7PtuNZa/gzHBIZu0mFGlrO xMuN+neqE0Hi0oHReaRSt8oJJNWwNmPIBWf1bLJMeuxIFi0pmYzk/xNUsE7lxmECL3R7 uBn0n4KfdsfFsPdhxa1nlscMZwymsK5UbWJ/5vVZB3YDCHIC3qw2ZtfA1WPsacIhO3gM 3KHFxJEAvv3sXEyXU3n2vqq+GuOODnT+XhxWvEySHzaDGW8awt2SSKymYf4TE1MWKB0R PTpQ== 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=VwPD0qy3Fd4MZbZ1UDU3b7vBqkh0mNCuHHOa6+XoRDI=; b=SiKboHW93ui/yiOMobezB9JuvspaB+hirHQNGGohXogzYjbzxpeU6VIXB0bZh7kkJo a6vh2z7oeUvTPqnBEJOXTgQqCiPi7FCHSQRhzaNgG/iWgRq/a8fW9zfxqF5KDy1qmGB9 p5MaYXpBHRVhpEyNw/o56tyXBjmC5f/YgLSy6kNhm+uI+gRykNptT+GPh7TQ1KOGyyDg VvWDh4W9Jj/hKa1Goa+mE05Qj96u6w+ObJk5/F6/zMyNU2JWUPbxXeFhoKT7KT4Gt00k 87ju1/VlzEnvtJptNO+tCAdpZ2L1F3iXfV+IgWUJcGa8QvDghH5k1vL7eXvOuvgm6eR5 wwVg== X-Gm-Message-State: AFqh2koYlAdPKh4v4hQwAhdKE0G4orwRYLOOsSrR5xPg4kNEpCiBd8zF bFdOnPb/eX12L5zYsFxE3x9cTotNYfs6qcE= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a6b:90b:0:b0:6ec:6abf:f5eb with SMTP id t11-20020a6b090b000000b006ec6abff5ebmr225969ioi.91.1671482788508; Mon, 19 Dec 2022 12:46:28 -0800 (PST) Date: Mon, 19 Dec 2022 14:46:14 -0600 In-Reply-To: <20221219204619.2205248-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221219191855.2010466-1-allenwebb@google.com> <20221219204619.2205248-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219204619.2205248-7-allenwebb@google.com> Subject: [PATCH v9 06/10] 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 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752410880954012248?= X-GMAIL-MSGID: =?utf-8?q?1752676818585778392?= 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 80d973144fde..e41ff8de7a87 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -28,6 +28,7 @@ typedef Elf64_Addr kernel_ulong_t; #include #endif +#include #include #include @@ -1540,9 +1541,9 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, Elf_Sym *sym, const char *symname) { void *symval; - char *zeros = NULL; - const char *name, *identifier; - unsigned int namelen; + char *zeros = NULL, *modname_str = NULL; + const char *name, *identifier, *modname; + unsigned int namelen, modnamelen; /* We're looking for a section relative symbol */ if (!sym->st_shndx || get_secindex(info, sym) >= info->num_sections) @@ -1552,7 +1553,12 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT) return; - /* 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 = symname + strlen("__mod_"); @@ -1564,8 +1570,30 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, identifier = strstr(name, "__"); if (!identifier) return; + modnamelen = namelen; namelen = identifier - name; + /* + * In the vmlinuz.o case we want to handle __kmod_ so aliases from + * builtin modules are attributed correctly. + */ + modname = strstr(identifier + 2, "__kmod_"); + if (modname) { + modname += strlen("__kmod_"); + modnamelen -= (modname - name) + strlen("_device_table"); + modname_str = malloc(modnamelen + 1); + /* We don't want to continue if the allocation fails. */ + assert(modname_str); + memcpy(modname_str, modname, modnamelen); + modname_str[modnamelen] = '\0'; + } + + if (modname_str) + modname = modname_str; + else + modname = mod->name; + mod->builtin_name = modname; + /* Handle all-NULL symbols allocated into .bss */ if (info->sechdrs[get_secindex(info, sym)].sh_type & SHT_NOBITS) { zeros = calloc(1, sym->st_size); @@ -1597,6 +1625,9 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, } } free(zeros); + mod->builtin_name = NULL; + if (modname_str) + free(modname_str); } /* Now add out buffered information to the generated C source */ diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index 1178f40a73f3..34fe5fc0b02c 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[]; }; From patchwork Mon Dec 19 20:46:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Webb X-Patchwork-Id: 34769 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2607627wrn; Mon, 19 Dec 2022 12:48:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf5cOCGJUq3Qro76C32L5sEQaxaO/JFCj4EvMc3ghmwrv0K9iYEp86m4mLXrmW5DbPP32SVU X-Received: by 2002:a05:6a00:be7:b0:578:16e6:815d with SMTP id x39-20020a056a000be700b0057816e6815dmr40385018pfu.21.1671482891687; Mon, 19 Dec 2022 12:48:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671482891; cv=none; d=google.com; s=arc-20160816; b=WktgSGb1Bns5it+ADtwTd7wHBUrokr+T/2F470wu4MnfWTRQeE1cTm3y5vfG58rWWo CqQt7ZEvjbtGhhzUyrZyVLJ3IxzuMFKeSrbIPXa56ejL4G1X6Ec3asaQYS0vxnjpQ30e zPEspncpzgH6/WPCWfsxONkzldqBGpNbgXGH8ICI+XW+7DFNGA2CxqpbHmZ8Nn+DalhB SAXLNRnV+LYQjsPBaRh5vPJeNGzSf5/XggYg39a1WZ5CCDSQS9ijUW8krbY+L4l7cx4e DeyaFx0KIYQNXr0Ll6Pz4RgmlMSKoOBFS8zN945M/z7bEhkrJhJ3+TKaqZ2/3UWt4b1Z A2kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=RHzej/1PRqREjwzL8yy+/gC2rwJnW9I5Nh9PS4uQu5Q=; b=IJlkY224gMx5hSzpe+9ohzyF+kx9OTdWNcz6HJd4Azj8JfmBipXwHer3JA3NvVfJhH S6bTlvegYdahkiSB21QUFcjkd6kKuuUz9lXC71mv9OW19lOFWPiH8lIauURPdPpSiDPV DL/yLQE/1CTD2ivZazdsQrWMLJgOEN4QF6GqwweuyLUoKdgBAql2elGlwcJuSgdNszWe dcRSFj06tLVrJAvExrLNXa5qyLz7xHQ9PXFjVjAtabHUi8eNKhKZANUwWdqyhahED5O3 9/urEMBYQWHDu3fOFWYotk25IzS1dxzpQ4BjOH2FJZWcMf6uYTla6ynw9OVDs3Hq8Jds MHLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=qF7j3UMv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d21-20020a056a00199500b0056cd91516b6si847820pfl.325.2022.12.19.12.47.58; Mon, 19 Dec 2022 12:48:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=qF7j3UMv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232747AbiLSUrP (ORCPT + 99 others); Mon, 19 Dec 2022 15:47:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231726AbiLSUqk (ORCPT ); Mon, 19 Dec 2022 15:46:40 -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 0B2C21276F for ; Mon, 19 Dec 2022 12:46:30 -0800 (PST) Received: by mail-il1-x14a.google.com with SMTP id j3-20020a056e02154300b00304bc968ef1so7171962ilu.4 for ; Mon, 19 Dec 2022 12:46:30 -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=RHzej/1PRqREjwzL8yy+/gC2rwJnW9I5Nh9PS4uQu5Q=; b=qF7j3UMvzJCUsQLLBjLgzSlmOXfqeEaNvw3PLXzeRWDcyY3bD8OOA38EQdGqqCZrSa iZncq8o51eeujFRZtBj6GVXss1cKEXggq6R/z5mdQ5oGh7e4OTlkwSEut6Vgt5ailuuP Ed8N28NG0EMmlAF45ESity6Pkkw741SVRjm2mDeGj1255GePszv1dQ+FkisGc7bA9Zi+ PxalhtbeDVQuKtLNXx40YFKl4kZTz7hZ9GB7/D2GRe8u5St+PZ3YIZZ29RK+RgepiQRB Zd9kHw0ZtKBVgwDl7AT/HspdSRo1e7RQggsVmuqHRJipm5Guv5SA6HoxE4OVIO2cVfY1 Ztbg== 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=RHzej/1PRqREjwzL8yy+/gC2rwJnW9I5Nh9PS4uQu5Q=; b=yZEXx5zI4tw+CwOWp2hwvZGdXjdlLSPwwj89Jk3D6TwsHcKQGGqKwDKHGsaWPJLXo7 cW9WVrT0sj14BpaOPqPcb1uezKdpeaeuA2BWrFzHLar2pE4tm6IOCEOWAueQ02b84Oxh mihp/AWNfSQm8IH2hEu3YQ2BSSk+U+UrVV0RCbjXy7Kd+t9TTdGbOtzigITw/7izVpry CBiB6Yi0lQ3f5HrWFRGG7kSxyh9ZgDYoMbvSu34QW1xhO5V+PYe/91xNyUVVZ33jj99G 4SBA0CAWS+P0y7HXoLm9e/ZGzyUe0/CjVEp2IAvh13/QtA3MVYtdvdoqh1ezUURjbEVH YXoA== X-Gm-Message-State: ANoB5pnWNml4qZywNi49JXiW7gELyfK6G3ZXxGpOwQkkUqieJSOro+CV adN0lQJQ2Vb8dY18kTNLfDPBRht2pSVqkv4= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a92:cd83:0:b0:300:56a5:ae19 with SMTP id r3-20020a92cd83000000b0030056a5ae19mr43568707ilb.72.1671482789512; Mon, 19 Dec 2022 12:46:29 -0800 (PST) Date: Mon, 19 Dec 2022 14:46:15 -0600 In-Reply-To: <20221219204619.2205248-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221219191855.2010466-1-allenwebb@google.com> <20221219204619.2205248-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219204619.2205248-8-allenwebb@google.com> Subject: [PATCH v9 07/10] 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 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752410891894371247?= X-GMAIL-MSGID: =?utf-8?q?1752676844665318572?= 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 2c80da0220c3..e38d6b2ceea4 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); } +/* Write the builtin aliases to the specified file. */ +static void write_builtin(const char *fname) +{ + struct buffer buf = { }; + 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 = { }; @@ -2321,13 +2334,16 @@ int main(int argc, char **argv) { struct module *mod; char *missing_namespace_deps = NULL; - char *dump_write = NULL, *files_source = NULL; + char *builtin_write = NULL, *dump_write = NULL, *files_source = NULL; int opt; LIST_HEAD(dump_lists); struct dump_list *dl, *dl2; - while ((opt = getopt(argc, argv, "ei:mnT:o:awENd:")) != -1) { + while ((opt = getopt(argc, argv, "b:ei:mnT:o:awENd:")) != -1) { switch (opt) { + case 'b': + builtin_write = optarg; + break; case 'e': external_module = true; break; @@ -2390,6 +2406,9 @@ int main(int argc, char **argv) write_mod_c_file(mod); } + if (builtin_write) + write_builtin(builtin_write); + if (missing_namespace_deps) write_namespace_deps_files(missing_namespace_deps); diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index 34fe5fc0b02c..c55a6aeb46bf 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; From patchwork Mon Dec 19 20:46:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Webb X-Patchwork-Id: 34770 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2607700wrn; Mon, 19 Dec 2022 12:48:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf5NqCl1sX9suk20h9MqmXH9y2zzYNHMuFuFT3/3JbTYEaCoLOQMLT3ZvU1qkk8fWxk2FUXt X-Received: by 2002:a17:902:d58a:b0:189:a11e:9995 with SMTP id k10-20020a170902d58a00b00189a11e9995mr45185553plh.13.1671482903822; Mon, 19 Dec 2022 12:48:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671482903; cv=none; d=google.com; s=arc-20160816; b=H60r+OJjnbwz4UVaEtmQE2fA4Itxw6Sbr/gTzeMO1H/mVxWRPbPir+KhNMK19C4Xdp jfRkz+JzrXeGYg8C9G4fXNqxQmvvENx2m4QLk+G4vQg68wJY7QOkl+3RWWMRNBzJGgfj YZmpYPLWjcqzjkulid8HImqFTQPOPXE5fGF37pAsHSu8WeRMwOJ16ZMSAF2vtjgS73/N QhNyq3x1HEFlQG9sSKL7MBbJmSv2qKDR44HgCUQwWrtVH+RL+5OYHeDp/8r7xa+Fp8rX hS6gmINxDG1tcwMJk2wnaJlFodmUzWxa//vxBaY41REwfv/EOhhDVb779QIW3hisiu6i Kh/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=Ict2nAybZst9hd7blb/mqnDuFXGRQOU9mJnqBemEDUs=; b=tc3sgaTDYvzkmrUOqW0xRzlHm0cxbRC0VFUWbIv/3zubs8GPVtxYOsh2Nv0tepuCko K2nUEwFXHm7f8+uszIkrJCn3esdjZekQTf4EFfpfIvP8j/UuKvvdsFENVSOT4733uMTm uyD4rRT1K8LlXtvN3wDVCWZvJK/t3470yrUrt8RZOk/t++dhs39yiDejnFkOspDIwRg9 e8LHicLokt4cYHltDzPO8oq3kUps+dSC+Bkfg6IaBe2hJ/0P4rN9YkmUJaS1V1a8Pgxw +K2/eM8rTbftJWLSG7fyaTBi6Hx+xZrH8WRN30FkprK92n4PIHx3STMy8VJYciT1oP5K 0/ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=s2ZrfNQO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r12-20020a170902e3cc00b00188e9ec511dsi10158043ple.397.2022.12.19.12.48.11; Mon, 19 Dec 2022 12:48:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=s2ZrfNQO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232850AbiLSUrT (ORCPT + 99 others); Mon, 19 Dec 2022 15:47:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232381AbiLSUqk (ORCPT ); Mon, 19 Dec 2022 15:46:40 -0500 Received: from mail-io1-xd49.google.com (mail-io1-xd49.google.com [IPv6:2607:f8b0:4864:20::d49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBF4612D1C for ; Mon, 19 Dec 2022 12:46:30 -0800 (PST) Received: by mail-io1-xd49.google.com with SMTP id e15-20020a056602158f00b006e01d8fa493so4614388iow.3 for ; Mon, 19 Dec 2022 12:46:30 -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=Ict2nAybZst9hd7blb/mqnDuFXGRQOU9mJnqBemEDUs=; b=s2ZrfNQOjBrSWOSByiZCQfYB433BmyIy/j3ly5GPI7q7DQSKjQaGWpR8OpY5yqR4up s/oCDPMg27vjwGrwVakCjp4cMNI3bT10VqVyYGG/KXoVAvy3X5gux1hPs+vi4/BDBB3M KwDWb6Jhedtm3NReW57ZGysB4WVkkexx2NoF17pNoEVKe1gWeqybIlgRLnARmU/966fe bfborkGMEPeQtjsE7fqcXAEvOEBGXFtMu9wq8FhFmfhYwwf529//Ho3A8hM019D3duWx jJCLpW3SvyBXZJdHFHUrepQKdzkQiRs1ZiPGq9+tWAKvGfkZODfY5IapcpB2YfBsy2iC GbYA== 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=Ict2nAybZst9hd7blb/mqnDuFXGRQOU9mJnqBemEDUs=; b=maIH3A+7P16Q1aAC/LQhNS7tJWwmwlAjh64M+AJPGK/OaPNzTi+mCaMpwr8eAksB0U N4v5CVm9PJ+hB6DduRrR6ptY7/MflqCwZ+HZTgZmtfRB0d31byI2o0WXZgLGSKuTAFNJ nZsdNCfN66jb4IghzbU+fKb6QlucUVbFhGb7Mau4lsN6jsYnKIKsyfXKF1Ex8MaK483H r6YZ6QgJVl1rM/baZHecA/8a2F5TRxSxnn+EKhlamRVhvpqtWMDgRd671tly0+ktDtlk kQ0j3eAhZY6iCUBViG6XpRJJAcgp4LhIcuxOIpIUNCw630HIxkmhaR9wTheMOm0l1MMk OwVw== X-Gm-Message-State: ANoB5pkIhbWyr00yPXoll1zJwADwuFXFtyvVHjgBxpsEVGO7MAoC+T0c KfxCZgBKjVpOSUnlKOMXkc4sS0yc4S/g3DM= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a05:6e02:c08:b0:303:4e51:e5b2 with SMTP id d8-20020a056e020c0800b003034e51e5b2mr11864457ile.285.1671482790594; Mon, 19 Dec 2022 12:46:30 -0800 (PST) Date: Mon, 19 Dec 2022 14:46:16 -0600 In-Reply-To: <20221219204619.2205248-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221219191855.2010466-1-allenwebb@google.com> <20221219204619.2205248-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219204619.2205248-9-allenwebb@google.com> Subject: [PATCH v9 08/10] 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 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752410874148235205?= X-GMAIL-MSGID: =?utf-8?q?1752676857119941684?= 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 e41ff8de7a87..e840cb51281a 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); } /* Handles increment/decrement of BCD formatted integers */ @@ -376,9 +378,13 @@ static void do_of_entry_multi(void *symval, struct module *mod) *tmp = '_'; 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); } static void do_of_table(void *symval, unsigned long size, @@ -610,12 +616,18 @@ static void do_pnp_device_entry(void *symval, unsigned long size, 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 (j = 0; j < sizeof(acpi_id); j++) acpi_id[j] = 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); } } @@ -637,6 +649,8 @@ static void do_pnp_card_entries(void *symval, unsigned long size, const char *id = (char *)(*devs)[j].id; int i2, j2; int dup = 0; + char acpi_id[PNP_ID_LEN]; + int k; if (!id[0]) break; @@ -662,19 +676,23 @@ static void do_pnp_card_entries(void *symval, unsigned long size, } /* 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 = 0; k < sizeof(acpi_id); k++) - acpi_id[k] = 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 = 0; k < sizeof(acpi_id); k++) + acpi_id[k] = 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 size, size -= id_size; for (i = 0; i < size; i += 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); } } From patchwork Mon Dec 19 20:46:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Webb X-Patchwork-Id: 34771 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2607797wrn; Mon, 19 Dec 2022 12:48:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf6zDeHyNlxn6A+ibF11kTchOLPz3rf9ozAQiaxTlHLciTyRdCjO5cxvLoUOL9LvSwsICulC X-Received: by 2002:a62:1ad2:0:b0:57a:81f1:9096 with SMTP id a201-20020a621ad2000000b0057a81f19096mr25649789pfa.22.1671482922613; Mon, 19 Dec 2022 12:48:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671482922; cv=none; d=google.com; s=arc-20160816; b=UudGXKUV5S/q4qOHeFAHqi4Wqa9FzeXzeE4B37gS/VCR+v0TIg8Hj5YUmUACen0i/Q 1cJD03Ok1b3w2pJUqOgBkFtKepU80No4KazScRdNzWYpFAR80Z8e1itjNjuBFZ7ch8H6 IDOs78nHwuW5PdFed7CBXl71nPrium2U5msk6Xguq1BLHqk9hkle5E7ZpoqCdZBHQma0 Sa2ivaU7nm16cWWr7sExd+TeA2rxDvG0zMpKu9J7RAxZkHCD2OKQ1wiCVIO9FuHcqzXi N9ACreRaLIQjBb2OT/xQctsdPrOFPLvknGvwcrpVLkB8pIkiSOD8FY24RvzMgm06Pj7Q /9tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=gekU6kKP7IIk6R91i2D+kYhQ2/5+ZzFfnfqT/fUlpic=; b=Vjp+PWth5q4/LezNNCsNIHP78YbFTKIHIeFXtrIVowgC/wSZgQaO/lGH0GE3Y4bE0i 53obp7gp77xyhRdcrI5tnpCREetRphb4zFyvl0ZSJW6nrDOk4kSQWsI5+nIE3rlegAag xm8L26+snbs1897dHUebXSEWSj+a74Fxj7cAi55QCxIUJ/z0A/4kNLFvE8Nah+b2ChZK kbqTwsuG6Caq3tiMId4fVSCnzPl6v0btlaF9MFvzqqFJdYMn9MzT0fan1NvjIhswcADa 5/R5T7tJmdlgNygzBThTcTOJ+k0j7cFMFSXtglO9XIroTWrTyuyZ1DyjfDS6LpJBe/qW sO3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=irlGYLfr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 69-20020a621848000000b00537b1bc9683si11139729pfy.36.2022.12.19.12.48.28; Mon, 19 Dec 2022 12:48:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=irlGYLfr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232860AbiLSUrX (ORCPT + 99 others); Mon, 19 Dec 2022 15:47:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232705AbiLSUqn (ORCPT ); Mon, 19 Dec 2022 15:46:43 -0500 Received: from mail-io1-xd49.google.com (mail-io1-xd49.google.com [IPv6:2607:f8b0:4864:20::d49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0247E1275B for ; Mon, 19 Dec 2022 12:46:32 -0800 (PST) Received: by mail-io1-xd49.google.com with SMTP id s22-20020a6bdc16000000b006e2d7c78010so4619810ioc.21 for ; Mon, 19 Dec 2022 12:46:31 -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=gekU6kKP7IIk6R91i2D+kYhQ2/5+ZzFfnfqT/fUlpic=; b=irlGYLfrTeZP9BJWrJoWnhdGeWqcT/6M3D430+H48yklmxreMzES9RrMjRQ7R9s5lo HBLGGYcMEHFXWH/mEAkKPbAtckwDjcL7QW1b+QX4AUICKJZH2LI/wh3nklHQHZN0d0LK dSiNzTmkxNr14tIC+jO2mIGbQTDGo0v0w87//seyz99GDAJFm1RAmNfiuuHAWROQZtb1 YWk6K9arXkw5/2XZzbRnqRQf6+JyYif9lrBHjpWotBKUYZuGLcSOG+4gQu3c0hP9oyUg v0/wHO/Z7PK56gb2l7g5hwVIiBB5IpFU9iFdp8ZwhbJ0BfX5BxjAoZdVDUrWQH2QB/Cx +K5A== 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=gekU6kKP7IIk6R91i2D+kYhQ2/5+ZzFfnfqT/fUlpic=; b=K8/n3BKpyEWsNDNEfCMS6VEo/YHYV6guMj6fzJ1FzJZQEB3+tp88TikspTTp379Krl EDfI5sZ1v9FN57ZwOxJlKVHpahnamMwu/cgnZYdJAVlL4XJRn6YJrI+P5grHvD2sBnnU wKyZ2GFuv3YOCmfu+dvqbEbm+J9tY6cCHBsfu3IbibjfBsH1K25ntekR/p5gHFjuQFTP Yn825ktVxq4gv86yYNG0bzysGaHpq6rboTOnQQsMCrfm2l6j1o0jRWAeKWMBe+oq3vfJ Tmo7JmPTJ+U1dT7c1jSHoySK+twxk/kDv6+GFuw8FTrfyuOeMXVl8HbbS/lim7NQhoKf +sxQ== X-Gm-Message-State: ANoB5plOfoYd3rZx7chdy5qtz2yL+CEK8ddpPrfXT+TvQvB4n5w8hsNB 0o29wqTLcpKY4eoi7fA5VCkM+QCG4zSRpdY= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a5e:a711:0:b0:6e3:1926:f46e with SMTP id b17-20020a5ea711000000b006e31926f46emr2270722iod.162.1671482791701; Mon, 19 Dec 2022 12:46:31 -0800 (PST) Date: Mon, 19 Dec 2022 14:46:17 -0600 In-Reply-To: <20221219204619.2205248-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221219191855.2010466-1-allenwebb@google.com> <20221219204619.2205248-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219204619.2205248-10-allenwebb@google.com> Subject: [PATCH v9 09/10] 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 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752410806438307616?= X-GMAIL-MSGID: =?utf-8?q?1752676877226075451?= 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 47229f98b327..40a90bca8964 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 diff --git a/Makefile b/Makefile index 78525ebea876..572f364f4053 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)/ endif # CONFIG_MODULES diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index e41dee64d429..94c1d66c7769 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 # 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 += -n endif +vmlinux.o-if-present := $(wildcard vmlinux.o) +ifneq ($(vmlinux.o-if-present),) +output-builtin.alias := modules.builtin.alias +modpost-args += -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-present) + +$(output-builtin.alias): .modules.builtin.alias.in + sort -o $@ $^ + +__modpost: $(output-builtin.alias) +endif + ifeq ($(KBUILD_EXTMOD),) # Generate the list of in-tree objects in vmlinux @@ -78,7 +94,6 @@ targets += .vmlinux.objs .vmlinux.objs: vmlinux.a $(KBUILD_VMLINUX_LIBS) FORCE $(call if_changed,vmlinux_objs) -vmlinux.o-if-present := $(wildcard vmlinux.o) output-symdump := vmlinux.symvers ifdef KBUILD_MODULES From patchwork Mon Dec 19 20:46:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Webb X-Patchwork-Id: 34772 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2607875wrn; Mon, 19 Dec 2022 12:48:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf7wZUnehlfKqKoOD+XXim29ofMlhRD/Y18K7hqp/JcDR/zfeBhQidbLm48z7xsrgMNzcqHU X-Received: by 2002:a17:902:7242:b0:18f:a4e1:9908 with SMTP id c2-20020a170902724200b0018fa4e19908mr33369806pll.15.1671482938173; Mon, 19 Dec 2022 12:48:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671482938; cv=none; d=google.com; s=arc-20160816; b=nNBysl3cCKuucnZiCZl9cBBdWStBokWnZ+sGESJX8OMcUdTPSMgaZxR02u7Ra6/qWk Otzg+chBN0C8ggi2Y0+EcQVxQHiHC++CCnjhJsc79pl67ZlwLQD0tQ++JypDTqeSwFbN WC9R0efCcpQkw4mzerRzP8MC4liIRS9MiuBuYbol7LOwGyLi3wzZnwc7OF1UL8w4kziS v+yV6nBcRKRHfD4y8dHYmY0V3OC+9VoZcNtxNO44hiQbZQT4rWa5rh6mFwHNdtk0xe/0 3eFOk5UdGKGfYLUZK58qoyLy1R21IG+BskTzumy3Z6/UalXdcyEaMuHZJ48AqQmePEcD 6d+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=ffbS/pv8mbkzwi7BuDuXxKBVWgm3Q+ZGzVMRzNeN5+Y=; b=Cq2dzCLNpJCwGoljRW6wS50tFJ6jnpukhfiF4VqJDHyHGv+XLUVvD/ZfZMjrl9cm8w FzdLf3CkZPI4VBaV9FZ+V2rPVH4KM/X6pjzTw422MJka70ul8h8fP6bXxNF3AylSzoPa iCSC61hNNy7tWq9d6FTh16xPFrPISMOW08/zk9uPM8xEfrIdBVubdFkBSCxMRtTthCjI UTEGspvyVb4x6wscQK/2Qr4sRDjVM5plq1uwDfKuWVMLabb3k4fl03604gqxfKGFr9ul 2QRvlhFKhNwNb3EupAJ4yIWJN5n7c4ZTV8ERX04dC+MIND9MeuwSNB2ZHxB7PfzPRU4H EIIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=P+tl9R92; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i7-20020a17090332c700b0018922404e22si12944203plr.474.2022.12.19.12.48.45; Mon, 19 Dec 2022 12:48:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=P+tl9R92; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232876AbiLSUrc (ORCPT + 99 others); Mon, 19 Dec 2022 15:47:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232714AbiLSUqn (ORCPT ); Mon, 19 Dec 2022 15:46:43 -0500 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4888E13D05 for ; Mon, 19 Dec 2022 12:46:33 -0800 (PST) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-3ceb4c331faso120155937b3.2 for ; Mon, 19 Dec 2022 12:46:33 -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=ffbS/pv8mbkzwi7BuDuXxKBVWgm3Q+ZGzVMRzNeN5+Y=; b=P+tl9R92zOQTC3t4VBw6Y+REEQFR+YIPONKj6GW/JEp8bc5No52C7OOCdrsY39r2pk ySPHB3qcvlRU5J3a0c1HKvTnRbrxxdIckGKtiUEsyPUN5l0UfD7v1cnFyxsrMHjSeg9k ntwmZ6EMaNMngUAGGGjhgxLGtrqzmZppNYMUFeLMBFNfhfJNRapWUo64IFmy95TDVTW6 eYrn2ifH7UePSbFRu2IUDUsVJRJvY1OfevX06T1K98mae5bCESQfnTcEHkMzZpKmcw2g 1P8ECfIrvtAqhfF2Tnx6DZS+hcBtScf5fdyw1R4krdijYiv/Vn51BrnMfhW4zs8gKpg2 1oQA== 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=ffbS/pv8mbkzwi7BuDuXxKBVWgm3Q+ZGzVMRzNeN5+Y=; b=3bUe0pSSFP1nrFrcl1rsRUPxNHgfSHEm6ahJ1udDT9L8wUsLf71auz4qLEUax77r2g BVq+kOes1YAACa+saiczpL0qUKgx0WXKD2DTvOtabys4Hv/PY9lRaZV/onIYITydsQpp abm9/W8p81oDpxlIWsNo3r+g6Bdw7vycQCZgtuJy/QcN8fB36luwhdQoDvrV49aizIU+ 1+fjT3Q3pd5xVBlk4vDUmMB6sNyscH80L8uaZedQ7+Z9Tgo1eXLbcu13X3RCh6VcjiEr BXBjF39hBn2/uMcqi6WNX4jaZ/3WCwbilbW2iCHZ1mEfXG1ciif5TLa9OfYSd68YxGZw 2bRA== X-Gm-Message-State: ANoB5pnx6K639wrORXO52t5cvZLhJ7/Uzx9uAw+bMY5TA/kf5y0HJkpT T0DlDJrqFuQTIoq8npZCogsT3CxHw5lofvE= X-Received: from allenwebb.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:12e8]) (user=allenwebb job=sendgmr) by 2002:a05:690c:ec2:b0:3bd:7135:c319 with SMTP id cs2-20020a05690c0ec200b003bd7135c319mr4467546ywb.89.1671482792621; Mon, 19 Dec 2022 12:46:32 -0800 (PST) Date: Mon, 19 Dec 2022 14:46:18 -0600 In-Reply-To: <20221219204619.2205248-1-allenwebb@google.com> Mime-Version: 1.0 References: <20221219191855.2010466-1-allenwebb@google.com> <20221219204619.2205248-1-allenwebb@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20221219204619.2205248-11-allenwebb@google.com> Subject: [PATCH v9 10/10] docs: Include 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 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752676893392192877?= X-GMAIL-MSGID: =?utf-8?q?1752676893392192877?= Update the documentation to include the presense and use case of modules.builtin.alias. Signed-off-by: Allen Webb --- Documentation/kbuild/kbuild.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/kbuild/kbuild.rst b/Documentation/kbuild/kbuild.rst index 08f575e6236c..1c7c02040a54 100644 --- a/Documentation/kbuild/kbuild.rst +++ b/Documentation/kbuild/kbuild.rst @@ -17,6 +17,12 @@ modules.builtin This file lists all modules that are built into the kernel. This is used by modprobe to not fail when trying to load something builtin. +modules.builtin.alias +--------------------- +This file lists all match-id based aliases for modules built into the kernel. +These are intended to enable userspace to make authorization decisions based +on which modules are likely to be bound to a device after it is authorized. + modules.builtin.modinfo ----------------------- This file contains modinfo from all modules that are built into the kernel.