From patchwork Thu Dec 7 08:38:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 751548 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="IzW5iYKB" Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ACA310C3 for ; Thu, 7 Dec 2023 00:38:48 -0800 (PST) Received: from umang.jain (unknown [103.251.226.79]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E3A7CB90; Thu, 7 Dec 2023 09:38:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701938285; bh=GuGw+LT7WjP9W1RXq84kTQWeC0YJnXrkQxHOAgp1UF0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IzW5iYKB+18Ayv59v7KMgX4dmzXmB56MQnzIcXtJdKBKt+39cl7HysP8nBynNU/wh RmG9Z74ukJpa3Y6Ebftl0HwrGguhoAiSx/iSLLNqI9S7wOcwLSJOv/ieWDVhnbibUz /oR3CDV/Qt811a8OriSz9bqpT69fOyn+uPI1A+5c= From: Umang Jain To: linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Stefan Wahren , Greg Kroah-Hartman , Dan Carpenter , Kieran Bingham , "Ricardo B . Marliere" , Umang Jain Subject: [PATCH v3 1/2] staging: vc04_services: vchiq_arm: Use %p to log pointer address Date: Thu, 7 Dec 2023 14:08:36 +0530 Message-ID: <20231207083837.153843-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231207083837.153843-1-umang.jain@ideasonboard.com> References: <20231207083837.153843-1-umang.jain@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 4b4ff469d3a3..1579bd4e5263 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -1088,10 +1088,9 @@ service_callback(struct vchiq_instance *instance, enum vchiq_reason reason, rcu_read_unlock(); dev_dbg(service->state->dev, - "arm: 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: 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 Thu Dec 7 08:38:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 751938 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="CoRiCgCA" Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D4AB10E3 for ; Thu, 7 Dec 2023 00:38:50 -0800 (PST) Received: from umang.jain (unknown [103.251.226.79]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 171C9669; Thu, 7 Dec 2023 09:38:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701938287; bh=D3D1TD9ac0JkckHnvb2sD5MkPEbDyC1GqVp0zg7uxc8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CoRiCgCAt3YVtv6/QNL1wTa+oIeCikbKPq8LhTP3nuVaJh4sxkl+yRz3V+UvZMm+Q 2/Pw4JHvqHWc4mpd0wO8y0miXRKf7/8YmifYKjhmPmw8/0o9JuOFLyuhmTE3Fo/nZq F9GOiK4231mO9wgV0TAvNo4koBfg9rj1E/qyXiUk= From: Umang Jain To: linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Stefan Wahren , Greg Kroah-Hartman , Dan Carpenter , Kieran Bingham , "Ricardo B . Marliere" , Umang Jain Subject: [PATCH v3 2/2] staging: vc04_services: vchiq_dev: Use %p to log pointer address Date: Thu, 7 Dec 2023 14:08:37 +0530 Message-ID: <20231207083837.153843-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231207083837.153843-1-umang.jain@ideasonboard.com> References: <20231207083837.153843-1-umang.jain@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 68c8897c504c..4d9deeeb637a 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: instance=%lx\n", (unsigned long)instance); + dev_dbg(state->dev, "arm: instance=%p\n", instance); if (!state) { ret = -EPERM;