Hi Bart, On Fri, 2020-05-15 at 12:28 -0700, Bart Van Assche wrote: > On 2020-05-08 09:27, Asutosh Das (asd) wrote: > > On 5/7/2020 3:27 PM, Bart Van Assche wrote: > >> The ufshcd_wait_for_register() function either sleeps or spins until the > >> specified register has reached the desired value. Busy-waiting is not > >> only considered a bad practice but also has a bad impact on energy > >> consumption. Always sleep instead of spinning by making sure that all > >> ufshcd_wait_for_register() calls happen from a context where it is > >> allowed to sleep. The only function call that has to be moved is the > >> ufshcd_hba_stop() call in ufshcd_host_reset_and_restore(). > >> > >> Cc: Can Guo <cang@xxxxxxxxxxxxxx> > >> Cc: Avri Altman <avri.altman@xxxxxxx> > >> Cc: Bean Huo <beanhuo@xxxxxxxxxx> > >> Cc: Alim Akhtar <alim.akhtar@xxxxxxxxxxx> > >> Cc: Asutosh Das <asutoshd@xxxxxxxxxxxxxx> > >> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> Reviewed-by: Stanley Chu <stanley.chu@xxxxxxxxxxxx>