From patchwork Tue Feb 27 11:40:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 207161 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2643462dyb; Tue, 27 Feb 2024 03:57:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXhDeKuunBxbfihHLgO/vX0m3Gx+iI4DgSj1V8MQ5QkRLYW0Sb6FpxX9pagRJH2OPlYVslJdF9e8qAeRs8P1y8Q/jG0hQ== X-Google-Smtp-Source: AGHT+IEAG4Mad2/BVC8KWbU+iNydEgx6EJKYwvIS/R/pcntPIK1oJ2MVS685pg+5PH+2yFelFZ5c X-Received: by 2002:a05:6808:220d:b0:3c1:931e:9aed with SMTP id bd13-20020a056808220d00b003c1931e9aedmr2177390oib.36.1709035060367; Tue, 27 Feb 2024 03:57:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709035060; cv=pass; d=google.com; s=arc-20160816; b=aFcBzMGA4KfA4qsN5cu8kcqDoz7HtgFIlq5JvGEtjwe03aRoYoTBolx+4X/x+fnAFd yA8nAeVp+w/K4erhQ3DoTs0EfObVcFtCd4cPTa6i3HPm/g3RwCIkwsNq/l+TWnkR0bU4 BN9srYwGPJlf4Bjxer98YNOqYyqWgQH8nJKHZrF+HqB6fUNKLqdBZ7GGcJdsmBKRu0cQ PXP30xyJdYXEYX8KFZV+kczvxUdvmlrYO9ycz5yGyHId6h9cxIX5V2Ozv18Kkf0DG6PN OIKuUo6Dhv6gcanpk+JPRfNkuEOXL/CEVcJmidmkZrXka9f+aY5s1t2ocK357MuJl13w 2Qqg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=tThuCtBRUd5ftlkLlRFaictZB1fGzwDG/lSpeV46+ms=; fh=0TQ1/zVqG7Q7jVEzM5GiP6Y/AesUxs5rjJjyYTJgiG8=; b=oLi4e6QWadq3qjH0M6CfPsQwkE0nParNPzauBO6HKEpZdC7t179irL3igpkQmzAUrD NEj4sz2zlUewwesFbI3hBpZvwhtfePGC2yhml1MzJ2UmroNbnq681wGdSAhZIpbuLLn1 CFXebbT/fe2EtiM4NZBKJW1i9+g3RMl27nr3wkuEcz7PhWJjL2+GqV0hnomF/W+fSl+K gScm+7inD0whf29wiBaE5MuBWAjkcqxesnoSkgYdVliu3F2OZRMddXFczTNLIoYuw8uZ zWIItVNY7Qyv+dAX9BkwLgThhqd+2FJx7O+Sadx/3xF0GKWvfcYcMeclPKw+ObUrH+DQ MT+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-83137-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83137-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id kt9-20020a056a004ba900b006e53b977922si2178459pfb.171.2024.02.27.03.57.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 03:57:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83137-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-83137-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83137-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 51310B27F42 for ; Tue, 27 Feb 2024 11:41:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 96CDC13A89C; Tue, 27 Feb 2024 11:40:42 +0000 (UTC) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (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 7B87713A24A for ; Tue, 27 Feb 2024 11:40:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709034041; cv=none; b=b0r7yTgGluyd4OAFDHgpsjYLGHvsCjBrqpBO3JG0EffHBvv8FnC7UONHaYaxXHx0DMfMZf9C2Mpx2PxoHXId0B6kkg5y14hUZ0qhlj2+ubaE+IKrWVoIi0QqcsREEx6gkaN8ulffo623uzpr6sguHdlnjNPEtudx+rJguP21WGA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709034041; c=relaxed/simple; bh=GSTjww8EOqtlnmykG/aRs3o6dzSqAVdzqhB8s160ri4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ptO4iR7e70Aa8pkNbuySfgStbuoK/21DSK8FdJ6wZJ8wZA/PGBH95Wf9dSP8Zd5trtfcZ6R62bPetzpTl5eW8KeKIGTW+zCi6yY6Oxza/t7yYLDV0/TxCOc4s7sLH+NgzQliJKSnIZ6LtBYmbgfYQaCttikQstYpgl0B+H2nAh4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.208.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-565ef8af2f5so2551979a12.3 for ; Tue, 27 Feb 2024 03:40:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709034038; x=1709638838; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tThuCtBRUd5ftlkLlRFaictZB1fGzwDG/lSpeV46+ms=; b=jeIQJbW54UuNNyZtgrwazj6IH60PlSt5DF5fxYbtjIJmqmDJovPQmaA4Oe4kZzhafu CvALwKmWZWwvdJzRWZsQymJtRSUeLbewjoi0URkOktGmgaRKcoCiycuVu+Osi0n6Jdk2 fvfdleFvzmkeYU5AwuNek0IqRNscc5uLDCMpWMy6t4JaHl3gIjoiUYRDXodfFKY0ZNb8 Hp4jr26FS/H8rGoETeLtxcx3WVzw/FQgA++FISy9dJZXKc6pAh4BTRD3eW2QqIvc7UEH +HmghnajGXr0O8lmV9ZzWnOv2v59tht3kUsRNIeLbH79lYb4BX+nPnd2MtYnJhqW0G9O EBIg== X-Forwarded-Encrypted: i=1; AJvYcCWZ8pS+AZU3accnpiZR+3paG1S5TQA5udoUpMvIMpRrhnDlpozdI5VGjGkeM0KPzY798ifitTVTDVf2LzO8VyXI7wpfFV8ootjCECJm X-Gm-Message-State: AOJu0YzjBDvX7elU1hB0ROvBLK0WM+atW9JVxwoSzVp9vcfzP6GCyGJr gUCefzTFze9ehfRdIUiq47yfFbsVhZr7YGMJ3LkUgoOqvl73Sm+t X-Received: by 2002:aa7:c908:0:b0:565:edd9:1acb with SMTP id b8-20020aa7c908000000b00565edd91acbmr3979166edt.23.1709034037646; Tue, 27 Feb 2024 03:40:37 -0800 (PST) Received: from nuc.fritz.box (p200300f6f7068b00fa633ffffe02074c.dip0.t-ipconnect.de. [2003:f6:f706:8b00:fa63:3fff:fe02:74c]) by smtp.gmail.com with ESMTPSA id h24-20020aa7c958000000b00563ec73bbafsm675287edt.46.2024.02.27.03.40.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 03:40:37 -0800 (PST) From: Johannes Thumshirn To: Greg Kroah-Hartman Cc: "Ricardo B . Marliere" , linux-kernel@vger.kernel.org, Johannes Thumshirn Subject: [PATCH 1/1] mcb: make mcb_bus_type const Date: Tue, 27 Feb 2024 12:40:29 +0100 Message-Id: <20240227114029.22319-2-jth@kernel.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240227114029.22319-1-jth@kernel.org> References: <20240227114029.22319-1-jth@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792053147549014285 X-GMAIL-MSGID: 1792053147549014285 From: "Ricardo B. Marliere" Now that the driver core can properly handle constant struct bus_type, move the mcb_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 Reviewed-by: Greg Kroah-Hartman Reviewed-by: Johannes Thumshirn Signed-off-by: Johannes Thumshirn --- drivers/mcb/mcb-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mcb/mcb-core.c b/drivers/mcb/mcb-core.c index 61994da7bad0..0c939f867f0d 100644 --- a/drivers/mcb/mcb-core.c +++ b/drivers/mcb/mcb-core.c @@ -156,7 +156,7 @@ static const struct attribute_group *mcb_carrier_groups[] = { }; -static struct bus_type mcb_bus_type = { +static const struct bus_type mcb_bus_type = { .name = "mcb", .match = mcb_match, .uevent = mcb_uevent,