lkml.org 
[lkml]   [2023]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 09/32] pata_parport-bpck6: remove struct ppc_storage
    From
    Date
    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@zary.sk>
    [...]

    Reviewed-by: Sergey Shtylyov <s.shtylyov@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

    \
     
     \ /
      Last update: 2023-03-27 00:54    [W:7.888 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site