lkml.org 
[lkml]   [2022]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] input: ps2-gpio: refactor struct ps2_gpio_data
On Tue, Feb 15, 2022 at 11:23:17PM +0100, Danilo Krummrich wrote:
> Hi Dmitry,
>
> On Tue, Feb 15, 2022 at 01:54:46PM -0800, Dmitry Torokhov wrote:
> > Hi Danilo,
> >
> > On Tue, Feb 15, 2022 at 05:02:05PM +0100, Danilo Krummrich wrote:
> >
> > > +static inline struct ps2_gpio_data *
> > > +to_ps2_gpio_data(struct delayed_work *dwork)
> > > +{
> > > + struct ps2_gpio_data_tx *txd = container_of(dwork,
> > > + struct ps2_gpio_data_tx,
> > > + work);
> > > +
> > > + return container_of(txd, struct ps2_gpio_data, tx);
> > > +}
> > > +
> > > static void ps2_gpio_tx_work_fn(struct work_struct *work)
> > > {
> > > struct delayed_work *dwork = to_delayed_work(work);
> > > - struct ps2_gpio_data *drvdata = container_of(dwork,
> > > - struct ps2_gpio_data,
> > > - tx_work);
> >
> > This can simply be written as:
> >
> > struct ps2_gpio_data *drvdata = container_of(dwork,
> > struct ps2_gpio_data,
> > tx.work);
> >
> > No need to resubmit unless you disagree - I can change it on my side.
> Thanks, please do so.
>
> The tx and rx members of struct ps2_gpio_data can then be anonymous structs.
> Do you mind changing that too? Or should I resubmit?

I will.

Thanks.

--
Dmitry

\
 
 \ /
  Last update: 2022-02-15 23:39    [W:1.641 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site