lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <a66b0aa5-28d7-a3bb-cbee-bb2021a98ff8@wanadoo.fr>
Date:   Fri, 23 Sep 2022 19:02:54 +0200
From:   Marion & Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     cgel.zte@...il.com, ulf.hansson@...aro.org
Cc:     maximlevitsky@...il.com, oakad@...oo.com, axboe@...nel.dk,
        hare@...e.de, mcgrof@...nel.org, arnd@...db.de,
        linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
        ye xingchen <ye.xingchen@....com.cn>
Subject: Re: [PATCH linux-next] memstick/ms_block: fix the spelling mistakes


Le 23/09/2022 à 10:56, cgel.zte@...il.com a écrit :
> From: ye xingchen <ye.xingchen@....com.cn>
>
> fix spelling mistake "sucessfuly_written" -> "successfully_written"
> "sucessfuly_read" -> "successfully_read"
>
> Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
> ---
>   drivers/memstick/core/ms_block.c | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/memstick/core/ms_block.c b/drivers/memstick/core/ms_block.c
> index ba8414519515..c6b92a777cc8 100644
> --- a/drivers/memstick/core/ms_block.c
> +++ b/drivers/memstick/core/ms_block.c
> @@ -1809,11 +1809,11 @@ static int msb_init_card(struct memstick_dev *card)
>   }
>   
>   static int msb_do_write_request(struct msb_data *msb, int lba,
> -	int page, struct scatterlist *sg, size_t len, int *sucessfuly_written)
> +	int page, struct scatterlist *sg, size_t len, int *successfully_written)

Hi,

not related to this patch itself, but 'len' is a size_t here and an int 
below.
And these 'len' parameters both come from blk_rq_bytes() which returns 
an "unsigned int"

I guess that if the type was used consistently, it would be better.
(My own preference goes to size_t)

>   {
>   	int error = 0;
>   	off_t offset = 0;
> -	*sucessfuly_written = 0;
> +	*successfully_written = 0;
>   
>   	while (offset < len) {
>   		if (page == 0 && len - offset >= msb->block_size) {
> @@ -1827,7 +1827,7 @@ static int msb_do_write_request(struct msb_data *msb, int lba,
>   				return error;
>   
>   			offset += msb->block_size;
> -			*sucessfuly_written += msb->block_size;
> +			*successfully_written += msb->block_size;
>   			lba++;
>   			continue;
>   		}
> @@ -1837,7 +1837,7 @@ static int msb_do_write_request(struct msb_data *msb, int lba,
>   			return error;
>   
>   		offset += msb->page_size;
> -		*sucessfuly_written += msb->page_size;
> +		*successfully_written += msb->page_size;
>   
>   		page++;
>   		if (page == msb->pages_in_block) {
> @@ -1849,11 +1849,11 @@ static int msb_do_write_request(struct msb_data *msb, int lba,
>   }
>   
>   static int msb_do_read_request(struct msb_data *msb, int lba,
> -		int page, struct scatterlist *sg, int len, int *sucessfuly_read)
> +		int page, struct scatterlist *sg, int len, int *successfully_read)

Here.

>   {
>   	int error = 0;
>   	int offset = 0;
> -	*sucessfuly_read = 0;
> +	*successfully_read = 0;
>   
>   	while (offset < len) {
>   
> @@ -1862,7 +1862,7 @@ static int msb_do_read_request(struct msb_data *msb, int lba,
>   			return error;
>   
>   		offset += msb->page_size;
> -		*sucessfuly_read += msb->page_size;
> +		*successfully_read += msb->page_size;
>   
>   		page++;
>   		if (page == msb->pages_in_block) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ