lkml.org 
[lkml]   [2021]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mmc: block: Differentiate busy and non-TRAN state
> +	/*
> + * Cards will never return to TRAN after completing
> + * identification commands or MMC_SEND_STATUS if they are not selected.
> + */
> + return !(cmd->opcode == MMC_GO_IDLE_STATE
> + || cmd->opcode == MMC_SEND_OP_COND
> + || cmd->opcode == MMC_ALL_SEND_CID
> + || cmd->opcode == MMC_SET_RELATIVE_ADDR
> + || cmd->opcode == MMC_SET_DSR
> + || cmd->opcode == MMC_SLEEP_AWAKE
> + || cmd->opcode == MMC_SELECT_CARD
> + || cmd->opcode == MMC_SEND_CSD
> + || cmd->opcode == MMC_SEND_CID
> + || cmd->opcode == MMC_SEND_STATUS
> + || cmd->opcode == MMC_GO_INACTIVE_STATE
> + || cmd->opcode == MMC_APP_CMD);

This is not the normal kernel style, which puts operators at the end
of the line. And while a little more verbose I think a switch statement
would be a lot more readable here:

switch (cmd->opcode) {
case MMC_GO_IDLE_STATE:
case MMC_SEND_OP_COND:
case MMC_ALL_SEND_CID:
case MMC_SET_RELATIVE_ADDR:
case MMC_SET_DSR:
case MMC_SLEEP_AWAKE:
case MMC_SELECT_CARD:
case MMC_SEND_CSD:
case MMC_SEND_CID:
case MMC_SEND_STATUS:
case MMC_GO_INACTIVE_STATE:
case MMC_APP_CMD:
return false;
default:
return true;
}

\
 
 \ /
  Last update: 2021-07-02 09:45    [W:0.077 / U:2.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site