Re: [PATCH 30/31] swim: Define symbols for constants

Laurent Vivier <[email protected]>
Newsgroups org.kernel.vger.linux-block,org.kernel.vger.linux-kernel,org.kernel.vger.linux-m68k
Message-ID <[email protected]>
Le 16/07/2026 à 12:02, Finn Thain a écrit :
> Define local symbols to give some meaning to anonymous constants.
> No functional change.
> 
> Signed-off-by: Finn Thain <[email protected]>
> ---
>   drivers/block/swim_asm.S | 24 ++++++++++++++----------
>   1 file changed, 14 insertions(+), 10 deletions(-)

Reviewed-by: Laurent Vivier <[email protected]>

> 
> diff --git a/drivers/block/swim_asm.S b/drivers/block/swim_asm.S
> index 3d5ad525ccde..c17a25e1cd33 100644
> --- a/drivers/block/swim_asm.S
> +++ b/drivers/block/swim_asm.S
> @@ -42,6 +42,10 @@
>   	.equ	max_retry, 40
>   	.equ	sector_size, 512
>   
> +	.equ	.Lmr_clear_fifo,	0x01
> +	.equ	.Lmr_action,		0x08
> +	.equ	.Lmr_write_action,	0x18
> +
>   	.equ	.Lhr_crc_error,		0x02
>   	.equ	.Lhr_fifo_2bytes,	0x40
>   	.equ	.Lhr_fifo_1byte,	0x80
> @@ -70,11 +74,11 @@ mfm_read_addrmark:
>   	movew	#seek_time, %d2
>   
>   wait_header_init:
> -	moveb	#0x18, %a3@(write_mode0 - read_mark)
> -	moveb	#0x01, %a3@(write_mode1 - read_mark)
> -	moveb	#0x01, %a3@(write_mode0 - read_mark)
> +	moveb	#.Lmr_write_action, %a3@(write_mode0 - read_mark)
> +	moveb	#.Lmr_clear_fifo, %a3@(write_mode1 - read_mark)
> +	moveb	#.Lmr_clear_fifo, %a3@(write_mode0 - read_mark)
>   	tstb	%a3@(read_error - read_mark)
> -	moveb	#0x08, %a3@(write_mode1 - read_mark)
> +	moveb	#.Lmr_action, %a3@(write_mode1 - read_mark)
>   
>   	lea	sector_address_mark, %a0
>   	moveq	#3, %d1
> @@ -136,7 +140,7 @@ crc1:	moveb	%a2@, %d5
>   
>   	moveq	#0, %d0
>   signal_nonyb:
> -	moveb	#0x18, %a3@(write_mode0 - read_mark)
> +	moveb	#.Lmr_write_action, %a3@(write_mode0 - read_mark)
>   	rts
>   
>   	.global swim_read_sector_data
> @@ -158,11 +162,11 @@ mfm_read_data:
>   	movew	#seek_time, %d2
>   
>   wait_data_init:
> -	moveb	#0x18, %a3@(write_mode0 - read_mark)
> -	moveb	#0x01, %a3@(write_mode1 - read_mark)
> -	moveb	#0x01, %a3@(write_mode0 - read_mark)
> +	moveb	#.Lmr_write_action, %a3@(write_mode0 - read_mark)
> +	moveb	#.Lmr_clear_fifo, %a3@(write_mode1 - read_mark)
> +	moveb	#.Lmr_clear_fifo, %a3@(write_mode0 - read_mark)
>   	tstb	%a3@(read_error - read_mark)
> -	moveb	#0x08, %a3@(write_mode1 - read_mark)
> +	moveb	#.Lmr_action, %a3@(write_mode1 - read_mark)
>   
>   	lea	sector_data_mark, %a0
>   	moveq	#3, %d1
> @@ -226,5 +230,5 @@ data_crc1:
>   	subl	%d4, %d0
>   
>   data_exit:
> -	moveb	#0x18, %a3@(write_mode0 - read_mark)
> +	moveb	#.Lmr_write_action, %a3@(write_mode0 - read_mark)
>   	rts
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.