* [PATCH v2] s390/cio: use kobj_to_dev() API
@ 2020-02-14 13:51 qiwuchen55
2020-02-14 15:32 ` Cornelia Huck
2020-02-17 17:08 ` Vasily Gorbik
0 siblings, 2 replies; 3+ messages in thread
From: qiwuchen55 @ 2020-02-14 13:51 UTC (permalink / raw)
To: sebott, oberpar, heiko.carstens, gor, borntraeger
Cc: linux-s390, chenqiwu, chenqiwu
From: chenqiwu <chenqiwu@xiaomi.com>
Use kobj_to_dev() API instead of container_of().
Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
Signed-off-by: chenqiwu <qiwuchen55@gmail.com>
---
changes in v2:
- add signed off for my gmail adderss.
---
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] 3+ messages in thread
* Re: [PATCH v2] s390/cio: use kobj_to_dev() API
2020-02-14 13:51 [PATCH v2] s390/cio: use kobj_to_dev() API qiwuchen55
@ 2020-02-14 15:32 ` Cornelia Huck
2020-02-17 17:08 ` Vasily Gorbik
1 sibling, 0 replies; 3+ messages in thread
From: Cornelia Huck @ 2020-02-14 15:32 UTC (permalink / raw)
To: qiwuchen55
Cc: sebott, oberpar, heiko.carstens, gor, borntraeger, linux-s390,
chenqiwu
On Fri, 14 Feb 2020 21:51:33 +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>
> Signed-off-by: chenqiwu <qiwuchen55@gmail.com>
> ---
> changes in v2:
> - add signed off for my gmail adderss.
> ---
> 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] 3+ messages in thread
* Re: [PATCH v2] s390/cio: use kobj_to_dev() API
2020-02-14 13:51 [PATCH v2] s390/cio: use kobj_to_dev() API qiwuchen55
2020-02-14 15:32 ` Cornelia Huck
@ 2020-02-17 17:08 ` Vasily Gorbik
1 sibling, 0 replies; 3+ messages in thread
From: Vasily Gorbik @ 2020-02-17 17:08 UTC (permalink / raw)
To: qiwuchen55
Cc: sebott, oberpar, heiko.carstens, borntraeger, linux-s390,
chenqiwu
On Fri, Feb 14, 2020 at 09:51:33PM +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>
> Signed-off-by: chenqiwu <qiwuchen55@gmail.com>
> ---
> changes in v2:
> - add signed off for my gmail adderss.
> ---
> 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
>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-17 17:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-14 13:51 [PATCH v2] s390/cio: use kobj_to_dev() API qiwuchen55
2020-02-14 15:32 ` Cornelia Huck
2020-02-17 17:08 ` Vasily Gorbik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox