* [PATCH] s390/cio: use kobj_to_dev() API
@ 2020-02-14 12:45 qiwuchen55
2020-02-14 13:12 ` Cornelia Huck
0 siblings, 1 reply; 2+ messages in thread
From: qiwuchen55 @ 2020-02-14 12:45 UTC (permalink / raw)
To: sebott, oberpar, heiko.carstens, gor, borntraeger; +Cc: linux-s390, chenqiwu
From: chenqiwu <chenqiwu@xiaomi.com>
Use kobj_to_dev() API instead of container_of().
Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
---
drivers/s390/cio/chp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c
index 51038ec..dfcbe54 100644
--- a/drivers/s390/cio/chp.c
+++ b/drivers/s390/cio/chp.c
@@ -135,7 +135,7 @@ static ssize_t chp_measurement_chars_read(struct file *filp,
struct channel_path *chp;
struct device *device;
- device = container_of(kobj, struct device, kobj);
+ device = kobj_to_dev(kobj);
chp = to_channelpath(device);
if (chp->cmg == -1)
return 0;
@@ -184,7 +184,7 @@ static ssize_t chp_measurement_read(struct file *filp, struct kobject *kobj,
struct device *device;
unsigned int size;
- device = container_of(kobj, struct device, kobj);
+ device = kobj_to_dev(kobj);
chp = to_channelpath(device);
css = to_css(chp->dev.parent);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] s390/cio: use kobj_to_dev() API
2020-02-14 12:45 [PATCH] s390/cio: use kobj_to_dev() API qiwuchen55
@ 2020-02-14 13:12 ` Cornelia Huck
0 siblings, 0 replies; 2+ messages in thread
From: Cornelia Huck @ 2020-02-14 13:12 UTC (permalink / raw)
To: qiwuchen55
Cc: sebott, oberpar, heiko.carstens, gor, borntraeger, linux-s390,
chenqiwu
On Fri, 14 Feb 2020 20:45:57 +0800
qiwuchen55@gmail.com wrote:
> From: chenqiwu <chenqiwu@xiaomi.com>
>
> Use kobj_to_dev() API instead of container_of().
>
> Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
I think you should also include the s-o-b from your gmail address here?
> ---
> drivers/s390/cio/chp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-14 13:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-14 12:45 [PATCH] s390/cio: use kobj_to_dev() API qiwuchen55
2020-02-14 13:12 ` Cornelia Huck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox