Hi Mark, Le Friday 14 February 2014 à 15:03 +0000, Mark Brown a écrit : > On Thu, Feb 13, 2014 at 03:28:41PM +0100, Jean Delvare wrote: > > While backporting 33cf00e5 ("spi: attach/detach SPI device to the ACPI > > power domain"), I noticed that the code changes were suboptimal: > > > > * Why use &spi->dev when we have dev at hand? > > > > * After fixing the above, spi is used only once, so we don't really > > need a local variable for it. > > I've applied this but I have to say it's a bit marginal as a cleanup - > for example while we do only use the SPI device once it's not entirely > idiomatic to use to_spi_device() in the middle of the code rather than > at the top of the function so it's a small speed bump to see that. I don't disagree. The rationale for the change is that I simply reverted to how the code was before 33cf00e5, assuming that the introduction of spi as a local variable was caused by it being used more than once. If you believe this was a good change on its own and would prefer to keep it that way, I could send a patch replacing this one and only changing &spi->dev to dev. Let me know. And yes, this is not the most groundbreaking patch either way, granted ;-) -- Jean Delvare Suse L3 Support -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html