From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Felix Fietkau <nbd@nbd.name>
Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 06/10] mt76x2: move mt76x2_dev in mt76x02_util.h
Date: Wed, 3 Oct 2018 15:55:58 +0200 [thread overview]
Message-ID: <20181003135557.GB16914@redhat.com> (raw)
In-Reply-To: <4ecf9e32-cc25-714c-721b-c1b74164d781@nbd.name>
On Wed, Oct 03, 2018 at 03:51:32PM +0200, Felix Fietkau wrote:
> >> > }
> >> >
> >> > put them into mt76xN_dev and still remove dupicated code ?
> >> Quite often, mt76_dev would be needed as well for register access, which means extra parameters for a lot of functions.
> >> I think Lorenzo’s approach makes the code a lot more concise, and makes it easier to share more code between mt76x0 and mt76x2.
> >
> > I think this could be solved very easly by container_of() macro if
> > there will be one mt76x02_dev struct just after mt76_dev.
> That's possible, yes. But given how much code can still be unified
> between mt76x0 and mt76x2, I don't think there will be much need for a
> x0 or x2 specific device struct. And in that case, the code will be more
> readable if we avoid putting a lot of unnecessary &dev->mt76x02 or
> container_of in the code.
Ok, I guess can live with mt76x02_dev :-)
Thanks
Stanislaw
prev parent reply other threads:[~2018-10-03 13:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 22:19 [PATCH 06/10] mt76x2: move mt76x2_dev in mt76x02_util.h Lorenzo Bianconi
2018-10-03 10:43 ` Stanislaw Gruszka
2018-10-03 11:01 ` Lorenzo Bianconi
2018-10-03 11:12 ` Stanislaw Gruszka
2018-10-03 11:49 ` Felix Fietkau
2018-10-03 13:32 ` Stanislaw Gruszka
2018-10-03 13:51 ` Felix Fietkau
2018-10-03 13:55 ` Stanislaw Gruszka [this message]
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=20181003135557.GB16914@redhat.com \
--to=sgruszka@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=nbd@nbd.name \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.