staging: vc04_services: vchiq_dev: Use %p to log pointer address
authorUmang Jain <umang.jain@ideasonboard.com>
Thu, 7 Dec 2023 08:38:37 +0000 (14:08 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Dec 2023 14:06:35 +0000 (15:06 +0100)
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 <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20231207083837.153843-3-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c

index 68c8897c504c3aeaef79c6c1e32f587c4f403a34..4d9deeeb637aacede3d72c920a93ae10efb3cf11 100644 (file)
@@ -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;