Message ID | 20191217210314.20410-4-pierre-louis.bossart@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | soundwire: intel: implement new ASoC interfaces | expand |
On 17-12-19, 15:03, Pierre-Louis Bossart wrote: > Align with previous renames and shorten macro > > No functionality change > > Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> > --- > drivers/soundwire/bus_type.c | 9 ++++----- > include/linux/soundwire/sdw_type.h | 3 ++- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c > index c0585bcc8a41..2b2830b622fa 100644 > --- a/drivers/soundwire/bus_type.c > +++ b/drivers/soundwire/bus_type.c > @@ -34,7 +34,7 @@ sdw_get_device_id(struct sdw_slave *slave, struct sdw_driver *drv) > static int sdw_bus_match(struct device *dev, struct device_driver *ddrv) > { > struct sdw_slave *slave = to_sdw_slave_device(dev); > - struct sdw_driver *drv = drv_to_sdw_slave_driver(ddrv); > + struct sdw_driver *drv = to_sdw_slave_driver(ddrv); so patch 1 does: - struct sdw_driver *drv = drv_to_sdw_driver(dev->driver); + struct sdw_driver *drv = drv_to_sdw_slave_driver(dev->driver); and here we move drv_to_sdw_slave_driver to to_sdw_slave_driver... why not do this in first patch and save step1... or did i miss something??
On 12/27/19 1:00 AM, Vinod Koul wrote: > On 17-12-19, 15:03, Pierre-Louis Bossart wrote: >> Align with previous renames and shorten macro >> >> No functionality change >> >> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> >> --- >> drivers/soundwire/bus_type.c | 9 ++++----- >> include/linux/soundwire/sdw_type.h | 3 ++- >> 2 files changed, 6 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c >> index c0585bcc8a41..2b2830b622fa 100644 >> --- a/drivers/soundwire/bus_type.c >> +++ b/drivers/soundwire/bus_type.c >> @@ -34,7 +34,7 @@ sdw_get_device_id(struct sdw_slave *slave, struct sdw_driver *drv) >> static int sdw_bus_match(struct device *dev, struct device_driver *ddrv) >> { >> struct sdw_slave *slave = to_sdw_slave_device(dev); >> - struct sdw_driver *drv = drv_to_sdw_slave_driver(ddrv); >> + struct sdw_driver *drv = to_sdw_slave_driver(ddrv); > > so patch 1 does: > > - struct sdw_driver *drv = drv_to_sdw_driver(dev->driver); > + struct sdw_driver *drv = drv_to_sdw_slave_driver(dev->driver); > > and here we move drv_to_sdw_slave_driver to to_sdw_slave_driver... why > not do this in first patch and save step1... or did i miss something?? because patch1 introduces replaces 'sdw_' by 'sdw_slave_' in several places, not just for drv_to_sdw_driver() I can squash all these patches if you want to but then you'll tell me one step at a time...
On 27-12-19, 17:23, Pierre-Louis Bossart wrote: > > > On 12/27/19 1:00 AM, Vinod Koul wrote: > > On 17-12-19, 15:03, Pierre-Louis Bossart wrote: > > > Align with previous renames and shorten macro > > > > > > No functionality change > > > > > > Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> > > > --- > > > drivers/soundwire/bus_type.c | 9 ++++----- > > > include/linux/soundwire/sdw_type.h | 3 ++- > > > 2 files changed, 6 insertions(+), 6 deletions(-) > > > > > > diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c > > > index c0585bcc8a41..2b2830b622fa 100644 > > > --- a/drivers/soundwire/bus_type.c > > > +++ b/drivers/soundwire/bus_type.c > > > @@ -34,7 +34,7 @@ sdw_get_device_id(struct sdw_slave *slave, struct sdw_driver *drv) > > > static int sdw_bus_match(struct device *dev, struct device_driver *ddrv) > > > { > > > struct sdw_slave *slave = to_sdw_slave_device(dev); > > > - struct sdw_driver *drv = drv_to_sdw_slave_driver(ddrv); > > > + struct sdw_driver *drv = to_sdw_slave_driver(ddrv); > > > > so patch 1 does: > > > > - struct sdw_driver *drv = drv_to_sdw_driver(dev->driver); > > + struct sdw_driver *drv = drv_to_sdw_slave_driver(dev->driver); > > > > and here we move drv_to_sdw_slave_driver to to_sdw_slave_driver... why > > not do this in first patch and save step1... or did i miss something?? > > because patch1 introduces replaces 'sdw_' by 'sdw_slave_' in several places, > not just for drv_to_sdw_driver() > > I can squash all these patches if you want to but then you'll tell me one > step at a time... Yes but that does not mean we add an intermediate step just to remove it later... So please remove the instances of drv_to_sdw_slave_driver() in patch1 and move them to patch3 (this) and convert to to_sdw_slave_driver() Thanks
diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c index c0585bcc8a41..2b2830b622fa 100644 --- a/drivers/soundwire/bus_type.c +++ b/drivers/soundwire/bus_type.c @@ -34,7 +34,7 @@ sdw_get_device_id(struct sdw_slave *slave, struct sdw_driver *drv) static int sdw_bus_match(struct device *dev, struct device_driver *ddrv) { struct sdw_slave *slave = to_sdw_slave_device(dev); - struct sdw_driver *drv = drv_to_sdw_slave_driver(ddrv); + struct sdw_driver *drv = to_sdw_slave_driver(ddrv); return !!sdw_get_device_id(slave, drv); } @@ -70,7 +70,7 @@ EXPORT_SYMBOL_GPL(sdw_bus_type); static int sdw_drv_probe(struct device *dev) { struct sdw_slave *slave = to_sdw_slave_device(dev); - struct sdw_driver *drv = drv_to_sdw_slave_driver(dev->driver); + struct sdw_driver *drv = to_sdw_slave_driver(dev->driver); const struct sdw_device_id *id; int ret; @@ -116,8 +116,7 @@ static int sdw_drv_probe(struct device *dev) static int sdw_drv_remove(struct device *dev) { struct sdw_slave *slave = to_sdw_slave_device(dev); - struct sdw_driver *drv = drv_to_sdw_slave_driver(dev->driver); - + struct sdw_driver *drv = to_sdw_slave_driver(dev->driver); int ret = 0; if (drv->remove) @@ -131,7 +130,7 @@ static int sdw_drv_remove(struct device *dev) static void sdw_drv_shutdown(struct device *dev) { struct sdw_slave *slave = to_sdw_slave_device(dev); - struct sdw_driver *drv = drv_to_sdw_slave_driver(dev->driver); + struct sdw_driver *drv = to_sdw_slave_driver(dev->driver); if (drv->shutdown) drv->shutdown(slave); diff --git a/include/linux/soundwire/sdw_type.h b/include/linux/soundwire/sdw_type.h index abaa21278152..7d4bc6a979bf 100644 --- a/include/linux/soundwire/sdw_type.h +++ b/include/linux/soundwire/sdw_type.h @@ -6,7 +6,7 @@ extern struct bus_type sdw_bus_type; -#define drv_to_sdw_slave_driver(_drv) \ +#define to_sdw_slave_driver(_drv) \ container_of(_drv, struct sdw_driver, driver) #define sdw_register_slave_driver(drv) \ @@ -29,4 +29,5 @@ int sdw_slave_modalias(const struct sdw_slave *slave, char *buf, size_t size); #define module_sdw_driver(__sdw_slave_driver) \ module_driver(__sdw_slave_driver, sdw_register_slave_driver, \ sdw_unregister_slave_driver) + #endif /* __SOUNDWIRE_TYPES_H */
Align with previous renames and shorten macro No functionality change Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> --- drivers/soundwire/bus_type.c | 9 ++++----- include/linux/soundwire/sdw_type.h | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-)