From patchwork Tue Dec 19 14:06:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180959 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1959830dyi; Tue, 19 Dec 2023 06:07:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEH3jpr5BELvhbsj5XtIXx9tNt/KZusHv9eFFgYdUykHbAintw+/WTeC53G1UiCwzWpNsnG X-Received: by 2002:a17:902:e786:b0:1d3:e11b:91e9 with SMTP id cp6-20020a170902e78600b001d3e11b91e9mr689587plb.94.1702994822339; Tue, 19 Dec 2023 06:07:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702994822; cv=none; d=google.com; s=arc-20160816; b=V6vH2wSKlz7RMpJQwQq2dvbjWqQ1HkLiShLA8qevR57JyRQfz/8PcBY7privs7bdvh 3vTXVECdT2afg0VjXPERiTuI3AjWhICnnB+x8p00sUrLMrJGaBs6yVNphzRmtg6NQ0is WixsJV4V2FVmb7fNuEX1DAL3RZ5dHZmmegba2zuMvjwNexOrqf4krlJ81C+iD3UZ3/Ub 7qB12HtkgnvePZ7BL4hXM4s65CduyJ2VMHzshYCxcfi7JbzGCw5c4Yoe12Yzyqms2opU BEWwZrW8pGKjqyGHDlQ+7Y5PkMYcbLMbxyAKsOOyr/aCKGwDVO/y4M4ygdJ4d5ieaCsP HXAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:lines:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=5xjMzbpkfglEpfXHpNUz7hRUEglj0gV9Ktj1ggUhp8k=; fh=ffj4Nm5tw94oRa1URkwY9dKEv5Zjaa4LeRxGtWDB3NA=; b=yxqn9Ni1BxHwKExqHbk0rzYGsV/q5b8HWQWTHOYSE7iTPG+xhguGf1z3C6Gp3kfvMU ekkQSPJzGhIap8FiU0t8gHXbE1deykoNcqC1gX1PXMnSltIjcE2FHQB3LrwxxzhbdmTp U876PEbfiFKubvX7+8cFB1E70qUGsdkuXOj09ZULro9y+VgUS/dNfuA9qGECgo0NiDwm tv7ggai3+zT+SlSizX+7i2hBod0WXQhCLjPP2WFWriF1Pqqktna0jyL02aG9B7mbDlz7 AaHlvfHYEf5mc/1i5Y455bmRPGeMinZmDATqnCAnxpo95oiSUeWsB0D30vuHtTZpIy3B SKxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Em1vznRo; spf=pass (google.com: domain of linux-kernel+bounces-5314-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5314-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id r10-20020a63ec4a000000b005cdab767081si2354488pgj.352.2023.12.19.06.07.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 06:07:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5314-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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Em1vznRo; spf=pass (google.com: domain of linux-kernel+bounces-5314-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5314-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 5AE2AB2427C for ; Tue, 19 Dec 2023 14:06:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C45601C282; Tue, 19 Dec 2023 14:06:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Em1vznRo" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C08F1BDD4; Tue, 19 Dec 2023 14:06:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A358C433C8; Tue, 19 Dec 2023 14:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1702994784; bh=PJXSkoeYpe+bnJfmI13XMEa+S3LzbVn+UJHe6Z1cCwE=; h=From:To:Cc:Subject:Date:From; b=Em1vznRoZ4k7ykAlEpnzX2gaz93hRwOojzeAVtgTL1J/2szeLXm6SVVIZBsx368Nu r7h30nf4YJyfACpuU+8Yz7WtmmOyzKZx4jJjVDWwL88GZRNccf4jQtqD8WzEtfLrM3 zYpPxi5t/eQ0H46e12lS0zMCJMs+keE0Fl1sIT3o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , linux-sh@vger.kernel.org Subject: [PATCH] maple: make maple_bus_type static and const Date: Tue, 19 Dec 2023 15:06:19 +0100 Message-ID: <2023121918-rejoicing-frostlike-d976@gregkh> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Lines: 53 X-Developer-Signature: v=1; a=openpgp-sha256; l=1719; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=PJXSkoeYpe+bnJfmI13XMEa+S3LzbVn+UJHe6Z1cCwE=; b=owGbwMvMwCRo6H6F97bub03G02pJDKmNi6NkpvyqYNE5Zl3w4cfrqRd3C6TPS5T8kv/+iSS7y pPpHmp/O2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiOzYyLFhUwpnoNp8rIMNH U//z259ibRMfXWGYn9nw23L5/q1bmncfzpi6ccJunQtu/AA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785719498918593984 X-GMAIL-MSGID: 1785719498918593984 There is no need to export maple_bus_type as no one uses it outside of maple.c, so make it static, AND make it const as it can be read-only as no one modifies it. Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: linux-sh@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/sh/maple/maple.c | 4 ++-- include/linux/maple.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/sh/maple/maple.c b/drivers/sh/maple/maple.c index e05473c5c267..16018009a5a6 100644 --- a/drivers/sh/maple/maple.c +++ b/drivers/sh/maple/maple.c @@ -59,6 +59,7 @@ struct maple_device_specify { static bool checked[MAPLE_PORTS]; static bool empty[MAPLE_PORTS]; static struct maple_device *baseunits[MAPLE_PORTS]; +static const struct bus_type maple_bus_type; /** * maple_driver_register - register a maple driver @@ -773,11 +774,10 @@ static struct maple_driver maple_unsupported_device = { /* * maple_bus_type - core maple bus structure */ -struct bus_type maple_bus_type = { +static const struct bus_type maple_bus_type = { .name = "maple", .match = maple_match_bus_driver, }; -EXPORT_SYMBOL_GPL(maple_bus_type); static struct device maple_bus = { .init_name = "maple", diff --git a/include/linux/maple.h b/include/linux/maple.h index 9b140272ee16..9aae44efcfd4 100644 --- a/include/linux/maple.h +++ b/include/linux/maple.h @@ -5,7 +5,6 @@ #include struct device; -extern struct bus_type maple_bus_type; /* Maple Bus command and response codes */ enum maple_code {