Skip to contentSkip to conversation

ide: missing break statement in set_timings_mdma()

PATCH Applied Dan Carpenter 3 participants 3 messages Jul 14, 2016 – Jul 26, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ide: missing break statement in set_timings_mdma()

There was clearly supposed to be a break statement here. Currently we use the k2 ata timings instead of sh ata ones we intended. Probably no one has this hardware anymore so it likely doesn't make a difference beyond the static checker warning.

drivers/ide/pmac.c +1 -0
index 7f0434f..0c5d3a9 100644
@@ -707,6 +707,7 @@ set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2,
 		*timings = ((*timings) & ~TR_133_PIOREG_MDMA_MASK) | tr;
 		*timings2 = (*timings2) & ~TR_133_UDMAREG_UDMA_EN;
 		}
+		break;
 	case controller_un_ata6:
 	case controller_k2_ata6: {
 		/* 100Mhz cell */
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Dan Carpenter

There was clearly supposed to be a break statement here.  Currently we use the k2 ata timings instead of sh ata ones we intended.  Probably no one has this hardware anymore so it likely doesn't make a difference beyond the static checker warning.

Should probably also:

Quoted 12 lines
drivers/ide/pmac.c +1 -0
index 7f0434f..0c5d3a9 100644
@@ -707,6 +707,7 @@ set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2,
  		*timings = ((*timings) & ~TR_133_PIOREG_MDMA_MASK) | tr;
  		*timings2 = (*timings2) & ~TR_133_UDMAREG_UDMA_EN;
  		}
+		break;

  case controller_un_ata6:
  case controller_k2_ata6: {
  /* 100Mhz cell */