>> to be really necessary). So let's simply clear all queued
>> commands for the current device: */
>> - id = current_tag& 0x0000ff00;
>> - QTAILQ_FOREACH_SAFE(p,&s->queue, next, p_next) {
>> - if ((p->tag& 0x0000ff00) == id) {
>> - scsi_req_cancel(p->req);
>> + {
>> + int id;
>> +
>> + id = current_tag& 0x0000ff00;
>> + QTAILQ_FOREACH_SAFE(p,&s->queue, next, p_next) {
>> + if ((p->tag& 0x0000ff00) == id) {
>> + scsi_req_cancel(p->req);
>> + }
>> }
>> }
>>
>
> Why not keep id declared in the outer scope? This extra indentation is
> annoying.
Also the variable could be dropped altogether simply with:
if ((p->tag& 0x0000ff00) == (current_tag& 0x0000ff00)) {
I have no preference.