On Thu, 2018-08-02 at 11:05 +-0000, Avri Altman wrote: +AD4- -----Original Message----- +AD4- +AD4- From: Bart Van Assche +AD4- +AD4- Sent: Wednesday, August 01, 2018 6:28 PM +AD4- +AD4- +AFs- ... +AF0- +AD4- +AD4- +AD4- +- spin+AF8-unlock+AF8-irqrestore(host-+AD4-host+AF8-lock, flags)+ADs- +AD4- +AD4- +AD4- +- +AD4- +AD4- +AD4- +- /+ACo- wait until the task management command is completed +ACo-/ +AD4- +AD4- +AD4- +- err +AD0- wait+AF8-event+AF8-timeout(hba-+AD4-tm+AF8-wq, +AD4- +AD4- +AD4- +- test+AF8-bit(free+AF8-slot, +ACY-hba-+AD4-tm+AF8-condition), +AD4- +AD4- +AD4- +- msecs+AF8-to+AF8-jiffies(TM+AF8-CMD+AF8-TIMEOUT))+ADs- +AD4- +AD4- +AD4- +AD4- Did you perhaps start implementing the ufshcd+AF8-issue+AF8-tm+AF8-upiu+AF8-cmd() +AD4- +AD4- function by +AD4- +AD4- copy/pasting ufshcd+AF8-issue+AF8-tm+AF8-cmd()? Please don't do that and instead avoid +AD4- +AD4- code +AD4- +AD4- duplication by moving shared code in a new function. +AD4- +AD4- Yes I did. +AD4- I wanted to avoid changing any of the driver's core functionality, just adding the new one. That's not how it should be done. It is considered important in the Linux kernel to avoid code duplication so please have another look at how to avoid code duplication. Thanks, Bart.