On Thu, 2018-08-02 at 11:05 +0000, Avri Altman wrote:
> -----Original Message-----
> > From: Bart Van Assche
> > Sent: Wednesday, August 01, 2018 6:28 PM
> > [ ... ]
> > > + spin_unlock_irqrestore(host->host_lock, flags);
> > > +
> > > + /* wait until the task management command is completed */
> > > + err = wait_event_timeout(hba->tm_wq,
> > > +                 test_bit(free_slot, &hba->tm_condition),
> > > +                 msecs_to_jiffies(TM_CMD_TIMEOUT));
> > 
> > Did you perhaps start implementing the ufshcd_issue_tm_upiu_cmd()
> > function by
> > copy/pasting ufshcd_issue_tm_cmd()? Please don't do that and instead avoid
> > code
> > duplication by moving shared code in a new function.
> 
> Yes I did.
> 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.

Reply via email to