Skip to contentSkip to conversation

mmc: document 'Reliable Write' bit in uapi header

PATCH In review Wolfram Sang 2 participants 2 messages Dec 3, 2018 – Dec 5, 2018 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mmc: document 'Reliable Write' bit in uapi header

If we use it this way, people should know about it. Also, replace true/false with nonzero/zero because the flag is not strictly a bool anymore.

---

Change since V1:
* reworded first line of comment as well. Thanks, Geert!

Still not super happy about shifting into the sign bit, but yeah... don't break userspace, I guess.

 include/uapi/linux/mmc/ioctl.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/uapi/linux/mmc/ioctl.h +4 -1
index 45f369dc0a42..00c08120f3ba 100644
@@ -5,7 +5,10 @@
 #include <linux/types.h>
 
 struct mmc_ioc_cmd {
-	/* Implies direction of data.  true = write, false = read */
+	/*
+	 * Direction of data: nonzero = write, zero = read.
+	 * Bit 31 selects 'Reliable Write' for RPMB.
+	 */
 	int write_flag;
 
 	/* Application-specific command.  true = precede with CMD55 */
Signature · 1 line
2.11.0
#1 lore raw
Quoted 7 lines · Wolfram Sang

If we use it this way, people should know about it. Also, replace true/false with nonzero/zero because the flag is not strictly a bool anymore.

Applied for next, thanks!

Kind regards
Uffe

Quoted 30 lines

---

Change since V1:
* reworded first line of comment as well. Thanks, Geert!

Still not super happy about shifting into the sign bit, but yeah... don't break userspace, I guess.

 include/uapi/linux/mmc/ioctl.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/uapi/linux/mmc/ioctl.h +4 -2
index 45f369dc0a42..00c08120f3ba 100644
@@ -5,7 +5,10 @@
 #include <linux/types.h>
 
 struct mmc_ioc_cmd {
-       /* Implies direction of data.  true = write, false = read */
+       /*
+        * Direction of data: nonzero = write, zero = read.
+        * Bit 31 selects 'Reliable Write' for RPMB.
+        */
        int write_flag;
 
        /* Application-specific command.  true = precede with CMD55 */
--

2.11.0