Re: [PATCH 29/31] swim: Define macros 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 a SEL_MASK macro to name the anonymous constant. Define STEPPING
> rather than re-use STEP because the latter is a command bit macro (see also
> GCR_MODE vs. SETGCR). No functional change, just better readability.
> 
> Signed-off-by: Finn Thain <[email protected]>
> ---
>   drivers/block/swim.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)

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

> 
> diff --git a/drivers/block/swim.c b/drivers/block/swim.c
> index 406792952e7f..460f74c19cfd 100644
> --- a/drivers/block/swim.c
> +++ b/drivers/block/swim.c
> @@ -112,9 +112,11 @@ struct iwm {
>   #define LSTRB		0x0F8
>   
>   #define CA_MASK		0x0F7
> +#define SEL_MASK	0x100
>   
>   /* Select values for swim_select and swim_readbit */
>   
> +#define STEPPING	0x0F1
>   #define READ_DATA_0	0x0F4
>   #define ONEMEG_DRIVE	0x0F5
>   #define SINGLE_SIDED	0x0F6
> @@ -271,7 +273,7 @@ static inline void swim_select(struct swim __iomem *base, int sel)
>   {
>   	swim_write(base, phase, RELAX);
>   
> -	via1_set_head(sel & 0x100);
> +	via1_set_head(sel & SEL_MASK);
>   
>   	swim_write(base, phase, sel & CA_MASK);
>   }
> @@ -369,7 +371,7 @@ static int swim_step(struct swim __iomem *base)
>   {
>   	swim_action(base, STEP);
>   	udelay(150);
> -	return swim_readbit_timeout_atomic(base, STEP, false, 20 * 1000);
> +	return swim_readbit_timeout_atomic(base, STEPPING, false, 20 * 1000);
>   }
>   
>   static int swim_track00(struct swim __iomem *base)
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.