* [PATCH 2/5] misc: cxl: use kobj_to_dev() [not found] <286d4d5f873437fbc91c07369b4b57038c4667ce.1452698603.git.geliangtang@163.com> @ 2016-01-13 15:30 ` Geliang Tang 2016-01-13 21:19 ` Michael Ellerman 2016-01-13 23:00 ` Andrew Donnellan 0 siblings, 2 replies; 3+ messages in thread From: Geliang Tang @ 2016-01-13 15:30 UTC (permalink / raw) To: Ian Munsie, Michael Neuling, Arnd Bergmann, Greg Kroah-Hartman Cc: Geliang Tang, linuxppc-dev, linux-kernel Use kobj_to_dev() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> --- drivers/misc/cxl/sysfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/misc/cxl/sysfs.c b/drivers/misc/cxl/sysfs.c index 02006f71..038af5d 100644 --- a/drivers/misc/cxl/sysfs.c +++ b/drivers/misc/cxl/sysfs.c @@ -386,8 +386,7 @@ static ssize_t afu_eb_read(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) { - struct cxl_afu *afu = to_cxl_afu(container_of(kobj, - struct device, kobj)); + struct cxl_afu *afu = to_cxl_afu(kobj_to_dev(kobj)); return cxl_afu_read_err_buffer(afu, buf, off, count); } @@ -467,7 +466,7 @@ static ssize_t afu_read_config(struct file *filp, struct kobject *kobj, loff_t off, size_t count) { struct afu_config_record *cr = to_cr(kobj); - struct cxl_afu *afu = to_cxl_afu(container_of(kobj->parent, struct device, kobj)); + struct cxl_afu *afu = to_cxl_afu(kobj_to_dev(kobj->parent)); u64 i, j, val; -- 2.5.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/5] misc: cxl: use kobj_to_dev() 2016-01-13 15:30 ` [PATCH 2/5] misc: cxl: use kobj_to_dev() Geliang Tang @ 2016-01-13 21:19 ` Michael Ellerman 2016-01-13 23:00 ` Andrew Donnellan 1 sibling, 0 replies; 3+ messages in thread From: Michael Ellerman @ 2016-01-13 21:19 UTC (permalink / raw) To: Geliang Tang, Ian Munsie, Michael Neuling, Arnd Bergmann, Greg Kroah-Hartman Cc: linuxppc-dev, linux-kernel On Wed, 2016-01-13 at 23:30 +0800, Geliang Tang wrote: > Use kobj_to_dev() instead of open-coding it. > > Signed-off-by: Geliang Tang <geliangtang@163.com> > --- > drivers/misc/cxl/sysfs.c | 5 ++--- Looks fine. Do you want me to merge it or just ack it? Acked-by: Michael Ellerman <mpe@ellerman.id.au> cheers ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/5] misc: cxl: use kobj_to_dev() 2016-01-13 15:30 ` [PATCH 2/5] misc: cxl: use kobj_to_dev() Geliang Tang 2016-01-13 21:19 ` Michael Ellerman @ 2016-01-13 23:00 ` Andrew Donnellan 1 sibling, 0 replies; 3+ messages in thread From: Andrew Donnellan @ 2016-01-13 23:00 UTC (permalink / raw) To: Geliang Tang, Ian Munsie, Michael Neuling, Arnd Bergmann, Greg Kroah-Hartman Cc: linuxppc-dev, linux-kernel On 14/01/16 02:30, Geliang Tang wrote: > Use kobj_to_dev() instead of open-coding it. > > Signed-off-by: Geliang Tang <geliangtang@163.com> Good simplification. Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> -- Andrew Donnellan Software Engineer, OzLabs andrew.donnellan@au1.ibm.com Australia Development Lab, Canberra +61 2 6201 8874 (work) IBM Australia Limited ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-13 23:02 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <286d4d5f873437fbc91c07369b4b57038c4667ce.1452698603.git.geliangtang@163.com> 2016-01-13 15:30 ` [PATCH 2/5] misc: cxl: use kobj_to_dev() Geliang Tang 2016-01-13 21:19 ` Michael Ellerman 2016-01-13 23:00 ` Andrew Donnellan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).