From patchwork Sun Feb 4 15:56:44 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: 13544710 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5D019C4828F for ; Sun, 4 Feb 2024 15:56:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=MONNHkmvLNB+MSTUqUfhadQjZ5m1VE6N/Mk/UQAAmuk=; b=qgPzYSCJ13Imm2 0xhgY//DvATxsvSbTbP/qie6vkmsWqgn/aQsswilDrmD5ML1koexFgB8zK4oh41k2C13DPvNNI0MW ttmPVOxCJwfcxBjOy95x0WdCd29Qg0nAojRLIarBk64N/CpzFmNWqssg1U2tRRSeOQ8qWqHmp/upI Mj+VXpK2TJ4whtLdzQdxREoesoW0S8UIcIja6MMUP+ohgt2ApffG0p+jpipmlP4TccxsBAtl5TCrf vGo0PUdl0LkgfPrMFwk4/e5vyq7zE7rIOrMeb9x3tzFj434r75B3GM9FB96/yUMkRjdmZhpEJe3tP Ta7whomTJlkdZDaSN9xQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rWer6-000000015Z0-2wmE; Sun, 04 Feb 2024 15:56:28 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rWer4-000000015YY-1Z79 for linux-arm-kernel@lists.infradead.org; Sun, 04 Feb 2024 15:56:27 +0000 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-5ce6b5e3c4eso2917926a12.2 for ; Sun, 04 Feb 2024 07:56:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707062185; x=1707666985; 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=1KAFRuJjARefD8ORAWekwdxcIKqWzl1i5HJCIgFDPMM=; b=V9tTDL5Cow4EYkRvwJEu2pl8qTDLdc50wNWztGmzYKGwJnlTF/3dR2kC1O3XL3FB2M famRxGMSgpv+KPuo+iUYh+3+xTBJoY3mIE6/jgKFPxEkuu/9uc6fjg7NmLcuFPRR1ePt suQKTmpwaYEYziboJomlnZMv23inZuWohwuvKFYNJUb0/2cDj+D/bQbXA8BV7uQu+y82 9fZeuek6hqxFE2ULZtmGA2wagO/AbhHrG8W9+3ILFIaOiGmiyJRztJbjdUNXgv0UGFII Aqh4hd9XSsYhwtLvcVdl9rOH1NLPyACU7OM/BDoL4bya/nN/i8WFwY70BPiikd+OzJu0 yL9A== X-Gm-Message-State: AOJu0Yysc5VDXtsulcpdEKyWLlr7967CAcfE0QBNsTN+jJgyvggtluOf 2IVFP3OkAPdBeXbHLYdDkfDrmkC3FijpZZAxPorOK4y8eIOaoziN X-Google-Smtp-Source: AGHT+IHAbT63OH5TuHb985B1Th0KfRZAXTVOpEZ9uWRXKKd6ssXFlc3EnDihepHznE9F9inu57D9bw== X-Received: by 2002:a05:6a00:be1:b0:6e0:3408:9ee with SMTP id x33-20020a056a000be100b006e0340809eemr1559221pfu.29.1707062185363; Sun, 04 Feb 2024 07:56:25 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXiC9H2820vLVBaDFmqFhOCZF9yjI163G+Jz5lyCy7fgz07hK1x36ejr+C8O/SETmppv3FjJTmoRFoaGgHE7K6pSRgUmlDmbXPJGsGLi0iH+0IcmJiYMtKxCgCDcTRzdFtisSavRcvG4MvWGgjGk4GhQ8SAzQc8AOI82p9wLXHAWI/ZQGwNGndQ1N3JgfoKRa3is4BrX8E9RPSnJ0iOfV/5bCe2nixKeHpI2/DFt3bJJmjm3c0= Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id 34-20020a630f62000000b005d8e30897e4sm5183255pgp.69.2024.02.04.07.56.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 07:56:24 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1707062183; 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=1KAFRuJjARefD8ORAWekwdxcIKqWzl1i5HJCIgFDPMM=; b=h11aAxJRBAGw5IIhq9r4RhYGRThs1ok2AZ7W9XLM9NSJcSHu4zvdZz/SI2FdnXkWccn0JL FRLqAnKd83z/OHrZGHEwAG9rtAaZPWpN/sBsrIoSSqvxvGS5si2JYwgfIfW5W4Xs0/e2nf 1p8pSrGEMpry9g9t1ezBeMLGD7Ud0Smv2MYIq+/mIIzE8tVKl1RO8wJlKnQVtsDQ7rzIi6 lTV1i5vINZjfjpT4Kyvwjn9N+BdwglCS8xzaWcyvFzsxVEpAKMeElavIrz4UFL4vq7QIEf F11ozJb+8DjFahthbPJ/AFeEepbQZ8GYmgmr/R10tXQ8jvkdGLPQs0aTWsw0lw== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sun, 04 Feb 2024 12:56:44 -0300 Subject: [PATCH] bus: sunxi-rsb: make sunxi_rsb_bus const MIME-Version: 1.0 Message-Id: <20240204-bus_cleanup-bus-v1-1-bda309c4b829@marliere.net> X-B4-Tracking: v=1; b=H4sIALuzv2UC/x2MQQqAIBAAvxJ7TrDFivpKRKRutRAWihGEf8+6z RxmHgjkmQL0xQOeLg58uCxVWYDZZreSYJsdUKKSKJXQMUxmp9nF82NhqZMaa9saaiBXp6eF7/8 4jCm9djMpg2EAAAA= To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1445; i=ricardo@marliere.net; h=from:subject:message-id; bh=7FYnnNqTc0H5T6M7a9N0Nki5bcUxmzHuVUFte9heJ/g=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlv7PD/cro16iyRDAtGwb6gU1EUNlRLBdjX+kR9 cDRFXyIFViJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb+zwwAKCRDJC4p8Y4ZY prOiEACYCcDYtS1q/kpdhK9KoGBYD1FigTQui2eoTVOCZiMr0vjDk12Y5v/J2uq0XdmPtWnYxuY cM4JKLK3TrSTnUPRM81KqiGHOb5LDuCGY4/JANKeXBWXs8kMr5yV+2r6aCEtUTG3n7zvkySfqaj 7P7NBvZ7f34LDFroyLS4UX/r94N6h8pvaT433xpJ/rUHFNtoyWo2pXjP/Cbhai+qk95FR2qFPM2 UtAkD3x24ir8F6m0Ci4NNwB2V0zxzuX8QM2Hham3eQGTWBY9tMJhDeZE7ECRutSboJoSGwEij1p 1SbcP3v0ean1749aMXTWF+CH510T2HmVii1rnmqzos/PQOHE/PJNjN5rKY/4c2d7t8qAvbeGvRK 18v4kfdCGSi85B51cvNtlZXnveFPMATxsH01mDnZjO7l6KpTWnmKsxYqEWMLlc8w/6pEyuYra0S P5oR7AOyNygJPEIWGVjs1vClmnnwox6kqW9izerDlzVpDZKrRfkntyayssimpVI6YRsbkspMC3Q 0k7efWA8QgT8hfD6q6M3rgf+EfJbo8OhGVZTdelKFjUb8SHgBFBvPc0qldPgW/LrOLVfOEea4di qeUzSMj5K6cFS0pffQraoDKqJrv3Nwy9vsDf3EEzF8ynWYy4FH0/mq9bWH1GX0BjcCGp5xVtzYe HDxESQOWdQ14j2w== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240204_075626_468043_12C6AB8F X-CRM114-Status: GOOD ( 13.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now that the driver core can properly handle constant struct bus_type, move the sunxi_rsb_bus 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 Acked-by: Jernej Skrabec --- drivers/bus/sunxi-rsb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- base-commit: 38ed19495066966979ba821b9e0f549ad5ea620d change-id: 20240204-bus_cleanup-bus-de90b25d7ce6 Best regards, diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c index fd3e9d82340a..1e29ba76615d 100644 --- a/drivers/bus/sunxi-rsb.c +++ b/drivers/bus/sunxi-rsb.c @@ -128,7 +128,7 @@ struct sunxi_rsb { }; /* bus / slave device related functions */ -static struct bus_type sunxi_rsb_bus; +static const struct bus_type sunxi_rsb_bus; static int sunxi_rsb_device_match(struct device *dev, struct device_driver *drv) { @@ -177,7 +177,7 @@ static int sunxi_rsb_device_modalias(const struct device *dev, struct kobj_ueven return of_device_uevent_modalias(dev, env); } -static struct bus_type sunxi_rsb_bus = { +static const struct bus_type sunxi_rsb_bus = { .name = RSB_CTRL_NAME, .match = sunxi_rsb_device_match, .probe = sunxi_rsb_device_probe,