mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicholas Mc Guire <der.herr@hofr.at>
To: dc395x@twibble.org
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: possible if/else bug in dc395x.c
Date: Sun, 16 Oct 2016 17:26:47 +0000	[thread overview]
Message-ID: <20161016172647.GA26334@osadl.at> (raw)


Hi !

in drivers/scsi/dc395x.c:srb_done()
3387                 if (srb->total_xfer_length
3388                     && srb->total_xfer_length >= cmd->underflow)
3389                         cmd->result =
3390                             MK_RES_LNX(DRIVER_SENSE, DID_OK,
3391                                        srb->end_message, CHECK_CONDITION);
3392                 /*SET_RES_DID(cmd->result,DID_OK) */
3393                 else
3394                         cmd->result =
3395                             MK_RES_LNX(DRIVER_SENSE, DID_OK,
3396                                        srb->end_message, CHECK_CONDITION);
(line numbers from 4.9.0-rc1, localversion-next next-20161016) 

The if and else are identical, these lines date back to pre-git (so git blame
assigns them to the initial 2.6.12-rc2 import).

Not sure if it makes much sense trying to fix up something like this at all
is it worth trying to figure out what this should be ? I would asume that 
given that this survived atleast 12 years in this form that the condition 
could be removed and the cmd-> result set unconditionally here. 

thx!
hofrat

                 reply	other threads:[~2016-10-16 17:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161016172647.GA26334@osadl.at \
    --to=der.herr@hofr.at \
    --cc=dc395x@twibble.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome