All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Henning P. Schmiedehausen" <hps@intermeta.de>
To: linux-kernel@vger.kernel.org
Subject: [2.6.11.7] switch fallthrough in scsi_ioctl.c ?
Date: Tue, 12 Apr 2005 08:02:22 +0000 (UTC)	[thread overview]
Message-ID: <d3fvae$b33$1@tangens.hometree.net> (raw)

Hi,

I just noticed that in scsi_ioctl.c (Kernel 2.6.11.7), there are fallthroughs
in the sshdr.sense_key switch (Line 124 and beyond):

[...]
		case NOT_READY:	/* This happens if there is no disc in drive */
			if (sdev->removable && (cmd[0] != TEST_UNIT_READY)) {
				printk(KERN_INFO "Device not ready. Make sure"
				       " there is a disc in the drive.\n");
				break;
			}

***** ---> Fallthrough there is device is not removeable or command is not TEST_UNIT_READY

		case UNIT_ATTENTION:
			if (sdev->removable) {
				sdev->changed = 1;
				sreq->sr_result = 0;	/* This is no longer considered an error */
				break;
			}

***** ---> Fallthrough there is device is not removeable

		default:	/* Fall through for non-removable media */
[...]

I was wondering if this is intentional and if yes, this should be
clearly marked as such (The usual /* FALLTHROUGH */). If this is
intentional, then the logic in this statement is seriously in need of
documentation... :-)

	Regards
		Henning




-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

"Now you can start with implementation and integration and do the
requirements later".  -- Prof. Dr. Dr. h.c. Manfred Broy about the new
german federal software development standard "V-Model XT" 
(found at http://de.biz.yahoo.com/050207/299/4en0t.html)

                 reply	other threads:[~2005-04-12  8:02 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='d3fvae$b33$1@tangens.hometree.net' \
    --to=hps@intermeta.de \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.