Re: [PATCH 10/21] uas: zap_pending: data urbs should have completed at this time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 09/10/2014 04:10 PM, Oliver Neukum wrote:
> On Wed, 2014-09-10 at 13:46 +0200, Hans de Goede wrote:
>>                 uas_log_cmd_state(cmnd, __func__);
>> -               /* all urbs are killed, clear inflight bits */
>> -               cmdinfo->state &= ~(COMMAND_INFLIGHT |
>> -                                   DATA_IN_URB_INFLIGHT |
>> -                                   DATA_OUT_URB_INFLIGHT);
>> +               /* Sense urbs were killed, clear COMMAND_INFLIGHT
>> manually */
>> +               cmdinfo->state &= ~COMMAND_INFLIGHT;
>>                 cmnd->result = result << 16;
>> -               uas_try_complete(cmnd, __func__);
>> +               WARN_ON(uas_try_complete(cmnd, __func__) != 0);
> 
> That looks like very bad style. WARN_ON() shouldn't
> have side effects.

A valid point, I'll respin this patch to store the result and check it
separately.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux