linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Danilo Krummrich <danilokrummrich@dk-develop.de>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	linus.walleij@linaro.org
Subject: Re: [PATCH 1/4] input: ps2-gpio: refactor struct ps2_gpio_data
Date: Tue, 15 Feb 2022 23:23:17 +0100	[thread overview]
Message-ID: <Ygwn1ZhLGuWctfkP@pollux> (raw)
In-Reply-To: <YgwhJkRGdduf5oYc@google.com>

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?
> 
> Thanks.
> 
> -- 
> Dmitry

- Danilo

  reply	other threads:[~2022-02-15 22:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 16:02 ps2-gpio: use ktime for IRQ timekeeping Danilo Krummrich
2022-02-15 16:02 ` [PATCH 1/4] input: ps2-gpio: refactor struct ps2_gpio_data Danilo Krummrich
2022-02-15 21:54   ` Dmitry Torokhov
2022-02-15 22:23     ` Danilo Krummrich [this message]
2022-02-15 22:38       ` Dmitry Torokhov
2022-02-15 16:02 ` [PATCH 2/4] input: ps2-gpio: use ktime for IRQ timekeeping Danilo Krummrich
2022-02-15 16:02 ` [PATCH 3/4] input: ps2-gpio: remove tx timeout from ps2_gpio_irq_tx() Danilo Krummrich
2022-02-15 16:02 ` [PATCH 4/4] input: ps2-gpio: don't send rx data before the stop bit Danilo Krummrich
2022-02-15 22:56 ` ps2-gpio: use ktime for IRQ timekeeping Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ygwn1ZhLGuWctfkP@pollux \
    --to=danilokrummrich@dk-develop.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).