xiaoxiang781216 commented on code in PR #13528:
URL: https://github.com/apache/nuttx/pull/13528#discussion_r1765954102


##########
drivers/mmcsd/mmcsd_sdio.c:
##########
@@ -981,10 +981,10 @@ static void mmcsd_decode_scr(FAR struct mmcsd_state_s 
*priv, uint32_t scr[2])
 
 #ifdef CONFIG_ENDIAN_BIG  /* Card transfers SCR in big-endian order */
   priv->buswidth     = (scr[0] >> 16) & 15;
-  priv->cmd23support =  scr[0]        & 2;
+  priv->cmd23support = (scr[0] & 2)   != 0;
 #else
   priv->buswidth     = (scr[0] >> 8)  & 15;
-  priv->cmd23support = (scr[0] >> 24) & 2;
+  priv->cmd23support = ((scr[0] >> 24) & 2) != 0;

Review Comment:
   let's right shift 25 and mask 1 instead



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to