From patchwork Tue Dec 19 14:26:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180994 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1978417dyi; Tue, 19 Dec 2023 06:32:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IEGmU6qixmc2d1ERilkh4nx5ABMpNoLr7/bOATp6UgbHZ5TmysjqpWO3j2+NCWKDE4nLW/h X-Received: by 2002:a05:6a00:2352:b0:6d9:3b54:b37a with SMTP id j18-20020a056a00235200b006d93b54b37amr537049pfj.1.1702996348325; Tue, 19 Dec 2023 06:32:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702996348; cv=none; d=google.com; s=arc-20160816; b=At2sp5j3zORVrnz3WC3O+4TPmZZc6znfvzfTVvr40p0qCRZH4aOkUuj5TEW4CwyTJw VW1F7asfisvCnT1LsZjCZwQC8zibNH377Q4jbQR5oaELSwGid2esLTCD8lgLblIMQtfZ fod92EwP9I6xLv7GCJfJcPIipdtz1n5JPsckIjyyLpZBqvmw9865yqVs+ig5v1M2m7bu Ar/geduQbzpYwB962aA3R0NRmrRiNJZXZsqDZob8nUusZn53wXoHDU50xLdfqk7gjydB ygFH723YYFjsl8dLuRlqOWEg0MApPistrrDWEupFcmg3JOa6PhwVFooUQbw3fbqRpBFp vgRw== 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=ZwcoR8aj7X7PaOG1jb23lCfoKOATDKOkpjItqcTvyEc=; fh=3wkXdiTw56duFi5pjWQ7QE2n4GnLJvyjxe69GuN0kTw=; b=DcJmpJ/A4Yok+ZgcwC/bZP4f8xWJ8ChT5bYpQbPDdfxZB59XPCZcB6OVinny3FA1DM KrfwDqODTmN+x2uertCxbDd3bnVfqectKYw9pIaMobSlGTYvzusWkH3FqHg98RK1SEDP De508mGmJrd6MU3w2vjUpx3Tl4HsuTmD5EnGal4iXxTHhl/Ta+WzWXYqeB0Dv3zzO0Oz VtUEaLx/qay8uprD3tUqUKefbJEalTjcpfpdPxBkgnPI89J2lgOrmkHGWrGWBp3DZJmy WYcGQGLTRStZ60XnMrCxm0iO8+1D8tFuoCH4TJxaPwAP6Av7P5FA2ArFxvbQRZIIH1M/ pPxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xn0rHfUW; spf=pass (google.com: domain of linux-kernel+bounces-5367-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5367-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l63-20020a632542000000b005cdab77e14esi2333282pgl.559.2023.12.19.06.32.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 06:32:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5367-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xn0rHfUW; spf=pass (google.com: domain of linux-kernel+bounces-5367-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5367-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E5C0628102F for ; Tue, 19 Dec 2023 14:31:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84F383714F; Tue, 19 Dec 2023 14:26:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="xn0rHfUW" 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 B4E422D7A4 for ; Tue, 19 Dec 2023 14:26:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2435C433C7; Tue, 19 Dec 2023 14:26:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1702996006; bh=/vfAfNsoNNWZCT7m/ZTfcYEDIuGqfyE3dGzkrpGY9DU=; h=From:To:Cc:Subject:Date:From; b=xn0rHfUW9SOb7qTYr2hseSnUS876mCIcHkt1Vaa1DTYW4YpMDe7EKXGr2ID36S014 uBmU5VfDVxqeTaujoNJD4O9r1G+DxEBNrtajylBElB1bzJK8pFaRVAP2hFEeZJxVET fEXmSXeSkI+Z8lR/U6tj4sj+VX2fUS1kjwQxcnsw= From: Greg Kroah-Hartman To: kabel@kernel.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH 1/2] moxtet: remove unused moxtet_type declaration Date: Tue, 19 Dec 2023 15:26:38 +0100 Message-ID: <2023121937-pants-heroics-17c1@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: 26 X-Developer-Signature: v=1; a=openpgp-sha256; l=818; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/vfAfNsoNNWZCT7m/ZTfcYEDIuGqfyE3dGzkrpGY9DU=; b=owGbwMvMwCRo6H6F97bub03G02pJDKmNK2Tnqbqn1qTvnRi7zfHPUcvpSpeilQqY3kyzanEVb b2bf/FWRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExkdzvDPDsha3Hxz2K7o5uC 3Tap8IuuW3jiOcOCZYcPif3VP33186wPUc2f1G4rv5o/BwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785721098968552518 X-GMAIL-MSGID: 1785721098968552518 For some reason, moxtet_type was defined in moxtet.h, but never actually used. Looks like a left-over from the original commit that was exporting the moxtet bus type, but that wasn't needed, and it was a different variable name, so no one noticed this one dangling around. Cc: "Marek BehĂșn" Signed-off-by: Greg Kroah-Hartman --- include/linux/moxtet.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/moxtet.h b/include/linux/moxtet.h index 79184948fab4..ac577699edfd 100644 --- a/include/linux/moxtet.h +++ b/include/linux/moxtet.h @@ -35,8 +35,6 @@ enum turris_mox_module_id { #define MOXTET_NIRQS 16 -extern struct bus_type moxtet_type; - struct moxtet { struct device *dev; struct mutex lock; From patchwork Tue Dec 19 14:26:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180982 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1976536dyi; Tue, 19 Dec 2023 06:30:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFojZAA8O7CM1ShdgCpnKpxOmqKzvTxlR9XTSUZqlCvWs8CZkYOT9Bch1USG6WCXBHZFgep X-Received: by 2002:a05:622a:14c6:b0:425:917c:7536 with SMTP id u6-20020a05622a14c600b00425917c7536mr2022232qtx.119.1702996216843; Tue, 19 Dec 2023 06:30:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702996216; cv=none; d=google.com; s=arc-20160816; b=jVEW7QQ9O8YmfQryEa8TTaWyFiV1CuylZah5ditJDyBnRQNA5JLvxd6GLgdWh/15AC 3ltVYAkBq8FH2pW/GzyUB475XCirVs36V5kp1N7nKoIN2i9NkFFWWT4VJPkl9ZeyBRuf fXgY3jqTd0NvPcBkH0J5IspXHiCI3kURodoA387tBfKy2Eciiz+ojyqB+XXos9xi3A4g vSYIDJo/3MthJZFl9r85TH+xiWrcSPuR8pf7z/si8w8XfSfy1utsQtDOOZ8G89CnelRQ GjaLec5gMcJbFXbXYsN4v8XsX1zXW0jxHyS9g01jtiMdpQHeSHduUF1ync0c5/ieKIeI edEw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=2dNmt4+p7ARnZK8dRMTWWkCgGTt4ORi5beS3xgJISFM=; fh=3wkXdiTw56duFi5pjWQ7QE2n4GnLJvyjxe69GuN0kTw=; b=MIx9URbu60BVryzwKEs8LmQqgtBQaedjO5fKKDMCFzuuyRlLrWXQW4Z/k3NLaydXjz wie0gtimD85+X1qrIiepRlv5v7Qmfpw9XufMO6fA1fTpEFm/CMxqxizJJ37tFZxCg5RS 3/3fevqgHlumXGs0NGsejX5D6ulxP4RxiL1vMqXkSEPlokhzQOIFEPHv+YPCHrfVIjxU THcI1cf6a524zoBX+r5g/5NQc9INKf4yrmQHqD2pKZ8agNqktGJ3jzQKgDhQi7viz96n WndYfmR8RNIw6gKLrFP2HvuM3r8e+S6aCeTJcmlL9AIfIAONoYzWNjUGlECRzSdLhvO0 Syfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Hfing/oj"; spf=pass (google.com: domain of linux-kernel+bounces-5363-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5363-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p22-20020a05622a00d600b00425f0ca874csi14904562qtw.324.2023.12.19.06.30.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 06:30:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5363-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Hfing/oj"; spf=pass (google.com: domain of linux-kernel+bounces-5363-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5363-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9DC481C20953 for ; Tue, 19 Dec 2023 14:30:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03C5831752; Tue, 19 Dec 2023 14:26:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Hfing/oj" 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 17984208DB for ; Tue, 19 Dec 2023 14:26:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18750C433CD; Tue, 19 Dec 2023 14:26:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1702996003; bh=1FNF60890FZe8kxMt43p7UTvcMY3fweSq4axrM1JM2U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hfing/oj/AUYnlR4VJ/5gSwjFWNUg8N3PIlxVFK3CIXnc8hwRNNmNy/L+aGBvYA5e 2Oqig9mHjPMBybV3uklsjzh0PRaHxuvUmjt2lG0hGnPOtIYcyDCyK3jjMMgdeR28xB mO0+zN8luSltnDKZrhQBFM4jMKfyFIe+mmbpNP7M= From: Greg Kroah-Hartman To: kabel@kernel.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH 2/2] moxtet: mark moxtet_bus_type as const Date: Tue, 19 Dec 2023 15:26:39 +0100 Message-ID: <2023121939-written-guru-db83@gregkh> X-Mailer: git-send-email 2.43.0 In-Reply-To: <2023121937-pants-heroics-17c1@gregkh> References: <2023121937-pants-heroics-17c1@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Lines: 25 X-Developer-Signature: v=1; a=openpgp-sha256; l=857; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=1FNF60890FZe8kxMt43p7UTvcMY3fweSq4axrM1JM2U=; b=owGbwMvMwCRo6H6F97bub03G02pJDKmNK+TXsV142/79UYHNLdanX3fb8On0hh3dorzttBPDK /0r4d9fdsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEQs8wLNgiuES/MezcBDuO Kn3DnXV1k70eOzPM98u5+DhA4PPTyzyXtjMKmb3esWO9BAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785720960537758759 X-GMAIL-MSGID: 1785720960537758759 Now that the driver core can properly handle constant struct bus_type, move the moxtet_bus_type to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: "Marek BehĂșn" Signed-off-by: Greg Kroah-Hartman --- drivers/bus/moxtet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/moxtet.c b/drivers/bus/moxtet.c index 5eb0fe73ddc4..5e71b4c29992 100644 --- a/drivers/bus/moxtet.c +++ b/drivers/bus/moxtet.c @@ -102,7 +102,7 @@ static int moxtet_match(struct device *dev, struct device_driver *drv) return 0; } -static struct bus_type moxtet_bus_type = { +static const struct bus_type moxtet_bus_type = { .name = "moxtet", .dev_groups = moxtet_dev_groups, .match = moxtet_match,