Messages in this thread Patch in this message |  | | From | Yang Li <> | Subject | [PATCH] pcmcia: Switch to using the new API kobj_to_dev() | Date | Tue, 23 Feb 2021 17:26:50 +0800 |
| |
fixed the following coccicheck: ./drivers/pcmcia/cistpl.c:1584:53-54: WARNING opportunity for kobj_to_dev()
Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> --- drivers/pcmcia/cistpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index cf109d9..7b296ba 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c @@ -1581,7 +1581,7 @@ static ssize_t pccard_store_cis(struct file *filp, struct kobject *kobj, if (error) return error; - s = to_socket(container_of(kobj, struct device, kobj)); + s = to_socket(kobj_to_dev(kobj)); if (off) return -EINVAL; -- 1.8.3.1
|  |