From patchwork Sun Feb 4 15:06:57 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: 13544703 Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) (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 7ACDC225CD; Sun, 4 Feb 2024 15:06:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707059206; cv=none; b=JbjEmEMtGLboknCSOC8BfQy6Ke/Antn0wtiTd0c/RoIGrimLolVWCm9BqxI22Z3ynnjC194uMfgjG2eIW1Vn90CxgCDNp8+IB3FH8TiZW5u022/gZ9zcgbUSNYudUYlpalmTidCdCdbKO15F2xvCb/PzutM6Zm3B/cCVm38yWvs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707059206; c=relaxed/simple; bh=txiLzQ7wIQfEY0+jHKRkldSl4XQ1Jb2EK9W5T3yr/eE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uYAn/DCbOqm/UCuD38diKPDtTHxymF+VhDWMCAEGVF6xn0gPmvm28zvFyJE7FXkYDb5wiW9vRBUNi03Cg4uiuwtXwHi2iW5up0FMAQz7g0bh26FNuP2xTMZsWrbNj31R4aELxOHx9u19Mfzpcif/sL6VvL4+TFfm4x1+cgrQR1g= 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=G8GkPM4k reason="key not found in DNS"; arc=none smtp.client-ip=209.85.215.175 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 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="G8GkPM4k" Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-5c66b093b86so3394932a12.0; Sun, 04 Feb 2024 07:06:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707059204; x=1707664004; h=cc:to:in-reply-to:references: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=f3fWDt5Cz/GC++Vf8McF0DhkwQ/uDHEXb4KCp3AjvDc=; b=pdCKdjJquvdIFjXDoubWaPfgal1OPDKFfoY9Xv2AhHK9EU2Yfw+EZHKQGrS4f1MdyP Ab4brGeEUnwbGgWdSjMp9Fl41Emdl85dYoUV3ROAeo/mAScwR34LWi7sN7qdZllpNdM2 46nbtPNkYTWPHrOKi1lJYmmYB9BYweyHcgl7BijEByS8EpnAswtSin9swRVoqqf0ZkpJ 4+fvP+rk/rEQTJSYmqjkElXdCugofZ6k6j5wgdl7esdnnLRU79WUeH00yyw3ihPryt2J 7LVjMa0FtO33KsdnfvjjK0sopwULesXzdldzOr4I4+A6Vc1J6hP5SFfG7SYn7X47SKwH toRQ== X-Gm-Message-State: AOJu0Yx6ctV8E/aIjWjlVDroFjRppV5vaTNZJtG/8x9sFZt4F6BJ11gV Hjhm9BaSSFvkn8w5x/eocWQDxBo4tymJ7s5EwILvBBdMWVPuDcBi X-Google-Smtp-Source: AGHT+IGbbWJlL+CqieIeCScZjNGNh6CFCP3WSw3E6VYmC6CJZ/zLylktpUBfEnYM2Uok4og8Y1hlGg== X-Received: by 2002:a05:6a21:8114:b0:19e:4f18:b944 with SMTP id pc20-20020a056a21811400b0019e4f18b944mr2888806pzb.31.1707059203748; Sun, 04 Feb 2024 07:06:43 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVJMFN9/ov5iPZJ9zNEfh5a8NstQkpSyYHH+TB99VVl1Ewh34j6DTKs5oRQqg3fT7oZP7u98gQsfU1wVex5Q4WGFtRM60q6TMhOiBk8jELDJFXCLyRoejNKfcdEcgLl11YGwJzf2qGsVg== Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id x27-20020a63485b000000b005d8e280c879sm5261553pgk.84.2024.02.04.07.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 07:06:43 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1707059202; 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: in-reply-to:in-reply-to:references:references; bh=f3fWDt5Cz/GC++Vf8McF0DhkwQ/uDHEXb4KCp3AjvDc=; b=G8GkPM4k4hM3+2GhDG7BHA0u0UYtl2yXgSJk+xMtUQQHi+KKmK1ee4PFv7IuD0Y677IJT2 m2wPQLADYK/BmrOBN/PhGonLIq21PhcDFwEDiVZKnpaQ+nRGaZDzxT8Pw7IOuKAPCwYQbi VxrltmMX4NlBe8IXz/P9QvPAizDXescdnjYxQPgsvH2iMkg2lLKf4ymPeO3dYWYvo1guT6 sfAP6YO1GydxUoCHXEvdzklodXsHupK+Up0Eu8Eh48G8XHb6mXBzrkDvi5L72NLIUpl+vL XpoHJzeTslFfpgOIam0k4Lx8zRiu5aEmy+3nKjOPeKGwy1FPJCJMsaDiIBWfqA== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sun, 04 Feb 2024 12:06:57 -0300 Subject: [PATCH 1/2] mips: sgi-ip22: make gio_bus_type const Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240204-bus_cleanup-mips-v1-1-05af5e9a7ead@marliere.net> References: <20240204-bus_cleanup-mips-v1-0-05af5e9a7ead@marliere.net> In-Reply-To: <20240204-bus_cleanup-mips-v1-0-05af5e9a7ead@marliere.net> To: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1221; i=ricardo@marliere.net; h=from:subject:message-id; bh=txiLzQ7wIQfEY0+jHKRkldSl4XQ1Jb2EK9W5T3yr/eE=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlv6gcjd4/T3By43GAoGT52YB/ZdUywJ4v0EB3H PctXvIS6aGJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb+oHAAKCRDJC4p8Y4ZY pgGPD/9lDXqx1VcjjbIpHnrQqx+HHUtLv8a17za+YokogmO2B0ZkdPc5+d/S0Oay/N3FTDqFXCU 5jnOlKTJ+6G21q76bRlwGhFGWcGst/H6kPtMH4G9aXEYG/kWhWRqnH4Eeu7G0D5afN0ntbaSwXc 67udEfncTqvNvoU6lHOhlFcH6THhqbLMaOQaylKE8Tru/UHBUAlkh5AuYov1RsrGFBEFnZ5h/lB gQ2g21nL3d+Fk5kCE09lhJX8smz8kWVawlmSsC9NgRYRU4l8gFRYs8oPA/JxefwHhK5L1Gzax2K H7V9b8QryCyGuy9yt10CQmwju5UaH1eFz/wyjcxH7EX92EwiT78iro/qzUqwbwWD+M2XWlLj7D2 0V0dHooTMltivxLEpc0qN5LPPSE957m7AeW6mV0MSL/c/7xgXCsMYdLdUsG2a9qxgMjEA1OZ/pl x4IdmbrVMbobc5+6ssCw4TSeCdZMFPEh/uZEpf3baNF9XZQew2Lj1D/f3Tf8kzeDmHFTSu1A+zg eOYTO0wP50bZ73C+XfkSZACLDWC/RVjqDVcYugLulvg0iI4cia68m5UMrx9J1fe26djwseHd/Eq 4LNxa5BCZ2SRKmv4Gr1FLhgG1rsCSzsfEjtduJsnZQBVeN6rpL7ajh3PqAuYs6hEBtL1BgYnZvw RnWZOtsYbNmt+jA== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 Now that the driver core can properly handle constant struct bus_type, move the gio_bus_type 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 --- arch/mips/sgi-ip22/ip22-gio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/sgi-ip22/ip22-gio.c b/arch/mips/sgi-ip22/ip22-gio.c index 81c9f0a8880b..a3cdcb289941 100644 --- a/arch/mips/sgi-ip22/ip22-gio.c +++ b/arch/mips/sgi-ip22/ip22-gio.c @@ -12,7 +12,7 @@ #include #include -static struct bus_type gio_bus_type; +static const struct bus_type gio_bus_type; static struct { const char *name; @@ -378,7 +378,7 @@ static void ip22_check_gio(int slotno, unsigned long addr, int irq) printk(KERN_INFO "GIO: slot %d : Empty\n", slotno); } -static struct bus_type gio_bus_type = { +static const struct bus_type gio_bus_type = { .name = "gio", .dev_groups = gio_dev_groups, .match = gio_bus_match, From patchwork Sun Feb 4 15:06:58 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: 13544704 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (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 96A2522EF5; Sun, 4 Feb 2024 15:06:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707059209; cv=none; b=XY1p8eeVhnwGw5i4IljoIGoaTXaXdUWqs+uXc4cedLZkUKgIMizrlZGpO+HO6fbLGPilGK9nfVz3NjyTVF7i+c6X5yuAVaZGz9/v3/Dxb1MFMXCvo+nm+OVQXA4zzBZ+DSZ2/8OMJ2T2dGhncLlp8cxmJ/bN9z4S4FxksZbcbgc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707059209; c=relaxed/simple; bh=DtL/rj48QTd9lRPw6xPNjYPtR2GFBn9tAGzHB4G/qVc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hLD1zWYMF30he6TgVdJXHloNMxvFnny1AMzGx/yeu3DLCaRuEUXOFhyEIWiyffyysJu7N9JeL71KNI/Qji2UNk9PdsGN9+SocyinI3FqNxjGCbu25GOMQRJcKTT38aRzGLfzilc1esNHCmTDPUIMSQS7Uprb4AqQT1bJ9foP7yc= 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=ge7NGRcF reason="key not found in DNS"; arc=none smtp.client-ip=209.85.216.53 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 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="ge7NGRcF" Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-2969da3e5a7so37532a91.3; Sun, 04 Feb 2024 07:06:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707059207; x=1707664007; h=cc:to:in-reply-to:references: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=4WWcBCgV3xgF0CDiZiVH3sUpocLC2BkMhO8gBV3rBII=; b=YFRlUd+Eoyp/n+7IBoI7jP4gsHHT/5FANbqNSGtp8xUYDNLwy2f4D/VeHiAonjxKTQ O+Cfyiov+iNw8PMuoMw74ajCZUUul6fr8Topi0FhuutZe7YXN8nk2WiyHA5w6EeZb/Pm mM00FBlJy/Gg4le8jP7roxcxB5j0/fleEqA6BoOI9MpDsBQ5UUY4VE66lf/FYEpg8+x5 A7C10jEMKagkp3TzxhxhhyHSYsqI20y4AE0uFyRn/rSC7L13oqCXz1rmJeH8D4TXYzsT AL8Ug9K+4EKOViJjYFUcs1YAYERkEy8fAWZbLcFiCpj55w5ZRFyL9cIgjwNmUsUM2fvi wvpw== X-Gm-Message-State: AOJu0Yx25+XjQv6POtaULMz/LRGGGCNkTBCugC4fdXjeocPdag9xk5a9 2I6m0/NtErxAnxCkZih4pACGwJXNmNPNs6oTKO1YX+oYRon5ljHz X-Google-Smtp-Source: AGHT+IFc4czdYvOMZb8c9+pJJvDnMGvicZEaQaJQAfTiZNapJ7KlgRICzOgbsLUMOw+P6++12UUXKg== X-Received: by 2002:a05:6a20:a323:b0:19c:88c3:f400 with SMTP id x35-20020a056a20a32300b0019c88c3f400mr9662281pzk.51.1707059206986; Sun, 04 Feb 2024 07:06:46 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCU1I5Wfzp1zyaw3J5xeL7RVOfNWZJc61b6w8KibHJEaoADx4XjCLPTSUOrFsN3ykA5BO1vhUowrHf0vsA9K6BesHntKdl+TXjwgULFCAQolWXeT2QHYIgbUGRNRpYBCII17efWcBUsULw== Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id s17-20020a635251000000b005dbed0ffb10sm5229058pgl.83.2024.02.04.07.06.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 07:06:46 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1707059205; 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: in-reply-to:in-reply-to:references:references; bh=4WWcBCgV3xgF0CDiZiVH3sUpocLC2BkMhO8gBV3rBII=; b=ge7NGRcFhpBopShOEWSMVucyqk8ZJNaqG8vpC4jwDYsFVpMbnMr9CDFvlpH3t5HdsWJF8J dk63cE18Ssrdgo6TdTAdKLd7kNJnNZVi5tKHAruzlq4wWwbPbkxqYr8sNaEjzpkArSMJtP +syKNAcSLVo0c41CKSu4t4b0sJqmJouHx8t4kCjRfFdcLET+Bl+uR77uaUUIvreKC4vdRW pUXGRhm1FTwmKmjeJpQ4SwZ+HiNyMAtMX7/Zc5Qo/ONhCJeVeP8DoVmsyg8BORreLV1aL1 MBhpyAq2jDPxtycLGQR/V2WU6BE5M7XnQmwyH4OpJZwHw9XfdbDXr6B0ETNqLw== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sun, 04 Feb 2024 12:06:58 -0300 Subject: [PATCH 2/2] mips: txx9: make txx9_sramc_subsys const Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240204-bus_cleanup-mips-v1-2-05af5e9a7ead@marliere.net> References: <20240204-bus_cleanup-mips-v1-0-05af5e9a7ead@marliere.net> In-Reply-To: <20240204-bus_cleanup-mips-v1-0-05af5e9a7ead@marliere.net> To: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=948; i=ricardo@marliere.net; h=from:subject:message-id; bh=DtL/rj48QTd9lRPw6xPNjYPtR2GFBn9tAGzHB4G/qVc=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlv6gcKbCWSvWamcZU4OHB9cGcXKbzrtTB4v/xo qj0Dv3TYY6JAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb+oHAAKCRDJC4p8Y4ZY pt9SD/0RGAK7HDjICxB9fAie13GpRWS7ndpzkwqxpwzOfja51FUWuC5yx9CzeilPgCgd+OFXT08 2HWaZfiCWEN0mjvsVHsVJt4ewsXuBT04bWleOZ/1UFRX086SvSress64ScWC051NdsXq489nNFf o3/RI9VC+dRmmP0HEfYHurTYYEL/eHtIzpOCqY0uwLu54gGC8RQW0ROJcCBY+CcH3h6xPTXFx// OMmsXUJRxBverMNAchGczMSpx/MOPQPVLi6JKxD/Zzu8ciCdctUtdTAiafO7LUvJJW1nldWcv+F BvkA1M+9Fsk2+TWayU+nyViqCj8lkaXARSspBbjkCEBT89nKV26vP459xXNRyKs3lLm+W4udp3U DFzhlbfyI07aaiQqADsUr4GaVVRFEYZG45Z2KD+eZ+ymtntfW1vvPM4f1yohR7hdQ3oUv7kc8pe Pai7+au8lBUwtROSChjZawhDiFTSIIYnrDPxGhKL9CaI0M6ITdR431RzjuRL/IAtzGo7FZ3spJn 1XMt7pacwLEPtLayTnVOwYaqjWg6bi8juds38KNNex4bCc+jSdEWGO5/OVUu/3Y/qp08y/dmEUW w8YN6DtaYlSHAsaIyBUk2A5iXVxYCFDBpzyfCQQvY0DemNUwkzja08GNA2cG0HPTcri7UPYs1Jb 9qSAzyLP6AFqvQA== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 Now that the driver core can properly handle constant struct bus_type, move the txx9_sramc_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 --- arch/mips/txx9/generic/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index b098a3c76ae9..1e67fecd466e 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c @@ -762,7 +762,7 @@ void __init txx9_aclc_init(unsigned long baseaddr, int irq, { } -static struct bus_type txx9_sramc_subsys = { +static const struct bus_type txx9_sramc_subsys = { .name = "txx9_sram", .dev_name = "txx9_sram", };