mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 23:51:37 +00:00
scsi: arcmsr: Remove unnecessary syntax
Remove unnecessary syntax. Link: https://lore.kernel.org/r/29486c1a50df3bb1312fb9d6a2dec075f212e4d5.camel@areca.com.tw Signed-off-by: ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
39a45d538d
commit
9aae1c1fe6
@ -317,20 +317,16 @@ static bool arcmsr_remap_pciregion(struct AdapterControlBlock *acb)
|
|||||||
static void arcmsr_unmap_pciregion(struct AdapterControlBlock *acb)
|
static void arcmsr_unmap_pciregion(struct AdapterControlBlock *acb)
|
||||||
{
|
{
|
||||||
switch (acb->adapter_type) {
|
switch (acb->adapter_type) {
|
||||||
case ACB_ADAPTER_TYPE_A:{
|
case ACB_ADAPTER_TYPE_A:
|
||||||
iounmap(acb->pmuA);
|
iounmap(acb->pmuA);
|
||||||
}
|
break;
|
||||||
break;
|
case ACB_ADAPTER_TYPE_B:
|
||||||
case ACB_ADAPTER_TYPE_B:{
|
|
||||||
iounmap(acb->mem_base0);
|
iounmap(acb->mem_base0);
|
||||||
iounmap(acb->mem_base1);
|
iounmap(acb->mem_base1);
|
||||||
}
|
break;
|
||||||
|
case ACB_ADAPTER_TYPE_C:
|
||||||
break;
|
|
||||||
case ACB_ADAPTER_TYPE_C:{
|
|
||||||
iounmap(acb->pmuC);
|
iounmap(acb->pmuC);
|
||||||
}
|
break;
|
||||||
break;
|
|
||||||
case ACB_ADAPTER_TYPE_D:
|
case ACB_ADAPTER_TYPE_D:
|
||||||
iounmap(acb->mem_base0);
|
iounmap(acb->mem_base0);
|
||||||
break;
|
break;
|
||||||
@ -552,18 +548,14 @@ static void arcmsr_flush_adapter_cache(struct AdapterControlBlock *acb)
|
|||||||
{
|
{
|
||||||
switch (acb->adapter_type) {
|
switch (acb->adapter_type) {
|
||||||
|
|
||||||
case ACB_ADAPTER_TYPE_A: {
|
case ACB_ADAPTER_TYPE_A:
|
||||||
arcmsr_hbaA_flush_cache(acb);
|
arcmsr_hbaA_flush_cache(acb);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
case ACB_ADAPTER_TYPE_B:
|
||||||
case ACB_ADAPTER_TYPE_B: {
|
|
||||||
arcmsr_hbaB_flush_cache(acb);
|
arcmsr_hbaB_flush_cache(acb);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case ACB_ADAPTER_TYPE_C: {
|
case ACB_ADAPTER_TYPE_C:
|
||||||
arcmsr_hbaC_flush_cache(acb);
|
arcmsr_hbaC_flush_cache(acb);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case ACB_ADAPTER_TYPE_D:
|
case ACB_ADAPTER_TYPE_D:
|
||||||
arcmsr_hbaD_flush_cache(acb);
|
arcmsr_hbaD_flush_cache(acb);
|
||||||
@ -1213,21 +1205,15 @@ static uint8_t arcmsr_abort_allcmd(struct AdapterControlBlock *acb)
|
|||||||
{
|
{
|
||||||
uint8_t rtnval = 0;
|
uint8_t rtnval = 0;
|
||||||
switch (acb->adapter_type) {
|
switch (acb->adapter_type) {
|
||||||
case ACB_ADAPTER_TYPE_A: {
|
case ACB_ADAPTER_TYPE_A:
|
||||||
rtnval = arcmsr_hbaA_abort_allcmd(acb);
|
rtnval = arcmsr_hbaA_abort_allcmd(acb);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
case ACB_ADAPTER_TYPE_B:
|
||||||
case ACB_ADAPTER_TYPE_B: {
|
|
||||||
rtnval = arcmsr_hbaB_abort_allcmd(acb);
|
rtnval = arcmsr_hbaB_abort_allcmd(acb);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
case ACB_ADAPTER_TYPE_C:
|
||||||
case ACB_ADAPTER_TYPE_C: {
|
|
||||||
rtnval = arcmsr_hbaC_abort_allcmd(acb);
|
rtnval = arcmsr_hbaC_abort_allcmd(acb);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACB_ADAPTER_TYPE_D:
|
case ACB_ADAPTER_TYPE_D:
|
||||||
rtnval = arcmsr_hbaD_abort_allcmd(acb);
|
rtnval = arcmsr_hbaD_abort_allcmd(acb);
|
||||||
break;
|
break;
|
||||||
@ -1916,18 +1902,14 @@ static void arcmsr_hbaE_stop_bgrb(struct AdapterControlBlock *pACB)
|
|||||||
static void arcmsr_stop_adapter_bgrb(struct AdapterControlBlock *acb)
|
static void arcmsr_stop_adapter_bgrb(struct AdapterControlBlock *acb)
|
||||||
{
|
{
|
||||||
switch (acb->adapter_type) {
|
switch (acb->adapter_type) {
|
||||||
case ACB_ADAPTER_TYPE_A: {
|
case ACB_ADAPTER_TYPE_A:
|
||||||
arcmsr_hbaA_stop_bgrb(acb);
|
arcmsr_hbaA_stop_bgrb(acb);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
case ACB_ADAPTER_TYPE_B:
|
||||||
case ACB_ADAPTER_TYPE_B: {
|
|
||||||
arcmsr_hbaB_stop_bgrb(acb);
|
arcmsr_hbaB_stop_bgrb(acb);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case ACB_ADAPTER_TYPE_C: {
|
case ACB_ADAPTER_TYPE_C:
|
||||||
arcmsr_hbaC_stop_bgrb(acb);
|
arcmsr_hbaC_stop_bgrb(acb);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case ACB_ADAPTER_TYPE_D:
|
case ACB_ADAPTER_TYPE_D:
|
||||||
arcmsr_hbaD_stop_bgrb(acb);
|
arcmsr_hbaD_stop_bgrb(acb);
|
||||||
@ -1951,7 +1933,6 @@ static void arcmsr_iop_message_read(struct AdapterControlBlock *acb)
|
|||||||
writel(ARCMSR_INBOUND_DRIVER_DATA_READ_OK, ®->inbound_doorbell);
|
writel(ARCMSR_INBOUND_DRIVER_DATA_READ_OK, ®->inbound_doorbell);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACB_ADAPTER_TYPE_B: {
|
case ACB_ADAPTER_TYPE_B: {
|
||||||
struct MessageUnit_B *reg = acb->pmuB;
|
struct MessageUnit_B *reg = acb->pmuB;
|
||||||
writel(ARCMSR_DRV2IOP_DATA_READ_OK, reg->drv2iop_doorbell);
|
writel(ARCMSR_DRV2IOP_DATA_READ_OK, reg->drv2iop_doorbell);
|
||||||
@ -2034,7 +2015,6 @@ struct QBUFFER __iomem *arcmsr_get_iop_rqbuffer(struct AdapterControlBlock *acb)
|
|||||||
qbuffer = (struct QBUFFER __iomem *)®->message_rbuffer;
|
qbuffer = (struct QBUFFER __iomem *)®->message_rbuffer;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACB_ADAPTER_TYPE_B: {
|
case ACB_ADAPTER_TYPE_B: {
|
||||||
struct MessageUnit_B *reg = acb->pmuB;
|
struct MessageUnit_B *reg = acb->pmuB;
|
||||||
qbuffer = (struct QBUFFER __iomem *)reg->message_rbuffer;
|
qbuffer = (struct QBUFFER __iomem *)reg->message_rbuffer;
|
||||||
@ -2069,7 +2049,6 @@ static struct QBUFFER __iomem *arcmsr_get_iop_wqbuffer(struct AdapterControlBloc
|
|||||||
pqbuffer = (struct QBUFFER __iomem *) ®->message_wbuffer;
|
pqbuffer = (struct QBUFFER __iomem *) ®->message_wbuffer;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACB_ADAPTER_TYPE_B: {
|
case ACB_ADAPTER_TYPE_B: {
|
||||||
struct MessageUnit_B *reg = acb->pmuB;
|
struct MessageUnit_B *reg = acb->pmuB;
|
||||||
pqbuffer = (struct QBUFFER __iomem *)reg->message_wbuffer;
|
pqbuffer = (struct QBUFFER __iomem *)reg->message_wbuffer;
|
||||||
@ -2699,10 +2678,8 @@ static irqreturn_t arcmsr_interrupt(struct AdapterControlBlock *acb)
|
|||||||
switch (acb->adapter_type) {
|
switch (acb->adapter_type) {
|
||||||
case ACB_ADAPTER_TYPE_A:
|
case ACB_ADAPTER_TYPE_A:
|
||||||
return arcmsr_hbaA_handle_isr(acb);
|
return arcmsr_hbaA_handle_isr(acb);
|
||||||
break;
|
|
||||||
case ACB_ADAPTER_TYPE_B:
|
case ACB_ADAPTER_TYPE_B:
|
||||||
return arcmsr_hbaB_handle_isr(acb);
|
return arcmsr_hbaB_handle_isr(acb);
|
||||||
break;
|
|
||||||
case ACB_ADAPTER_TYPE_C:
|
case ACB_ADAPTER_TYPE_C:
|
||||||
return arcmsr_hbaC_handle_isr(acb);
|
return arcmsr_hbaC_handle_isr(acb);
|
||||||
case ACB_ADAPTER_TYPE_D:
|
case ACB_ADAPTER_TYPE_D:
|
||||||
@ -3634,18 +3611,14 @@ static int arcmsr_polling_ccbdone(struct AdapterControlBlock *acb,
|
|||||||
int rtn = 0;
|
int rtn = 0;
|
||||||
switch (acb->adapter_type) {
|
switch (acb->adapter_type) {
|
||||||
|
|
||||||
case ACB_ADAPTER_TYPE_A: {
|
case ACB_ADAPTER_TYPE_A:
|
||||||
rtn = arcmsr_hbaA_polling_ccbdone(acb, poll_ccb);
|
rtn = arcmsr_hbaA_polling_ccbdone(acb, poll_ccb);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
case ACB_ADAPTER_TYPE_B:
|
||||||
case ACB_ADAPTER_TYPE_B: {
|
|
||||||
rtn = arcmsr_hbaB_polling_ccbdone(acb, poll_ccb);
|
rtn = arcmsr_hbaB_polling_ccbdone(acb, poll_ccb);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case ACB_ADAPTER_TYPE_C: {
|
case ACB_ADAPTER_TYPE_C:
|
||||||
rtn = arcmsr_hbaC_polling_ccbdone(acb, poll_ccb);
|
rtn = arcmsr_hbaC_polling_ccbdone(acb, poll_ccb);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case ACB_ADAPTER_TYPE_D:
|
case ACB_ADAPTER_TYPE_D:
|
||||||
rtn = arcmsr_hbaD_polling_ccbdone(acb, poll_ccb);
|
rtn = arcmsr_hbaD_polling_ccbdone(acb, poll_ccb);
|
||||||
|
Loading…
Reference in New Issue
Block a user