From patchwork Tue Nov 28 20:20:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13471735 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 3393FC4167B for ; Tue, 28 Nov 2023 20:20:59 +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=A08ZQbIhVdydunP/CKCVKI0IGeBbq7neAPm7lcExMk4=; b=IGmxAfrJdOsfhr r6SGZpozxxgTBy06ZNLMBLJ5D2f0TAZZHLiZuPK5G9tIGqAD+E5r3JuIJ7LrM5Gpml1RbYzl6VNMI WdkSO3kq/60PEKYkDlozHAaTSX8J/0eJG3NWaonauE1H/ldXclsiMyo3XRh70i6YqV+2DwIKHEsXV Hp6IWbrL9JIDLnXORx8/5GqALtuOo0GzSVnAnwbh96ZHZ72ibghOyawld6uNsUiA1qV/3BuLkX+4C KTbG5Id8zUm/6xLx6Y/UaS4ixUnp4qlBTddCycYtppMRFhe6RvcGfdph7jAtPTArMqlGxUvVXggqW Wdx8ztJaJC3fKluvkirQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r84ZP-006FdG-2E; Tue, 28 Nov 2023 20:20:35 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r84ZA-006FV9-22; Tue, 28 Nov 2023 20:20:22 +0000 Received: from umang.jain (unknown [103.238.109.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 45631158A; Tue, 28 Nov 2023 21:19:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701202784; bh=wkKoLQqcNpQyUihe4/du08ibvxXUylUKuvuP3TR35/o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q5OiIzWli8CCUMsatd/uBZo33Y82CJoqPuRC4rjE6/uEp7xWijdlr1aLnG8X99JQp 3Zm9091lSes7xBfv7wYM7+5sBTTxVcsBIelsjb8Ivm7zWek1GIVO78QpyL1ykfxPnP k+9JTZzN0E41CdKcmq7id2mzHVSn1/cNX5XkjE40= 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 , "Ricardo B . Marliere" , Umang Jain Subject: [PATCH v2 1/2] staging: vc04_services: Use %p to log pointer address Date: Wed, 29 Nov 2023 01:50:06 +0530 Message-ID: <20231128202007.489294-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231128202007.489294-1-umang.jain@ideasonboard.com> References: <20231128202007.489294-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-20231128_122020_809116_1EEE8F3D X-CRM114-Status: UNSURE ( 8.43 ) 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: service_callback() warn: argument 7 to %lx specifier is cast from pointer service_callback() warn: argument 11 to %lx specifier is cast from pointer service_callback() warn: argument 12 to %lx specifier is cast from pointer 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 0db5541e42cb..600beea50453 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -1087,10 +1087,9 @@ service_callback(struct vchiq_instance *instance, enum vchiq_reason reason, rcu_read_unlock(); dev_dbg(service->state->dev, - "arm: trace: service %lx(%d,%p), reason %d, header %lx, instance %lx, bulk_userdata %lx\n", - (unsigned long)user_service, service->localport, - user_service->userdata, reason, (unsigned long)header, - (unsigned long)instance, (unsigned long)bulk_userdata); + "arm: trace: service %p(%d,%p), reason %d, header %p, instance %p, bulk_userdata %p\n", + 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 28 20:20:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13471736 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 2D25BC4167B for ; Tue, 28 Nov 2023 20:21:07 +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=uyif9/dfeOBK8GDaSB1sIakm+L4PSuywYJM1Xxzlak0=; b=BPgUBg9T/OhY3+ FCiwLDdYzmYglvbX/MoXdaiXDk7tOW6IJxVdz/k7PRguqKSE7VMTkVhUAN48tVV0rAW2cTY1iX2cm V9IL1Y0qItUiSScqfqkhnGbZUlhpe/Df23eX2AkacSmymyE0A27DfdNpyUq1rUrt62TdQkh+uc/0D v/zOfWm2/QdawgrCxnOfLmV4eI9aPHJlnhssYN2m6QYq+RS1Kqukam42MmxxywlgxXgAGkf4P8ceP I5Utr9zjEhusI31yx0Rf8la2WTEjQip1ckdVlNt7VLoNSjfaLubt1DVuMCU18S5fdLOvAZ3oWAZmh JAQT3HWAACTRFiuiaohA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r84ZW-006Fgl-2o; Tue, 28 Nov 2023 20:20:42 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r84ZE-006FX6-0k; Tue, 28 Nov 2023 20:20:25 +0000 Received: from umang.jain (unknown [103.238.109.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D03C6BEB; Tue, 28 Nov 2023 21:19:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701202787; bh=2CeZ4QxoP/jx5RZoQYRPw8XC+W8zuF3M8VyznMS1wpw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K1C93fjQwEgki9DxhVcFumlDjCrkveuMXnLUPiWDNbMeBjt9MHpOi9mWDxZuK1zGC UsJA/1LvaYbe3pxLWh6y9ffb531NGa9toixi4CFV+uDC3wZlBJgCcJ+pznN+k8d+Jd nxIzrS42rctrPzCNx8cdKxitUYCWbz+J6o0N14Qc= 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 , "Ricardo B . Marliere" , Umang Jain Subject: [PATCH v2 2/2] staging: vc04_services: Use %p to log pointer address Date: Wed, 29 Nov 2023 01:50:07 +0530 Message-ID: <20231128202007.489294-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231128202007.489294-1-umang.jain@ideasonboard.com> References: <20231128202007.489294-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-20231128_122024_418832_01B957E8 X-CRM114-Status: GOOD ( 10.80 ) 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_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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 98a60fee3d9a..3e3bf842d20e 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c @@ -1201,7 +1201,7 @@ static int vchiq_release(struct inode *inode, struct file *file) int ret = 0; int i; - dev_dbg(state->dev, "arm: debug: instance=%lx\n", (unsigned long)instance); + dev_dbg(state->dev, "arm: debug: instance=%p\n", instance); if (!state) { ret = -EPERM;