diff mbox series

[07/36] target: Don't do tmr_notify on empty aborted list

Message ID 92ec6c71a200b42c1a70ba2054087da9715741c8.1657149962.git.Thinh.Nguyen@synopsys.com (mailing list archive)
State Superseded
Headers show
Series usb: gadget: f_tcm: Enhance UASP driver | expand

Commit Message

Thinh Nguyen July 6, 2022, 11:35 p.m. UTC
If there's no command to abort, just skip doing tmr_notify to an empty
list.

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
---
 drivers/target/target_core_tmr.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Dmitry Bogdanov July 7, 2022, 1:36 p.m. UTC | #1
Hi Thinh,

On Wed, Jul 06, 2022 at 04:35:07PM -0700, Thinh Nguyen wrote:
> If there's no command to abort, just skip doing tmr_notify to an empty
> list.
AFAIK, that was intentionaly:
https://lore.kernel.org/all/20200726153510.13077-3-bstroesser@ts.fujitsu.com/
   'If no commands were aborted, an empty list is supplied.'

 
> Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
> ---
>  drivers/target/target_core_tmr.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c
> index 724ddabda488..718d985e4860 100644
> --- a/drivers/target/target_core_tmr.c
> +++ b/drivers/target/target_core_tmr.c
> @@ -167,9 +167,6 @@ void core_tmr_abort_task(
>  		spin_unlock_irqrestore(&dev->queues[i].lock, flags);
>  	}
>  
> -	if (dev->transport->tmr_notify)
> -		dev->transport->tmr_notify(dev, TMR_ABORT_TASK, &aborted_list);
> -
>  	printk("ABORT_TASK: Sending TMR_FUNCTION_COMPLETE for ref_tag: %lld\n",
>  			tmr->ref_task_tag);
>  	tmr->response = TMR_FUNCTION_COMPLETE;
Thinh Nguyen July 8, 2022, 11:53 p.m. UTC | #2
On 7/7/2022, Dmitry Bogdanov wrote:
> Hi Thinh,
>
> On Wed, Jul 06, 2022 at 04:35:07PM -0700, Thinh Nguyen wrote:
>> If there's no command to abort, just skip doing tmr_notify to an empty
>> list.
> AFAIK, that was intentionaly:
> https://urldefense.com/v3/__https://lore.kernel.org/all/20200726153510.13077-3-bstroesser@ts.fujitsu.com/__;!!A4F2R9G_pg!dpvhptHJ68bm5bCAbothekKpcSln7nndX1oqG7PesbrKa3vx4Py68XwKd-SAg9hmYMdmW4AAK9cRe7vOva2wkN5-$
>     'If no commands were aborted, an empty list is supplied.'

I see. Thanks for pointing it out.

Thanks,
Thinh

>   
>> Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
>> ---
>>   drivers/target/target_core_tmr.c | 3 ---
>>   1 file changed, 3 deletions(-)
>>
>> diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c
>> index 724ddabda488..718d985e4860 100644
>> --- a/drivers/target/target_core_tmr.c
>> +++ b/drivers/target/target_core_tmr.c
>> @@ -167,9 +167,6 @@ void core_tmr_abort_task(
>>   		spin_unlock_irqrestore(&dev->queues[i].lock, flags);
>>   	}
>>   
>> -	if (dev->transport->tmr_notify)
>> -		dev->transport->tmr_notify(dev, TMR_ABORT_TASK, &aborted_list);
>> -
>>   	printk("ABORT_TASK: Sending TMR_FUNCTION_COMPLETE for ref_tag: %lld\n",
>>   			tmr->ref_task_tag);
>>   	tmr->response = TMR_FUNCTION_COMPLETE;
diff mbox series

Patch

diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c
index 724ddabda488..718d985e4860 100644
--- a/drivers/target/target_core_tmr.c
+++ b/drivers/target/target_core_tmr.c
@@ -167,9 +167,6 @@  void core_tmr_abort_task(
 		spin_unlock_irqrestore(&dev->queues[i].lock, flags);
 	}
 
-	if (dev->transport->tmr_notify)
-		dev->transport->tmr_notify(dev, TMR_ABORT_TASK, &aborted_list);
-
 	printk("ABORT_TASK: Sending TMR_FUNCTION_COMPLETE for ref_tag: %lld\n",
 			tmr->ref_task_tag);
 	tmr->response = TMR_FUNCTION_COMPLETE;