[Linux-parport] [PATCH 09/32] pata_parport-bpck6: remove struct ppc_storage

Sergey Shtylyov s.shtylyov at omp.ru
Sat Mar 11 11:30:04 PST 2023


On 3/8/23 1:46 AM, Ondrej Zary wrote:

> Store the remaining two variables (cur_ctrl and ppc_flags) in struct

   s/variables/fields/, maybe?

> ppc_storage directly in pi->private and remove struct ppc_storage.
> 
> Signed-off-by: Ondrej Zary <linux at zary.sk>
[...]

Reviewed-by: Sergey Shtylyov <s.shtylyov at omp.ru>

> diff --git a/drivers/ata/pata_parport/ppc6lnx.c b/drivers/ata/pata_parport/ppc6lnx.c
> index 75f9748d8de5..ee8cee6bae7c 100644
> --- a/drivers/ata/pata_parport/ppc6lnx.c
> +++ b/drivers/ata/pata_parport/ppc6lnx.c
> @@ -64,10 +64,8 @@
>  
>  //***************************************************************************
>  
> -struct ppc_storage {
> -	u8	ppc_flags;
> -	u8	cur_ctrl;				// current control port contents
> -};
> +#define CUR_CTRL	(((u8 *)&pi->private)[0])
> +#define PPC_FLAGS	(((u8 *)&pi->private)[1])

   Hm, that's a creative abuse of *unsigned long*... :-)

[...]

MBR, Sergey



More information about the Linux-parport mailing list