Re: [PATCH v3] mmc: Add ioctl to let userspace apps send ACMDs

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

 



Hi John,

On Thu, Apr 07 2011, John Calixto wrote:
> Sending ACMDs from userspace is useful for such things as:
>
>     - The security application of an SD card (SD Specification, Part 3,
>       Security)
>
>     - SD passthrough for virtual machines
>
> Tested on TI PCIxx12 (SDHCI), Sigma Designs SMP8652 SoC, TI OMAP3621
> SoC, TI OMAP3630 SoC, Samsung S5PC110 SoC, Qualcomm MSM7200A SoC.
>
> Signed-off-by: John Calixto <john.calixto@xxxxxxxxxxxxxx>

This adds two gcc warnings here (compiling for ARM):

  CC      drivers/mmc/card/block.o
drivers/mmc/card/block.c: In function âmmc_blk_ioctl_copy_from_userâ:
drivers/mmc/card/block.c:199:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
drivers/mmc/card/block.c: In function âmmc_blk_ioctl_acmdâ:
drivers/mmc/card/block.c:308:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

...
> +	if (copy_from_user(idata->buf, (u8 *) user->data_ptr, idata->buf_bytes)) {
> +		err = -EFAULT;
> +		goto copy_err;
> +	}
...
> +		if (copy_to_user((u8 *) ic_ptr->data_ptr, idata->buf, idata->buf_bytes)) {
> +			err = -EFAULT;
> +			goto acmd_rel_host;
> +		}
...

Thanks,

- Chris.
-- 
Chris Ball   <cjb@xxxxxxxxxx>   <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux