From patchwork Sun Feb 4 13:47:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ricardo B. Marliere" X-Patchwork-Id: 196500 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp358700dyb; Sun, 4 Feb 2024 05:46:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFtbpyj3ezXti+XC+PcQ7fy1Mf/P51aIyqQVgMEr6JBhBkWnznn8/hfEAi86JjY7l5jP7Mj X-Received: by 2002:ac8:42d6:0:b0:42a:9457:191d with SMTP id g22-20020ac842d6000000b0042a9457191dmr3413543qtm.30.1707054416929; Sun, 04 Feb 2024 05:46:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707054416; cv=pass; d=google.com; s=arc-20160816; b=Yt4D9BEvU5IYAUcyLcJuRpDI1rkqogNz+gFXhGAx+0LvLT5X8x/E+ZgYWhTzFQTx6y 8/PpkqBEg6laXLQjkXMeb6JqxmMAog3P/y7aTVw2CQJ1rfG1mCUvWGsoJQNHNKTGlIkj dS2bOTAkoT0SuyHB68mas2ixa3PGEwpXisolZmNDR57GuFQzIkmt3jUh33gHxYcg756k fQvOoSJed3TYZat+BMQHL1/TeLXEqafSRAiqk2aASyh5JkF0iXY7TUcOi8b41xcvNFwt jGuAhN9MYS0jPCTBuXP5Z3KDtClzLwNtPM87xmiSwfOESImcMnVLvBUIxPwamnUjMsIt aDZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :dkim-signature:from; bh=z4528a23sx2pHGEBKObsW4f0VY+b9fY/qXjwoxuqJKQ=; fh=Hqa6QjWRpCO7oy4ffBmZoOO1xdW3UauGl1xa/XMQkq0=; b=c+tfetFo6+HB8WZSfSEs/PwzIEGGSPDyI+lfXNq2Ja8yc7BSaBTAgU1pNcRLa0N2yD BMyItycP23LaRnWxKB7bTFYOkkIHbkGETtya5lVUzPxvJtBt4KReKEC266yuR/ioAyox co1xuCIOxjh3DE1EpN9qSBDKARO7KgHdA6bh2JaU+bec4bWcTlTlLZDI1WrEnun1dJry HwjH44828G3unhMAh1H1w6lgCvgLxzN8np3AE9pH1XeadIa+iS6gj0KU26YgapiTLnq9 KU64TrH2cxluJNCPmvekm3ZjW3uAZGqJWgCU6fAqY2mfuM5ryKhpWTz3zeyMEeyIXqVk g7YQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=Lh+azBGx; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51678-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51678-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXAGEYwsvTEilTcEsJDgnnIzDFuwbENG7HEkdPLY1AjlyIBICiwlVhiE93ZtvEHWgEEf4QHmnhzkZg+Bswx0QJmGyQgvA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id r4-20020a05620a298400b00783df788239si6941166qkp.146.2024.02.04.05.46.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 05:46:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51678-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=Lh+azBGx; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51678-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51678-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A99931C21DBE for ; Sun, 4 Feb 2024 13:46:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F051D225CD; Sun, 4 Feb 2024 13:46:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marliere.net header.i=@marliere.net header.b="Lh+azBGx" Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE62D224D5 for ; Sun, 4 Feb 2024 13:46:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707054400; cv=none; b=AthwpjHmfleGwlmUI3IhwJTMWG/Hja5dMrp9G01JjUdsiAjVXzlsUlo1/0jNJ5p2Ta4Z7xmv/vgRKcEcr6egeNS2+vHvsoOl2aG3ir/4el4cimAE4YLl9k1vDZr1VSEcA9AwDXm1P34EJOI8etu8kSRvJeeF+32e1UqNEJdVaE4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707054400; c=relaxed/simple; bh=qKCo/jNBhfOfLZkSlabIjpgNUdA/N8SMgurTg12fd6Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=Jd9INaldDxNKQ4+NEug0sySaTSp1J+pU/EVXnUoKV7D0giChzz8zkjHUMqp6bhPA+CoFlms6lXmPqdUTMXX1INMANtwxnTBLR15wQ5KrFlID3paLQ5dGNl80sjsvsM+x/55zJ7j8Xiy6KzsAreJ2w6i5DjCE/3YJ9bqcTfVpWnE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marliere.net; spf=pass smtp.mailfrom=gmail.com; dkim=fail (0-bit key) header.d=marliere.net header.i=@marliere.net header.b=Lh+azBGx reason="key not found in DNS"; arc=none smtp.client-ip=209.85.216.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marliere.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-29631796acdso1493480a91.3 for ; Sun, 04 Feb 2024 05:46:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707054398; x=1707659198; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:dkim-signature:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=z4528a23sx2pHGEBKObsW4f0VY+b9fY/qXjwoxuqJKQ=; b=MwwcZgqoq3s4mjndgDo3bHieCeC2FL31p1NeqUv7N+zsP10vHSxe+4GmmSvBCw/OeV asar1sCO04kG2v2k9wnf7d8Ys6zzFAzPnporWN0PtS8eHf9m5rNwcI6RpjGEh/EeaRS5 twC+Bd1o8PhgS4qxyJAXVI7cvKJQUXYWvPsNuTLLguw0KTlXNiJ3IbTAte9iy0g5HSJn RKeY0JK+zMtq6w3UvtH9Nwja7EpCJWhOAqZuzSiHTyEd7UxUXi5v9SMmENok1qYiWsPL vh0b8vkUmogMLWbFyx6D5RP/i/hDt7YstiOmyvrqrp7lIwcJrgtdu1dOuZ4AlH/raYaJ EEzQ== X-Gm-Message-State: AOJu0Ywp7Jlq+Z/4Qr8D/ckw2AD+EBNwB8TVW8f7GMLlObprmx5HMUcn CsPX35QqoKF0rcZSwCPd7ypSUHuUhNwsmcK8wcl4Do0dd5u+ssdz X-Received: by 2002:a17:90b:3c8:b0:296:3a69:8152 with SMTP id go8-20020a17090b03c800b002963a698152mr6261485pjb.2.1707054398092; Sun, 04 Feb 2024 05:46:38 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCV4AfufQPQYE9JyKfKgQ1eLJr3mIm2YMenuXJk11MEz1ZEA5v2Tr7terO+0j6UZ6pRaWp36p3gIhvICiksBQjCaIxG2DjEC215u1oQUj1zUbpoGxRqLnzePjRGlQkxQcQ0xww== Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id oe5-20020a17090b394500b0029685c1ab0asm1114312pjb.31.2024.02.04.05.46.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 05:46:37 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1707054395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z4528a23sx2pHGEBKObsW4f0VY+b9fY/qXjwoxuqJKQ=; b=Lh+azBGxCFaVdW5aJMQOeJ/mjqGqkFgGPdj64s8j8CZIBSNepJe91DBIYWnDQ1f1yknnon qzFfb/aJ3PNxG6ra52UXBoZCTpzgBDI1UFAI15TDsq6UZZ2ERvzAWzxpLvNQYy7bnO2dNx satQFo2gryr/ulJuwPFWh4w7WEW1nwJbarfI8+i/bqGnnlZ92NnwmsXKSSgDleotcDRnrp FRzMZ5z289m9MXGZwAoWCzesZlCNgto6aKyrBOnfEFL+kkscamfaYj2q+9HUudMhzNdIfE RlvvFXVOU/rFzZJd/ON+Y5Cm/Cx6FjCGcjzRfy7yHhDPjFIq9faqH0K0Cmgt/g== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sun, 04 Feb 2024 10:47:05 -0300 Subject: [PATCH] workqueue: make wq_subsys const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240204-bus_cleanup-workqueue-v1-1-311748f9101a@marliere.net> X-B4-Tracking: v=1; b=H4sIAFiVv2UC/x3M0QpAMBSA4VfRubaadRReRZLNwYmGraGWd7dcf hf/H8GTY/LQZBEcXex5twlFnoFZBjuT4DEZlFQolUShg+/NRoMNh7h3t56BAgldloi1Ql3pGlJ 7OJr4+b9t974fQamm4mcAAAA= To: Tejun Heo , Lai Jiangshan Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1059; i=ricardo@marliere.net; h=from:subject:message-id; bh=qKCo/jNBhfOfLZkSlabIjpgNUdA/N8SMgurTg12fd6Q=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlv5VZTbfiuIZArQRVP10vibbJG6+HdbQtU87PR ib5B0bocRKJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb+VWQAKCRDJC4p8Y4ZY poaPEACzhO8kAG47WTmOmLQyhhmIib1KF6zFVof5YPqHiW0e2FcRHWaIBpoLcNAyeBQVQCXsFhu /Zw147W9wFTjaqAqMvsei4mVgNYavzYgGY/c21khCKP7t50pHNT/KzVpNBM5y4y7hFfurq/3n9v yVSO4azgMr06cZkRX/FaWY2LIGKJHjMlihn6rVY3edcmotkwCZtkvviiuFyFT5EHcYS6ywZDyaE 50fN0+1as0pDlvNO9lcQLDJSy0EUoq78xwKM/tMyKzXDusgFns9OChsrYbnzpa6kPM4nGVlAkt6 nioytc9vhJTWEWxm1YEzSNeh+XAWSZ2d5fA9ixi/kb/N099bNH223ooGYrQTLBqY6VbWvx3+1lf huBgL1thdOE5U/IbLih/kvX9efCw+FszO4J+PO+cNlDzXoUMzf+65HXst2T0tS5PqOwEEAncqye NcdFIEZSmk/DXxwokw2nUAkmqjc6gcwC1I8lgo6w6vKZ5GpReCtYSbFQCnqwrbSMhc1+mFDQJNi srn6B0wI6YVIdQrhHbDMooswx53mim2L6chGRUFNcKojbgsMgo0LrF1pEI/NnM5uSGVA+Nqaf99 O3upFsQR5HEKuuqxanJtjBfSBL4cBct5Y1hUytDZiZPnwqDA13YCZ9V/99MjAEm8B3HH61KjNlt xLcWM4HDruNmYTw== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789976292293984209 X-GMAIL-MSGID: 1789976292293984209 Now that the driver core can properly handle constant struct bus_type, move the wq_subsys variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Reviewed-by: Greg Kroah-Hartman --- kernel/workqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- base-commit: d49e20ca05ef22580bd4ae3219a31e4630f8df97 change-id: 20240204-bus_cleanup-workqueue-b5544924b8b9 Best regards, diff --git a/kernel/workqueue.c b/kernel/workqueue.c index ffb625db9771..09caa1a34630 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -6686,7 +6686,7 @@ static struct device_attribute wq_sysfs_unbound_attrs[] = { __ATTR_NULL, }; -static struct bus_type wq_subsys = { +static const struct bus_type wq_subsys = { .name = "workqueue", .dev_groups = wq_sysfs_groups, };