All of lore.kernel.org
 help / color / mirror / Atom feed
From: liu.ming50@gmail.com
To: linux-mmc@vger.kernel.org
Cc: avri.altman@wdc.com, ulf.hansson@linaro.org,
	Ming Liu <liu.ming50@gmail.com>
Subject: [mmc-utils] [PATCH] Revert "mmc-utils: Remove unused MMC_BLOCK_MAJOR"
Date: Tue, 12 Apr 2022 16:03:31 +0200	[thread overview]
Message-ID: <20220412140331.1146516-1-liu.ming50@gmail.com> (raw)

From: Ming Liu <liu.ming50@gmail.com>

This reverts commit 118dc4a0909f3413b6f8bd086cef43262e89dc2a.

A compiling error was observed without this reverting, as follows:
| mmc_cmds.c: In function 'read_extcsd':
| mmc_cmds.c:72:25: error: 'MMC_BLOCK_MAJOR' undeclared (first use in this function)
|    72 |         ret = ioctl(fd, MMC_IOC_CMD, &idata);
|       |                         ^~~~~~~~~~~
| mmc_cmds.c:72:25: note: each undeclared identifier is reported only once for each function it appears in
| mmc_cmds.c: In function 'write_extcsd_value':
| mmc_cmds.c:93:25: error: 'MMC_BLOCK_MAJOR' undeclared (first use in this function)
|    93 |         ret = ioctl(fd, MMC_IOC_CMD, &idata);
|       |                         ^~~~~~~~~~~
| mmc_cmds.c: In function 'send_status':
| mmc_cmds.c:110:25: error: 'MMC_BLOCK_MAJOR' undeclared (first use in this function)
|   110 |         ret = ioctl(fd, MMC_IOC_CMD, &idata);
|       |                         ^~~~~~~~~~~
| mmc_cmds.c: In function 'set_write_protect':
| mmc_cmds.c:148:25: error: 'MMC_BLOCK_MAJOR' undeclared (first use in this function)
|   148 |         ret = ioctl(fd, MMC_IOC_CMD, &idata);
|       |                         ^~~~~~~~~~~
| mmc_cmds.c: In function 'send_write_protect_type':
| mmc_cmds.c:172:25: error: 'MMC_BLOCK_MAJOR' undeclared (first use in this function)
|   172 |         ret = ioctl(fd, MMC_IOC_CMD, &idata);
|       |                         ^~~~~~~~~~~
| mmc_cmds.c: In function 'do_rpmb_op':
| mmc_cmds.c:2157:25: error: 'MMC_BLOCK_MAJOR' undeclared (first use in this function)
|  2157 |         err = ioctl(fd, MMC_IOC_MULTI_CMD, mioc);
|       |                         ^~~~~~~~~~~~~~~~~
| mmc_cmds.c: In function 'erase':
| mmc_cmds.c:2659:29: error: 'MMC_BLOCK_MAJOR' undeclared (first use in this function)
|  2659 |         ret = ioctl(dev_fd, MMC_IOC_MULTI_CMD, multi_cmd);
|       |                             ^~~~~~~~~~~~~~~~~
| mmc_cmds.c: In function 'do_ffu':
| mmc_cmds.c:2888:37: error: 'MMC_BLOCK_MAJOR' undeclared (first use in this function)
|  2888 |                 ret = ioctl(dev_fd, MMC_IOC_MULTI_CMD, multi_cmd);
|       |                                     ^~~~~~~~~~~~~~~~~
| make: *** [Makefile:36: mmc_cmds.o] Error 1
| make: *** Waiting for unfinished jobs....

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
---
 mmc.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mmc.h b/mmc.h
index 25d6864..193dfee 100644
--- a/mmc.h
+++ b/mmc.h
@@ -19,6 +19,9 @@
 
 #include <linux/mmc/ioctl.h>
 
+/* From kernel linux/major.h */
+#define MMC_BLOCK_MAJOR			179
+
 /* From kernel linux/mmc/mmc.h */
 #define MMC_SWITCH		6	/* ac	[31:0] See below	R1b */
 #define MMC_SEND_EXT_CSD	8	/* adtc				R1  */
-- 
2.25.1


             reply	other threads:[~2022-04-12 14:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12 14:03 liu.ming50 [this message]
2022-04-12 15:21 ` [mmc-utils] [PATCH] Revert "mmc-utils: Remove unused MMC_BLOCK_MAJOR" Avri Altman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220412140331.1146516-1-liu.ming50@gmail.com \
    --to=liu.ming50@gmail.com \
    --cc=avri.altman@wdc.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.