From patchwork Tue Feb 13 14:44:01 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: 200841 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1041484dyb; Tue, 13 Feb 2024 23:21:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXKtaxFx6hNNxMD7gZ30/ASLOIr0rQ3nl3on2nNmb0eVzn/6OzUcvTcCVkfeeqI7g0vuD+TBw60HxoQfvcYKcIoJDyUrw== X-Google-Smtp-Source: AGHT+IELD/JWViS9dD/iPd1ALhkDuYi6GOZYm5J5ixLFSISHPJk9uVbGoOiZyw4buUIeIqL+tWBf X-Received: by 2002:aa7:cf14:0:b0:561:ad3f:a0a6 with SMTP id a20-20020aa7cf14000000b00561ad3fa0a6mr1297330edy.10.1707895307804; Tue, 13 Feb 2024 23:21:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707895307; cv=pass; d=google.com; s=arc-20160816; b=AKhB2KtWn2emTqiglcRBcN1uzJk6g+4GYff5FgklBK6omg9PTz6R1Yyhv6kk1nHkCO E6rcBxZsgJc8w8dLVSTsKQc2IWePV4WwRB8rqF58RNlhA3/xVdosvoqtaplgRbXA5kME avelAL+vF2SORhKyOfoBjEzSgWAnfPZTclAj6YpNDLvyex7F68nuDJgo+GuVl13NbldD yMipo4SU9awRevD9vZHq8V4jd4daDaYDJalLX2z4e81Yy1eDQceTLUDaE/Rv60v3ShVD SdegWHHHCzeM0z3MA/zsCJv6DE/7iSaLk1xUqEjEpxkfTcmHs3G/+1s8wE7ZqtSAguAx TnIQ== 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=FYNucHgPMrt9ZK1QrIVWntmjSqYfyys/m1XF/v5jsto=; fh=zKz4k/tHgtkTp74sm2pBO+peTRWC+AZ6Wxnqrj6Y9l8=; b=qfJJ79EWRF7qpP2w697hjMCHcP/jMnC5EpOeg80BMz/gQ1K+7j1ytd8XwIpziaaVbo 0PxGkW55NnKQqy5KBQyaQ0rnJgT7MAkd/bE5TLLo+llLUDn6hXz0c0pTghA6ByxczYMW DOd0gMI9RMJbKb+5gE76x4pZ1bAEMO/5g5iEJL4gAU78U6sornWF92SVuRZ3NjyhvkBI OCZ1K+0wy7NpWGtRBZj0IkdCroossX6FR1+QyALyr24AwhKWg4ssCWNKo4t3Jhs/ZfeU 0O5W5OcUjWz3PPEGFMqU4XD5F0N2BSLTxLlHIUKZDlqIIY/DeTWQMTMhKvlYseE1ckAA eoFw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=l5smCoRw; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-63699-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63699-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net X-Forwarded-Encrypted: i=2; AJvYcCWdmZSjo+3njF4S3K6NQ/fwCkyIzDhH+s3kN7ngW5r9J4hIjBuQ0pOyECr/7FcgnXlNzmvous9WWtx0oGsidtPlNCGEnA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id w17-20020a05640234d100b005616adb6fe9si4467625edc.104.2024.02.13.23.21.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 23:21:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63699-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=l5smCoRw; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-63699-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63699-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 53DB71F23B27 for ; Tue, 13 Feb 2024 14:43:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6ADA156748; Tue, 13 Feb 2024 14:43:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="l5smCoRw" Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (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 F365757873; Tue, 13 Feb 2024 14:43:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707835407; cv=none; b=ZJS/CrAsJ6S/wfcwn2pR2Pga/GbCu5vg03HYDeuxNA+CQynbxKPQM2v4vOqZg5sdHJ8FYc3azrQJY78GBXoly1+QCHx6/XDED2pioJcQJLb1grJGgHkP5XFDwFU3+ocydM+pv+C7LcfZmCC+my+ILDC1TSOM52mV1z46wR/aowU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707835407; c=relaxed/simple; bh=WNpttQEDrqvt8dFJV77xZZnD8lcLZbyCkaxL6f/dDNg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=CqFloXaVDBUiSN8khC1ZmSW/fUbMg55ZGH9cc3htPiQXyT0Q/ydkicq86n6sfKV/5JpxtA3hyYFj23oxMWm5XK0EisHzFziOM2A4KYotGWFjiXCMJM4kBK/+aO+V5AXA9vMIsnB1/YsoWs68DQV7Ve3B6oWc3RI+t0bkAluj84M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b=l5smCoRw; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-6e0a5472e7cso1700101b3a.2; Tue, 13 Feb 2024 06:43:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707835405; x=1708440205; 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=FYNucHgPMrt9ZK1QrIVWntmjSqYfyys/m1XF/v5jsto=; b=ZLD+ELwgfnfRDX0wGiSux4tQdaFgRgnRb9VRVTW4bbLU6SB0Co++hRmzqZ21BXhMvg F0/mQVhav2Jvfwpma+HY973w5YiBKbYkqDg2enSVJXOiQIKeLceunXQA1ZtkKmRYeuOK ck57yRaKL1JcFzoN+OfHkU+gFmy9So2v3trSNp0TOBI5OvCfdLfIaMEVTln48nv6gUbV 2kHtIlSZhjeAdmuqxUetoaEXUaRnBAzIDzAYcVO5M72yoi4SuCXVmPBFoKx8/nuhGNg8 FhsFLveO14foj/yoW9TrPXjrv1H5TozuLu0+5Og0uqJXIqn9BpIPriAHWVKmwrh3zcI9 aMgg== X-Forwarded-Encrypted: i=1; AJvYcCVueWSirDsOEoIzQ2oL4DRyt4WtjoCwFfradmuDtymsNlxPa45ZbX3xTgIZHCuNLI0K0S3AnX++Fwocc/XM5p0lzdnZjv+4cdvb45OtBNWE6ZODygnqTW8wvTQNJFdTYO0ztpGFBAmaPSPADA== X-Gm-Message-State: AOJu0YwNWC17o6/nXcHj4VvHX8c7yQToh6gUdmB0BJ+eSlJjxv7Zerqe dzVikXjwmu+mO2xudx+mdA4lzMepRigRJOjs+1/M1E2u9M+75xQ1 X-Received: by 2002:a05:6a20:ce47:b0:19c:93b3:c669 with SMTP id id7-20020a056a20ce4700b0019c93b3c669mr8122107pzb.29.1707835405253; Tue, 13 Feb 2024 06:43:25 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCW4zBhh7yrmLk5zu+RrfnMjm/6ZEH6JfqqMa/JIvOBxWQhZW+wzh6usqXGWcwMUagazDoJJGAkLZEYCozTpKub2l4senvn+V8FphaQAQiiSDfFZvkVdEO9czIVLZpFekJ8E8CTbCBhS6qpOysUOtnJd0Pr7Ldn0IuKaqqe5LTLYGq/81T3cqeWqo+pp00fjqK9SGMGwApeArmdoPWQkZoKDrTJ+DbWEhfqIRs3LRZ26tSGvl/Vg+mzHyef12XTJT5pDiATujcy055BrcvTl Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id z5-20020a62d105000000b006e08437d2c6sm8099904pfg.12.2024.02.13.06.43.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 06:43:24 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1707835403; 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=FYNucHgPMrt9ZK1QrIVWntmjSqYfyys/m1XF/v5jsto=; b=l5smCoRwvk1Mx5BdQFCdQtU/3ZsJ1FNBT66X17YgwebdIbuSshfBM3SXwxe8hYvs7LGKf6 5FM4DbiGVuXj22gYOtU9H88lu0RNr/b7f8I0N2lYdX4skI6p0MDtGCE6dqlQ3Z61h2xGIk v045CjiSyBnCALlcewuUAfLibBQDuWhzSEYZF0eCdRHTSmr0/ojheAnrURXmTayNdPd4x1 9QbAzG2iube256TVDuBdfYQQVzG8RlJNgmOxtCVTuw2ev/25yPNpo9ih2sTFlasDMqHEqI SWgB4SGxSFzVIP10zrLAuEFIsRmiSGr6LvYUuqu8Xqb7UVK7zGM7g06pWYk/hw== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Tue, 13 Feb 2024 11:44:01 -0300 Subject: [PATCH] soc: qcom: apr: make aprbus const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240213-bus_cleanup-apr-v1-1-50c824eec06d@marliere.net> X-B4-Tracking: v=1; b=H4sIADCAy2UC/x3MQQqAIBBA0avIrBPUCrKrRITZWANhohhBePek5 Vv8/0LCSJhgZC9EvCnR5Stkw8Aexu/IaasGJVQnlGz5mtNiTzQ+B25C5K3o3aCdFv1goVYhoqP nP05zKR8fLAWPYQAAAA== To: Srinivas Kandagatla , Banajit Goswami , Bjorn Andersson , Konrad Dybcio Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1661; i=ricardo@marliere.net; h=from:subject:message-id; bh=WNpttQEDrqvt8dFJV77xZZnD8lcLZbyCkaxL6f/dDNg=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBly4Azba+yedlJSxrLcdV5QSQIj/y/UhcAHPfbF dDVyANESOeJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZcuAMwAKCRDJC4p8Y4ZY phWnD/9rAPaaWWA6BJ6yJMPj/UIdqpENn4eB0nlph7th67CZFFwn3Q5o8lddz4AEEo4p7tPB5AB cgp4O7LA7iCH/ExEypmt6bMZzwVFCkgBABtGEYWq+9gE1s5iAZGPl/0Y6EdiHEhXHe6MSHcA/YG aWFlXIxp4liOhyVy1FQHtxakUUaCAFsFkrv+A5sEzCDp+EjV0NrHA6j/OtnMgIuCRqD27yDkSSp P0651lFbSuJPSowMFTHWZ/7jWjF3stF29rIt0JLJ8il0P2frbyA+zBp3AteLjduDCaikJQ3Tk1o GoV8uQcBRbfDU6Z07X/LO8rZ5Z8pXTQpIwpme5c3M2+dBIOFcscOYfVd4+s6Gzdfm66vAWy/bRA ibktmLZzaNWOQrldMnT1AvtL/QWDh3d4tFTapi7DFZX0KklDllYtHSuw4Pt7ctX9Jmj0+MBYCtg 3+WiMBTC1bNUgkOlfB5sOdtB50t2qzmQUjHv8WVn8oD/sXQBXLmZ3iSNrfakyXmooAa95AqbXjI V0wlpBlIaFtWal8Lbjl5SufroglOceEYPwJ5FzQ2z/aj3oUFDMJO1BrNA9EPFdEOSKu65sZmVS3 D9co0V2ciBHfFcmaS0YIXv21Fg5j+hOoN27LTF+nfrWZ+qucYMTubmd6xoZaOuFGdpxHCHqbUyq ND+n/BJP/jpCp3A== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790807401259708580 X-GMAIL-MSGID: 1790858030353403272 Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type a const *"), the driver core can properly handle constant struct bus_type, move the aprbus 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 --- drivers/soc/qcom/apr.c | 2 +- include/linux/soc/qcom/apr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- base-commit: f7b0172f074a435a34bc0902b6cdbf1a3e935e27 change-id: 20240213-bus_cleanup-apr-305f89f9058c Best regards, diff --git a/drivers/soc/qcom/apr.c b/drivers/soc/qcom/apr.c index 1f8b315576a4..50749e870efa 100644 --- a/drivers/soc/qcom/apr.c +++ b/drivers/soc/qcom/apr.c @@ -399,7 +399,7 @@ static int apr_uevent(const struct device *dev, struct kobj_uevent_env *env) return add_uevent_var(env, "MODALIAS=apr:%s", adev->name); } -struct bus_type aprbus = { +const struct bus_type aprbus = { .name = "aprbus", .match = apr_device_match, .probe = apr_device_probe, diff --git a/include/linux/soc/qcom/apr.h b/include/linux/soc/qcom/apr.h index be98aebcb3e1..7161a3183eda 100644 --- a/include/linux/soc/qcom/apr.h +++ b/include/linux/soc/qcom/apr.h @@ -9,7 +9,7 @@ #include #include -extern struct bus_type aprbus; +extern const struct bus_type aprbus; #define APR_HDR_LEN(hdr_len) ((hdr_len)/4)