RE: [mmc-utils] [PATCH] Revert "mmc-utils: Remove unused MMC_BLOCK_MAJOR"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> From: Ming Liu <liu.ming50@xxxxxxxxx>
> 
> 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@xxxxxxxxx>
> ---
>  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





[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux