Message ID | 20240219-device_cleanup-mcb-v1-1-dc930e7dc11c@marliere.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-71916-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp356877dyc; Tue, 20 Feb 2024 04:20:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXkpKi1RcQZa3YpUPJD7gSQ1K5u+NNkKQie9rdAjs68ei5pjlKh/sx85xjAIpken7Rh3cRUXguQRUGM3ZqdEas7uPy+SQ== X-Google-Smtp-Source: AGHT+IEarpb1HqwEgL7RIcWpyS3Y19kDVvJ0O0ITy1JrK33uBMw1eEq6Fu8Bi/IdxLfnj65BQEl+ X-Received: by 2002:a05:620a:2991:b0:787:8016:8e08 with SMTP id r17-20020a05620a299100b0078780168e08mr123784qkp.47.1708431626788; Tue, 20 Feb 2024 04:20:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708431626; cv=pass; d=google.com; s=arc-20160816; b=Wjsziu2IZtCtYvb9s2EuxH1nupn2hQFclnUd5lqvxxcApmQKQI4T8Y7fPrwZ3J5QuR bkS1X12mIwotMvFr+TL/KuUSrnXXcJn1PKkM4E1JjsyNPPwpYZG2V1pxHAXUxKI3oGx0 +2XDbwZkpnoeXhcZ+nU/l7KQ/ZP9/xNr6Rvj29180vY6K5Q5VSiaqpq/aJij2Z4mVzsr aYQL5bbKh/Y5XPdWbJ3FrVh9kPVjKKUz2pDRXfsf+UVdva4FsdkH6DsVyD4tL5ZCC1CN 8Y34aDicn+W0saxyO8yZI2k6e/HDtrAvQw/e8XGEahXtTHzsr11hsB4HSw2abKTr3k8u TyHw== 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=4l1ugTQtT57U/DtQ8yakHbXSOTzUFNQNEozYNeXEqWo=; fh=h3epr47JTv+ClHFVuX4Kvbxse2ieGvsHUFgfH0Xvkps=; b=GIY5QTI+wttnLlLvhzi8uzd9fVtRN7jxcfG52RYr1+R75eym/nPBEvrbzSkDRkRs4O TAwxJhGZk4kQTAHRsyvQIvMRA7Nx/9Wa7erHiPHXDAqW690uDMtGoIdvMw4LIavlxNbi hf93EiemH49qVWxiER5jzOOvQ3eiOcXy8538mCabi5VwBw16pDv1uQiXNVvBJStRDt2f QUVAuAV3veTx0sSZ4O7rUkBtT67DjFW2nt/Gz2nKAAQqzSCwnkrJcIq9ZJn2TEBtRpEV APMfYFLevmGwV9qaEDY2RVfnzBjLe3MUQaYU9zPvIDVY7elkNwldH5+3l4Rg7FbDjO9n Byqg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=BQ6qlA05; 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-71916-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71916-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x22-20020ae9f816000000b0078721005278si8039439qkh.320.2024.02.20.04.20.26 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 04:20:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71916-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=pass header.i=@marliere.net header.s=2024 header.b=BQ6qlA05; 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-71916-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71916-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 263201C2323F for <ouuuleilei@gmail.com>; Mon, 19 Feb 2024 19:54:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F28AD5380D; Mon, 19 Feb 2024 19:51:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="BQ6qlA05" Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (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 E112651016 for <linux-kernel@vger.kernel.org>; Mon, 19 Feb 2024 19:51:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708372276; cv=none; b=JlkutdZsdyCTMiei2Zwt63P/GxGTR7sWxJUiD22od5AncQ8ObN8VYx2hIcii9x/YCnkryRq2yWNufFjp8+4oGOByDOsY0I5xiTTBJFFLDOWSuYtxPnOAI5dGlIic7iPDTzMcexHmtMAUvuh+nkwOfhiUvPrXLAnSkiQRvGrWfVk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708372276; c=relaxed/simple; bh=cZD9tav3Rsg7FGtsH94q+RH9RD5QCb1KktFz9yZ2dHM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=uxPCWT0sl1FgGayg76qMzSsugQG4SNYPeWVPYZx/fPDn3Z+KLQrvB/fzgaFzDcyI640gyWfJNWAPIo6mCx5Qf4NVldibEIumvcKFxqFxLuWEMOI9PQfWOlKG5yRi0rv8E/EwP73bio/Fx329oKYFtYnheBZ6vArI9cLkNnlXEGo= 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=BQ6qlA05; arc=none smtp.client-ip=209.85.210.174 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-f174.google.com with SMTP id d2e1a72fcca58-6e0a37751cbso3478753b3a.2 for <linux-kernel@vger.kernel.org>; Mon, 19 Feb 2024 11:51:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708372274; x=1708977074; 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=4l1ugTQtT57U/DtQ8yakHbXSOTzUFNQNEozYNeXEqWo=; b=SjdvlHI/s36NHfrwE8eBlG2StU8IxCW+Eer2slCk6CdUJedNryoXLkwDMS89mlhn2R kV6zip+7D6Mqe5EkvoyKtIEByuiL+iqMT3cAWbVewM5z52gSu/jjrYJMbvVZbcKMZ5CN 9AG+2olGZwxwGAIEcRbL5t3EGHk+RGAZ08aU88fsVvjpdH/FYzSUTvUzbXOVKr43FOtQ lTDrFtwSz1VpJzBceVTY1kzNJNbFuU/Wa0hAQ23SD5Lr1gZYPqLuo/RwFumGz0swsH2L 2Mug/FCFUJjVvEwTp8828IUB0lw30l9C7FZD0nNGQXYkj98jh60SocBGJwFN2HYdLS4T WFKw== X-Gm-Message-State: AOJu0YxKJ5c3zA9+fR319RuoGLnFyXYzbtW1uNlTD3S7mmAz0xpsGYkW ISOn0x0f4G/K2bXobbvrVOloRBoQ2q11JXguUU/6VYQMmJKDEEl+XSnyUt1ZbAR9dg== X-Received: by 2002:a05:6a00:812:b0:6e4:6047:fdf3 with SMTP id m18-20020a056a00081200b006e46047fdf3mr4740484pfk.14.1708372274176; Mon, 19 Feb 2024 11:51:14 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id b9-20020aa78109000000b006e0debc1b75sm5451473pfi.90.2024.02.19.11.51.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 11:51:13 -0800 (PST) From: "Ricardo B. Marliere" <ricardo@marliere.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1708372272; 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=4l1ugTQtT57U/DtQ8yakHbXSOTzUFNQNEozYNeXEqWo=; b=BQ6qlA05MIXKZmZlF7ra4aNSZib6aTA4z3dW9Qn+B28QcwT5yeFXzAbzwZeKZ0OtuzGXHz XiASzrYS534ef0nrjQb0Lu8+eZqFSMYdIC1f05WIApLtQolPa8ULAVyVNvny7sBgUpZU0o 3plyObgOA7dBgaN1Xl4O7I7KluXJAFBGzrxL/6ucHFpjHsRXR0yIVuF0GVpPtOjc+NSvLY ycLF5jx9jwThTeYNHyhmEOO6kXeoFziohahe2LjKOMVaJCE6VXsHlASfMTxUcI5E6WeDIa h1t/ayHemY28B4beVdj+TVls5tobYRyE66JalhksIZvvtDbHxIYN1UuxJXfbwQ== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Mon, 19 Feb 2024 16:52:00 -0300 Subject: [PATCH] mcb: constify the struct device_type usage Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240219-device_cleanup-mcb-v1-1-dc930e7dc11c@marliere.net> X-B4-Tracking: v=1; b=H4sIAF+x02UC/x2MwQqAIBAFf0X2nKDWxX4lItS2WigTpQjEf886D m/eZEgYCRP0LEPEmxKdvoJsGLjN+BU5zZVBCdUJJTWfq+RwcjsafwV+OMtbabT8dqMs1GOIuND zR4exlBcTn55HZAAAAA== To: Johannes Thumshirn <morbidrsa@gmail.com> Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Ricardo B. Marliere" <ricardo@marliere.net> X-Developer-Signature: v=1; a=openpgp-sha256; l=1106; i=ricardo@marliere.net; h=from:subject:message-id; bh=cZD9tav3Rsg7FGtsH94q+RH9RD5QCb1KktFz9yZ2dHM=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBl07FfB+H8LpedTMaq66TTf6LH/jLB603Bj7mLw FwXp5oWPsaJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZdOxXwAKCRDJC4p8Y4ZY ptiiD/0ZXh+3A6BhIJqz0RLqlzE880HhIdo3dR8T54TPZIHkQf2K8Bw1igZrFoqTcwDmW8LzGAo r+/InxENUjCER17HdRgcTSKK66T3ZINXuve99Ed0QUqLLGzDiIlPzOlv3Nkmhffg/49dLma+dtW i2DRpTZLT2Kbj5pRu+kwAmxujjV/FjKVvtecC446L5agIq7AyDfuLKjOEf26eC+9H4XAzkoMsVM W7oMrOnOh694ZNqfFyIjStoo/vF0CSouHIOclBnRnydm5Nk/ml0CScV+xz7tTw0HeLoefv/D1uu rmM5iCLlsNpeN9R+6PaiuPqyb4ry/TTrhSQ6Zr7bQoZ9gBbbVL4m652Nt+ncQ/eidjw5ZFrgKMF qV73sScHUtvwov619DS/e4Bf5d3oNtve2DjEc7uJiOkn2DS2XxBx6xSDnHY27jLQGuqdK8Rf3ot jvr55bwOkLRUUKfWww1S8/4hGQ5Hft2uvcPx6D6Hz3R1VvD5yY38unG5rg2eOivHhozDkjTk6E7 2+AWbgGtsCJm1hzyuxrlkRytG+aSUbYtIrAA8IHdjqA14wwYU1cGtb0dhN2UnedWQfz4JWoj7NW 803c6mFmdJYe3jM0HOXBLO0TjloU0LNM2BkFLcyd0KbED7tJ+aWlIKP3GD29LK2qsqPWDiW0R+z TRF9OmCziYUq2iw== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791420401812436027 X-GMAIL-MSGID: 1791420401812436027 |
Series |
mcb: constify the struct device_type usage
|
|
Commit Message
Ricardo B. Marliere
Feb. 19, 2024, 7:52 p.m. UTC
Since commit aed65af1cc2f ("drivers: make device_type const"), the driver
core can properly handle constant struct device_type. Move the
mcb_carrier_device_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 <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
drivers/mcb/mcb-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
base-commit: b401b621758e46812da61fa58a67c3fd8d91de0d
change-id: 20240219-device_cleanup-mcb-31a910240a2b
Best regards,
diff --git a/drivers/mcb/mcb-core.c b/drivers/mcb/mcb-core.c index 61994da7bad0..8c4f1a1e3768 100644 --- a/drivers/mcb/mcb-core.c +++ b/drivers/mcb/mcb-core.c @@ -165,7 +165,7 @@ static struct bus_type mcb_bus_type = { .shutdown = mcb_shutdown, }; -static struct device_type mcb_carrier_device_type = { +static const struct device_type mcb_carrier_device_type = { .name = "mcb-carrier", .groups = mcb_carrier_groups, };