From patchwork Sun Feb 11 15:57:09 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: 13552514 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 79109C4829B for ; Sun, 11 Feb 2024 15:56:49 +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=WlSz3x7vQL0zyrUoXpU1ovI48LLwVOtNKex8qGf7nWU=; b=4s+vbEUW/sUxU8 6rGNqS4SRnEg2D130SJz9eW0jS+AqmceSNEso8hEXp1aJDrHgFNf2NaSsihXM5++X7QtIqaO3oiIt H+WRv2VQda7lvrMuRlP6YT0lfU8ZpRA7ksbEz395D7gunB9+85Oh1nwe7tY+ZegqUa2Xe50eeSO3t ty+0ACCKs29Rr56i3Xw0bKzXIzyGhuhGv9J1ejc7Qd5qTw24wItE3Z3t3ifLr6gziQRKQASMacA/A I6CH/cNifzw93/ntW2yX3iDlwM/NeTuu3k73eoDqajRl4Hyo/hpmoLPYYRyrrLjz6eVEIMwi4vXoj neZUcHM2Yy6IosDGqhBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZCC7-00000002yFM-1EMl; Sun, 11 Feb 2024 15:56:39 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZCC4-00000002yEl-3wNQ for linux-arm-kernel@lists.infradead.org; Sun, 11 Feb 2024 15:56:38 +0000 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1d9b2400910so16393405ad.0 for ; Sun, 11 Feb 2024 07:56:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707666996; x=1708271796; 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=911kXH4ufHtqEqUf7Y7+h9ODYaLzmiao4LnKiF6mOcg=; b=nuSptWAbjYz/zAJ49HWKkO8JlB+EXuvC6bck0Wa21vpYqiDE91TtZLogjzArqy5I3U xqoAUJdlTKUqv8WQ/8g8gZqNrat+OLYchO/ZoffrKp/Mf7ynwPejBRbLRK72jtpZ8WOK FV978buRBDTQUY74XqQKPoFDBRtVzjhJUExxe3Cywk29akeJ5X+HYcvOUi4Es/JNj48P NDOGaNg0fUIXLXWUEHm6ruzdMOWw6zK5+sd+eTnlq0B2oxOuu+48JCBmm3fnRDSn9Lw2 WGp/ZeislKQs5I2vOYffmYUaspga5NvuXUD6BMSFa77Of+/GTZylXNYxG1pBMo88Qhiz BtMw== X-Gm-Message-State: AOJu0YwUmMkcHACIjKdO0U6y9osQzHONwnmsS87/ZeTvLeNmYsUFA6Yj 0shu1OU7XZKa5vKUQfpyzYR5Zn0N5pBfGXze8A3ndpO9o6HlUkY4 X-Google-Smtp-Source: AGHT+IHbbOE2f+MVZKuK8zEihQ0jBBEHixQhYe2gxKyR16KoP235HaoQgl/akaWRUv5Fi7mLSUTzRQ== X-Received: by 2002:a17:902:d3cd:b0:1d9:65e6:4af7 with SMTP id w13-20020a170902d3cd00b001d965e64af7mr5077571plb.30.1707666995850; Sun, 11 Feb 2024 07:56:35 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXvZ0cfdSs7HN0afcmxNPCzh8FFNpAkX0vG5Pa9ByrNyckv/49cDVCA3E3/2E76Jrk4FRYfox8ASYMQXIXuPR2AlGwiPLQVZK1xgfyl2rxjnocsIaIuLV1/W6Rv+s9sq0iBBW8xAJaauJZwz8gh9XbbJzgb0EesA2amSS8ufht7tpi+G6BXCm/p7b7aE2xDk0hojFbrEUYfIxLf+2X64lkxEWG0b+mY99J2/7Ixwjb1cHAlCJxhaLRfsmjl Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id q11-20020a17090311cb00b001da2fdd4cdesm382064plh.36.2024.02.11.07.56.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 07:56:35 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1707666993; 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=911kXH4ufHtqEqUf7Y7+h9ODYaLzmiao4LnKiF6mOcg=; b=WGr4kqiAxicDTFPSP4TLYKFD6G5W+om/ZVQ9Aim8XUK4x2gZf0y9EpMGGdTykvKvLg2Dqc tR+V/WAXzMsaKnHdqmD4GsKeSWTrHExhXDCSQOqu7LPctlcyPAXkqVJv5MbHS1Sefgsqzq YBbip/C9JBqbfSxHb3qrV0vUaGdwj1cn0U//o25gUQrVZkkLH+3c9hHlgtP8G7DGYwfycY fah+8PS24SUjBvUaIj6wFyTKLf/pw39M3pxDiYLSgUQGg1c8JYP0zthfgMnQ3mimsVuczn zzOEbtAk2V96GhW3moNxIYKCzNak/vmcBZ5/xdVhmgkPEAKmXLOz2A+FXF6+Jg== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sun, 11 Feb 2024 12:57:09 -0300 Subject: [PATCH v2] ARM: s3c64xx: make s3c6410_subsys const MIME-Version: 1.0 Message-Id: <20240211-bus_cleanup-arm-v2-1-3de9e8af7cbd@marliere.net> X-B4-Tracking: v=1; b=H4sIAFTuyGUC/3WNywqDMBBFf0Vm3ZQkGChd9T+KSB5jHdAoEw0tk n9v6r7Lc+Cee0BCJkxwbw5gzJRoiRX0pQE/2vhCQaEyaKlbqZUSbk+9n9DGfRWWZxGsHLQx0tv 2BnW1Mg70PovPrvJIaVv4cx5k9bP/W1kJJYyXSmpXuy48ZssTIeM14gZdKeULNyN8urEAAAA= To: Krzysztof Kozlowski , Alim Akhtar , Russell King Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1816; i=ricardo@marliere.net; h=from:subject:message-id; bh=JL7wM1V7zi48q2tm3KhTIyENAubtfNi2N8isyzcuzH8=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlyO5XnZHv5b2f8/C1CrZ/CQ/xR5XfxSFsC6ctQ DRLdfRIhjCJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZcjuVwAKCRDJC4p8Y4ZY psC5EACIcACY8NFjRlUc+Ac83fBdxJGOdlb4wcheBAf+p6myyYifsA1cK/sh6PDznQaB5tYB8Od T+SiTn7VSWTxIehbTArgxR+C1CrQWqZbyPe4IsMBX9g7jlkJS97dw78CWVlUz2JqCVP6C9j6MkM hPFvLs5GIPlYlbOyjNvHsX3iLC3QRr+dODlJKoWIIz5Z30cOOzRItASOrbq5ZyCrTI6bTlPlEin OKWy3pCk+5eArCBvti6IpVR4W4IDCWhHTkJ/qRlbZZnj0mFv1Cip0maAiSp57dFk7JQjy3NWJG9 eyqWLc+OXg5DW3qq9S6k/gGfzq0SNk9l4YHKvx+q3vz4cUZcG/QGiHx5stvjgWA6ZRgzer2bEdb 9zC4oTxLBBkBpEGea7oB0M2mIm/xbP+7QGJCJu/5sVFdt35Mzrbf1a6sOft8QzRwIUty5eS2moo stY7GHNHpqzHmQMpxM8JK8lm0P4LSm671h7dzutQ5Myn6QiXrBEEB7pubn/aCyZyggiMc02aZ1J 9wrX7jQtkGO1fcPPMrA9W8ZS4AXi6Ln8ygdEewchcXc5fh6vn6PgXoemj3A6abgNs2xE75WIwhb EcqAEwAk1eCdlXmzuAChU1bHHeEANUA/MVIMmnryTmJGK+XfMgAnMj2Gz0AHOlEzsxo37ceWdpQ 2AnV+/HcYNaxZug== 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-20240211_075637_011716_F2EAA7DF X-CRM114-Status: GOOD ( 14.29 ) 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 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 s3c6410_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 --- Changes in v2: - Instead of "Now", defined a specific commit in the changelog. - Link to v1: https://lore.kernel.org/r/20240211-bus_cleanup-arm-v1-1-5c0102bda0bd@marliere.net --- arch/arm/mach-s3c/cpu.h | 2 +- arch/arm/mach-s3c/s3c6410.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- base-commit: fee3a71dc8d26629e5d87e20cff08763f522633f change-id: 20240211-bus_cleanup-arm-da0f2550ca48 Best regards, diff --git a/arch/arm/mach-s3c/cpu.h b/arch/arm/mach-s3c/cpu.h index d0adc9b40e25..a0187606b999 100644 --- a/arch/arm/mach-s3c/cpu.h +++ b/arch/arm/mach-s3c/cpu.h @@ -76,6 +76,6 @@ extern void s3c24xx_init_uartdevs(char *name, struct s3c24xx_uart_resources *res, struct s3c2410_uartcfg *cfg, int no); -extern struct bus_type s3c6410_subsys; +extern const struct bus_type s3c6410_subsys; #endif diff --git a/arch/arm/mach-s3c/s3c6410.c b/arch/arm/mach-s3c/s3c6410.c index e79f18d0ca81..a29276a4fde5 100644 --- a/arch/arm/mach-s3c/s3c6410.c +++ b/arch/arm/mach-s3c/s3c6410.c @@ -57,7 +57,7 @@ void __init s3c6410_init_irq(void) s3c64xx_init_irq(~0 & ~(1 << 7), ~0); } -struct bus_type s3c6410_subsys = { +const struct bus_type s3c6410_subsys = { .name = "s3c6410-core", .dev_name = "s3c6410-core", };