Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp503807rdh; Tue, 19 Dec 2023 05:42:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IF/HAuWhEc7nwlzsWLrjXI9mB+0jCdkqGaEwPjNDX4TdMV6gj/nFu1oSUpzk3LmwdmABlk5 X-Received: by 2002:a17:907:9854:b0:a23:6e93:2be0 with SMTP id jj20-20020a170907985400b00a236e932be0mr852378ejc.72.1702993319867; Tue, 19 Dec 2023 05:41:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702993319; cv=none; d=google.com; s=arc-20160816; b=ntM6qpbINJvVTTi1q0iK/e1CR+niS/r+5nzjHBDadN20Htc9/J/jhKmTrGHm0LPjhI JNuEMU6MfU28IMesBlZXcWXiAHbhjNGkvJMLhW6j5zdjGCn2DZ4WN3b+F1heKvs+U9aN doDGm7z4leO4Oh5/cbHVdHGSNySIyu6AUEFSnb3iMXPln5jmCe/S0v9nvQj1rtoyKOeE jfCl83e5BRSu/JNOj9imuCc1vNi2ki+D1iZ1DM/NoybZ7fmUeQ6Ch0dCCrphGVuTf+UK IiCO/q+SAThsX7Z5MuL/x06xYZQVE+LIemUG548z+NOgRrFWo0GW/TzYvCmz9meZJvQQ tnsQ== 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=p1o2H0k2oZ3gWjZDqtqQWceq7APCK2Fk+2KJLihG9Dw=; fh=7Qpqgnsc+p8tKJkjH2MMSlVMvanizMduFu+8Ju7vvxw=; b=VEsUCHQgSrnMNc+6Na6Sf0u7qTAKoKCEW0Q0E4fNjrvqeXuQioeOmt9JFBd/SZzdnL xqyk2qtaHMemkhKuM1wtXwpAcMp4gq+KFrPy0J5NC8UXBuCbQl02GV0Xjh/AElxseJ94 UnnX3cH/GhiDM8aQF2sy1imuytx56zacdJPnEtjjq1ciUITQYgSZc9atVAVZyeL405n7 paekt3f1TRwmRje6t13Z/9e2kgpZtvYraWBU1qxmACUCmgmVyugCRJQrYs/C1Ky7Oul/ Y+1kzeIB2U7StvfH7sdtp3z0DpD+dOQQYOvg8GMVlaEmxxkzCKXJj9nN6Y2PazJ0R7T0 +Fsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ClGsWkTw; spf=pass (google.com: domain of linux-kernel+bounces-5270-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5270-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w25-20020a170906385900b00a235f6782b5si1451215ejc.813.2023.12.19.05.41.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 05:41:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5270-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ClGsWkTw; spf=pass (google.com: domain of linux-kernel+bounces-5270-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5270-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6BA731F236BE for ; Tue, 19 Dec 2023 13:41:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 04917199AE; Tue, 19 Dec 2023 13:41:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ClGsWkTw" 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 22BF119471; Tue, 19 Dec 2023 13:41:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 508A6C433C7; Tue, 19 Dec 2023 13:41:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1702993310; bh=F6ar0VqlrkPhdaatE1FLgFCrEDi1gq3l55wVb/ojN9w=; h=From:To:Cc:Subject:Date:From; b=ClGsWkTw0Noy5KB0LJ5GhsqpJozgFV7MSyHlFPhrh96qDaajKX8+H2kqD9Svd3IxY CO+VR+Ca7wSECggtfKKf8o9u1tOErpLpw2qpgy/U7FSCVxKSseZVMhq+6dG0W6sej0 j0ih/zq0r/CTXT+WyY80ouDSt8T9Jak0Bz+ZTVck= From: Greg Kroah-Hartman To: hch@lst.de, m.szyprowski@samsung.com Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Robin Murphy , iommu@lists.linux.dev Subject: [PATCH] dma-debug: make dma_debug_add_bus take a const pointer Date: Tue, 19 Dec 2023 14:41:42 +0100 Message-ID: <2023121941-dejected-nugget-681e@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: 47 X-Developer-Signature: v=1; a=openpgp-sha256; l=1752; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=F6ar0VqlrkPhdaatE1FLgFCrEDi1gq3l55wVb/ojN9w=; b=owGbwMvMwCRo6H6F97bub03G02pJDKmNc6e2Hm2dtNjAb48Td1VWxdacZ2x//KI6RKMV169z+ xWxlC+hI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACby1ZFhnpb8PKZVb6RfbLzR dbF5He8WzqOFVgwLlsfOYvq1+UZnech0Y/21E1a5iT9PBAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit The driver core now can handle a const struct bus_type pointer, and the dma_debug_add_bus() call just passes on the pointer give to it to the driver core, so make this pointer const as well to allow everyone to use read-only struct bus_type pointers going forward. Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Cc: iommu@lists.linux.dev Signed-off-by: Greg Kroah-Hartman --- include/linux/dma-map-ops.h | 4 ++-- kernel/dma/debug.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/dma-map-ops.h b/include/linux/dma-map-ops.h index f2fc203fb8a1..e401f824a007 100644 --- a/include/linux/dma-map-ops.h +++ b/include/linux/dma-map-ops.h @@ -443,10 +443,10 @@ static inline void arch_teardown_dma_ops(struct device *dev) #endif /* CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS */ #ifdef CONFIG_DMA_API_DEBUG -void dma_debug_add_bus(struct bus_type *bus); +void dma_debug_add_bus(const struct bus_type *bus); void debug_dma_dump_mappings(struct device *dev); #else -static inline void dma_debug_add_bus(struct bus_type *bus) +static inline void dma_debug_add_bus(const struct bus_type *bus) { } static inline void debug_dma_dump_mappings(struct device *dev) diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c index 3de494375b7b..1a5c86dd87d5 100644 --- a/kernel/dma/debug.c +++ b/kernel/dma/debug.c @@ -876,7 +876,7 @@ static int dma_debug_device_change(struct notifier_block *nb, unsigned long acti return 0; } -void dma_debug_add_bus(struct bus_type *bus) +void dma_debug_add_bus(const struct bus_type *bus) { struct notifier_block *nb; -- 2.43.0