All of lore.kernel.org
 help / color / mirror / Atom feed
* [mmc-utils] [PATCH] Revert "mmc-utils: Remove unused MMC_BLOCK_MAJOR"
@ 2022-04-12 14:03 liu.ming50
  2022-04-12 15:21 ` Avri Altman
  0 siblings, 1 reply; 2+ messages in thread
From: liu.ming50 @ 2022-04-12 14:03 UTC (permalink / raw)
  To: linux-mmc; +Cc: avri.altman, ulf.hansson, Ming Liu

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [mmc-utils] [PATCH] Revert "mmc-utils: Remove unused MMC_BLOCK_MAJOR"
  2022-04-12 14:03 [mmc-utils] [PATCH] Revert "mmc-utils: Remove unused MMC_BLOCK_MAJOR" liu.ming50
@ 2022-04-12 15:21 ` Avri Altman
  0 siblings, 0 replies; 2+ messages in thread
From: Avri Altman @ 2022-04-12 15:21 UTC (permalink / raw)
  To: liu.ming50, linux-mmc; +Cc: ulf.hansson

> 
> From: Ming Liu <liu.ming50@gmail.com>
> 
> This reverts commit 118dc4a0909f3413b6f8bd086cef43262e89dc2a.
> 
> A compiling error was observed without this reverting, as follows:
Can you share some details about your platform?
Are you compiling for x86? For Arm64?  For Android?

Thanks,
Avri

> | 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-12 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-12 14:03 [mmc-utils] [PATCH] Revert "mmc-utils: Remove unused MMC_BLOCK_MAJOR" liu.ming50
2022-04-12 15:21 ` Avri Altman

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.