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

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

 



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@xxxxxxx>
[...]

Reviewed-by: Sergey Shtylyov <s.shtylyov@xxxxxx>

> 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



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux