staging: vme_user: Remove printk() in find_bridge()
authorSoumya Negi <soumya.negi97@gmail.com>
Fri, 20 Oct 2023 01:55:21 +0000 (18:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Oct 2023 10:02:36 +0000 (12:02 +0200)
Don't log error message in find_bridge(). The printk() triggers a
checkpatch warning:
    WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then
             dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

It can't be replaced by dev_err() & using pr_err() is not helpful as it
doesn't give much context to the user. It is better to remove it.

Signed-off-by: Soumya Negi <soumya.negi97@gmail.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/028725ebbc522f73c39f5b1ec4cc2bdbdf588971.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vme_user/vme.c

index c36c2dc095c55bc4abc6b0bb3145f4187b5374f6..5efcdf15a068c38bd7c2b461cb31c0a88854c01b 100644 (file)
@@ -62,7 +62,6 @@ static struct vme_bridge *find_bridge(struct vme_resource *resource)
                return list_entry(resource->entry, struct vme_lm_resource,
                        list)->parent;
        default:
-               printk(KERN_ERR "Unknown resource type\n");
                return NULL;
        }
 }