Re: [PATCH v2 01/10] fs: give erase() a new erase_type parameter

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

 



On Wed, Jul 31, 2024 at 10:05:01AM +0200, Ahmad Fatoum wrote:
> diff --git a/drivers/usb/gadget/function/dfu.c b/drivers/usb/gadget/function/dfu.c
> index a41ff22dcebc..208e0cd23c29 100644
> --- a/drivers/usb/gadget/function/dfu.c
> +++ b/drivers/usb/gadget/function/dfu.c
> @@ -208,7 +208,7 @@ static void dfu_do_write(struct dfu_work *dw)
>  
>  	if (prog_erase && (dfu_written + wlen) > dfu_erased) {
>  		size = roundup(wlen, dfu_mtdinfo.erasesize);
> -		ret = erase(dfufd, size, dfu_erased);
> +		ret = erase(dfufd, size, dfu_erased, ERASE_TO_WRITE);
>  		dfu_erased += size;
>  		if (ret && ret != -ENOSYS) {
>  			perror("erase");
> @@ -333,7 +333,7 @@ static void dfu_do_copy(struct dfu_work *dw)
>  		return;
>  	}
>  
> -	ret = erase(fd, ERASE_SIZE_ALL, 0);
> +	ret = erase_flash(fd, ERASE_SIZE_ALL, 0);

Fixed this to:

	ret = erase(fd, ERASE_SIZE_ALL, 0, ERASE_TO_WRITE);

Or should it be ERASE_TO_CLEAR instead?

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux