在 2020/9/19 5:09, wsa@xxxxxxxxxx 写道:
I think two lines have better readability, and if you prefer one line, I can send v2 to fix that!static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) { - struct device * const dev = container_of(kobj, struct device, kobj); + struct device * const dev = kobj_to_dev(kobj); return to_i2c_client(dev);Can't we make this a oneliner then merging the last two lines?