public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6.11.7] switch fallthrough in scsi_ioctl.c ?
@ 2005-04-12  8:02 Henning P. Schmiedehausen
  0 siblings, 0 replies; only message in thread
From: Henning P. Schmiedehausen @ 2005-04-12  8:02 UTC (permalink / raw)
  To: linux-kernel

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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-12  8:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-12  8:02 [2.6.11.7] switch fallthrough in scsi_ioctl.c ? Henning P. Schmiedehausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox