From patchwork Fri Jul 12 09:39:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 13731537 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A532C2BD09 for ; Fri, 12 Jul 2024 09:39:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=OWfiRTdWU3QhKj94Dg7ihS/KUpQi4sF9soVom61dlj4=; b=H1WYEiPqQ8r4vuVh65RL0Zus1U vvTWjw0AlVJgmENTcwliXxsmc78GrI+LSc5PijfNbK0+fSFvewXOP3ZtQtJByQDK3UOQGwmTHEdYz MMf8PAojoRKp9CxU9kzf9k/NtqWJ5nYU2f/ZHBsuWmFvBd3vyEq6ICLfNE7eWghWV+FwYlh6s0veO sjlY6NoXncwf4jEL4wYVyQ3FWuVSfQ+fHymXXX89CZTzvtH/79/2DrBM3vdIzX9zHOVbbRRZU+6/Q ZDIEs5l8oiJyZ0o2/odSG2lGXkldt2QvHh9+hj9/CHdUqzS8OoXdXaVDzH91yOgoPwf2AFQITHyF2 EKZMvdvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSCkh-0000000H8x9-10PT; Fri, 12 Jul 2024 09:39:43 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSCkO-0000000H8rU-16G4 for linux-arm-kernel@lists.infradead.org; Fri, 12 Jul 2024 09:39:25 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 8D38BCE0205; Fri, 12 Jul 2024 09:39:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7470FC32782; Fri, 12 Jul 2024 09:39:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1720777161; bh=ABBFD44TlD2+CFl0N8Dv7XBTTUHJ1evLqOSfbZ3nsuE=; h=From:To:Cc:Subject:Date:From; b=F/rlRtElVtoEZ3B2O/SjnsFLnq42sKglsRTmpL8s79B+SXRcjUogcQ7RsgeP3lfyU t/v0f7dj1HicIGbAsK9eIdneP/CzQMWdMTqGlnnoP5W9M1ZgCLbWzxxFq+en6CXT+p i0Cm7a7HxwhZtB2NlYnvmYtrmP//hFUa323k+MUc= From: Greg Kroah-Hartman To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Russell King , kernel test robot Subject: [PATCH] ARM: sa1100: make match function take a const pointer Date: Fri, 12 Jul 2024 11:39:17 +0200 Message-ID: <20240712093916.2121096-2-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2016; i=gregkh@linuxfoundation.org; h=from:subject; bh=ABBFD44TlD2+CFl0N8Dv7XBTTUHJ1evLqOSfbZ3nsuE=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkTfh7ptXnaevlhvdvkYn7e51etrorfiHz9tOqm9Z6kj hns2dW7OmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAipyoZFpzIX5/yfaXwZsEL L5757L2WsHf9ziyGOZwNGz/lPE67I7/mb3KHYUJa1UlhDQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240712_023924_497623_C0D1FCCB X-CRM114-Status: GOOD ( 13.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In commit d69d80484598 ("driver core: have match() callback in struct bus_type take a const *"), the match callback for busses was changed to take a const pointer to struct device_driver. Unfortunately I missed fixing up the sa1111 code, and was only noticed after-the-fact by the kernel test robot. Resolve this issue by properly changing the sa111_match() function. Cc: Russell King Fixes: d69d80484598 ("driver core: have match() callback in struct bus_type take a const *") Reported-by: kernel test robot Signed-off-by: Greg Kroah-Hartman --- arch/arm/common/sa1111.c | 4 ++-- arch/arm/include/asm/hardware/sa1111.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 1fbd7363cf11..550978dc3c50 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -1339,10 +1339,10 @@ EXPORT_SYMBOL_GPL(sa1111_get_irq); * We model this as a regular bus type, and hang devices directly * off this. */ -static int sa1111_match(struct device *_dev, struct device_driver *_drv) +static int sa1111_match(struct device *_dev, const struct device_driver *_drv) { struct sa1111_dev *dev = to_sa1111_device(_dev); - struct sa1111_driver *drv = SA1111_DRV(_drv); + const struct sa1111_driver *drv = SA1111_DRV(_drv); return !!(dev->devid & drv->devid); } diff --git a/arch/arm/include/asm/hardware/sa1111.h b/arch/arm/include/asm/hardware/sa1111.h index d8c6f8a99dfa..a815f39b4243 100644 --- a/arch/arm/include/asm/hardware/sa1111.h +++ b/arch/arm/include/asm/hardware/sa1111.h @@ -404,7 +404,7 @@ struct sa1111_driver { void (*remove)(struct sa1111_dev *); }; -#define SA1111_DRV(_d) container_of((_d), struct sa1111_driver, drv) +#define SA1111_DRV(_d) container_of_const((_d), struct sa1111_driver, drv) #define SA1111_DRIVER_NAME(_sadev) ((_sadev)->dev.driver->name)