From patchwork Tue Nov 7 16:55:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13449117 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 61C43C4167B for ; Tue, 7 Nov 2023 16:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AQkgD0QUu92meEomlBJb0ymEpDGpMwsxAlqWnHCKTRE=; b=OhVxHLrUyTs+iI M2z6BSRxRQlS6wCVtlsdbw/J7u8nmsbs+buCI4nOCxiVmsNdd1Z5fQRj+5KLIDvlPPFT7cJrBxx4y xJ1pejIqCHu0s446n62zZspP/4EEp5gKoTp/p/N/qLzTrFUHVV2I9D1qaDhpL4q62wmVVApTrf7u7 ZweASTdqoASLova1k2RAGgrQbCvsH5uLO0bNbg+JcPuMt1x7UOF1EulWNlW9n+eM9LKjwil2cPQ2I kNdgUxFxQ9G0Fa3ghn7m+WMcgmIWUdPAixak74UcZtAzZCp8d6YcBZk8VQSQqYKfBMJBsiS1AYAua bbyZvDypY7DO9bcpDhyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0PMd-0022oH-3A; Tue, 07 Nov 2023 16:55:43 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0PMa-0022lo-08; Tue, 07 Nov 2023 16:55:42 +0000 Received: from umang.jain (unknown [103.251.226.96]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 499138CC; Tue, 7 Nov 2023 17:55:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1699376115; bh=1H6/Xs6rlQM2lcXsSBsc50FMtGsuBvxFv3yX7+RhGmA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YEYI598tvMB2spg0c8f5okp2xivKMIENKixTtnx69eZO6kF3XUhdB1nG3jgyGDjcd U9uyXVwSokq9cx42/V+HowPBzEU8bywZ1IE5nou93cLEJ/B+l2W+ePcDlCa4XIDSRn kI8K5oJdcO+BgOvqYwLRgpHNPP8CPMeU3tDZ+SJg= From: Umang Jain To: linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Cc: Stefan Wahren , Greg Kroah-Hartman , Dan Carpenter , Kieran Bingham , Laurent Pinchart , Dave Stevenson , Phil Elwell , "Ricardo B . Marliere" , Umang Jain Subject: [PATCH 1/2] staging: vc04_services: Use %p to log pointer address Date: Tue, 7 Nov 2023 11:55:22 -0500 Message-ID: <20231107165523.638555-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231107165523.638555-1-umang.jain@ideasonboard.com> References: <20231107165523.638555-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231107_085540_241652_C6BE860A X-CRM114-Status: UNSURE ( 7.95 ) X-CRM114-Notice: Please train this message. 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 Solves the following Smatch warnings: vchiq_arm.c:1113 service_callback() warn: argument 7 to %lx specifier is cast from pointer vchiq_arm.c:1113 service_callback() warn: argument 11 to %lx specifier is cast from pointer vchiq_arm.c:1113 service_callback() warn: argument 12 to %lx specifier is cast from pointer vchiq_arm.c:1113 service_callback() warn: argument 13 to %lx specifier is cast from pointer %p will print the hashed pointer to dynamic debug. In order to print the unmodified pointer address, one can use the `no_hash_pointers` via kernel parameters. Signed-off-by: Umang Jain --- .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 4a2023919f5f..34b8985a57e2 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -1111,11 +1111,10 @@ service_callback(struct vchiq_instance *instance, enum vchiq_reason reason, rcu_read_unlock(); dev_dbg(service->state->dev, - "%s: %s: %s - service %lx(%d,%p), reason %d, header %lx, instance %lx, bulk_userdata %lx\n", + "%s: %s: %s - service %p(%d,%p), reason %d, header %p, instance %p, bulk_userdata %p\n", log_cat(VCHIQ_ARM), log_type(TRACE), - __func__, (unsigned long)user_service, service->localport, - user_service->userdata, reason, (unsigned long)header, - (unsigned long)instance, (unsigned long)bulk_userdata); + __func__, user_service, service->localport, + user_service->userdata, reason, header, instance, bulk_userdata); if (header && user_service->is_vchi) { spin_lock(&msg_queue_spinlock); From patchwork Tue Nov 7 16:55:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13449118 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 1E3C7C4332F for ; Tue, 7 Nov 2023 16:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0SDg80hY7Pi6IHfFO25/NAT/L9YRcxwRURLCif8M3Ws=; b=Se9as62tRXbRas TojCrfBDAWvDmCxv4DbN8ItB0520cLZmQoE67Xl42a097M32ME9B9HQvYFqU2EN6JFjqtMOikNOtu mkFxUjep54O8588vdneFFHj4rTiPLDv8KBL9wc9md0/IiwhQ/Jr4wkms0ai1Ndq/WXuH16NPoiAwi v45JFXfu6zDSPqpAZqgrRzxqgvI6+xM+vvbOScEOkfv+2l+3byu58xNfgdozkXsy3DYoZmyJfM0Ie jWLFwPiK1z9Hq48LcDHNm1h2hReej2ujJTeZCskIIF4CABg4qwlh+FNarDDF4aW5L6eoEzD223QVe yNrA0DyZgXTvjG4O1abQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0PMh-0022oy-0E; Tue, 07 Nov 2023 16:55:47 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0PMb-0022mR-09; Tue, 07 Nov 2023 16:55:42 +0000 Received: from umang.jain (unknown [103.251.226.96]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C311E9CC; Tue, 7 Nov 2023 17:55:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1699376118; bh=SbvUXnDBOpBoaHTh7Ug+PnfVgeplXwBy5YpgCG7S3A0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h/KqH/DwlIh+9ZR+XREN/ECd0nlw16RccjVnd8F5/Ov4QYObm70JJKjZhaYAlAgHr 0DcZ6SCDGib7fBfIlY72Te7uC5upjNH6Vs0mtGxDO9UhxSe485rdfWM8XxX3BovXSb A0JghFWANuUCTczXRNO+cjBn34C4g9TLdRvxcFK8= From: Umang Jain To: linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Cc: Stefan Wahren , Greg Kroah-Hartman , Dan Carpenter , Kieran Bingham , Laurent Pinchart , Dave Stevenson , Phil Elwell , "Ricardo B . Marliere" , Umang Jain Subject: [PATCH 2/2] staging: vc04_services: Use %p to log pointer address Date: Tue, 7 Nov 2023 11:55:23 -0500 Message-ID: <20231107165523.638555-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231107165523.638555-1-umang.jain@ideasonboard.com> References: <20231107165523.638555-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231107_085541_225939_A677CC3B X-CRM114-Status: GOOD ( 10.30 ) 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 Solves the following Smatch warnings: vchiq_dev.c:1220 vchiq_release() warn: argument 7 to %lx specifier is cast from pointer %p will print the hashed pointer to dynamic debug. In order to print the unmodified pointer address, one can use the `no_hash_pointers` via kernel parameters. Signed-off-by: Umang Jain --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c index a64d6333cf0a..16e951b2570f 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c @@ -1217,9 +1217,9 @@ static int vchiq_release(struct inode *inode, struct file *file) int ret = 0; int i; - dev_dbg(state->dev, "%s: %s: %s: instance=%lx\n", + dev_dbg(state->dev, "%s: %s: %s: instance=%p\n", log_cat(VCHIQ_ARM), log_type(DEBUG), - __func__, (unsigned long)instance); + __func__, instance); if (!state) { ret = -EPERM;