Re: [PATCH 09/32] pata_parport-bpck6: remove struct ppc_storage
Sergey Shtylyov <[email protected]> Sat, 11 Mar 2023 22:30:04 +0300
| Newsgroups | gmane.linux.ide,gmane.linux.block,gmane.linux.parport,gmane.linux.kernel |
|---|---|
| Organization | Open Mobile Platform |
| Message-ID | <[email protected]> |
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 <[email protected]> [...] Reviewed-by: Sergey Shtylyov <[email protected]> > 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