From: Gil Fine <gil.fine@intel.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Gil Fine <gil.fine@intel.com>,
andreas.noever@gmail.com, michael.jamet@intel.com,
YehezkelShB@gmail.com, linux-usb@vger.kernel.org,
lukas@wunner.de
Subject: Re: [PATCH v3 6/6] thunderbolt: Change TMU mode to HiFi uni-directional once DisplayPort tunneled
Date: Mon, 16 May 2022 11:59:03 +0300 [thread overview]
Message-ID: <20220516085903.GC8368@ccdjLinux26> (raw)
In-Reply-To: <YoIMh0Di7QtALQ/Z@lahna>
Hi Mika,
On Mon, May 16, 2022 at 11:34:15AM +0300, Mika Westerberg wrote:
> Hi Gil,
>
> On Sun, May 15, 2022 at 11:27:46PM +0300, Gil Fine wrote:
> > > > +int tb_switch_tmu_config_enable(struct device *dev, void *data)
> > >
> > > Also can we please make it take some real type and not something
> > > arbitrary?
> > You mean the names, right?
> > Something like:
> > int tb_switch_tmu_config_enable(struct device *parent, void *rate)
> > If so, yes, I will
>
> I mean use a real type, not void *.
>
> > >
> > > Can it be const too?
> > IIUC, it shall be a function pointer with specified signature otherwise it will fail
> > at compilation
>
> Okay then I suggest to make a reasonable "API" function that handles
> all this internally that does not take arbitrary pointers. Remember to
> document it in kernel-doc too.
This is a function pointer that shall be passed to device_for_each_child()
And it has to be defined as:
int (*fn)(struct device *dev, void *data)
Similar as here e.g.:
static int remove_retimer(struct device *dev, void *data)
{
»·······struct tb_retimer *rt = tb_to_retimer(dev);
»·······struct tb_port *port = data;
»·······if (rt && rt->port == port)
»·······»·······tb_retimer_remove(rt);
»·······return 0;
}
void tb_retimer_remove_all(struct tb_port *port)
{
»·······struct usb4_port *usb4;
»·······usb4 = port->usb4;
»·······if (usb4)
»·······»·······device_for_each_child_reverse(&usb4->dev, port,
»·······»·······»·······»·······»······· remove_retimer);
}
So not sure I get you...
--
Thanks,
Gil
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
next prev parent reply other threads:[~2022-05-16 8:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 14:05 [PATCH v3 0/6] thunderbolt: CL1 support for USB4 and Titan Ridge Gil Fine
2022-05-11 14:05 ` [PATCH v3 1/6] thunderbolt: Silently ignore CLx enabling in case CLx is not supported Gil Fine
2022-05-11 14:05 ` [PATCH v3 2/6] thunderbolt: CLx disable before system suspend only if previously enabled Gil Fine
2022-05-11 14:05 ` [PATCH v3 3/6] thunderbolt: Fix typos in CLx enabling Gil Fine
2022-05-11 14:05 ` [PATCH v3 4/6] thunderbolt: Change downstream router's TMU rate in both TMU uni/bidir mode Gil Fine
2022-05-11 14:05 ` [PATCH v3 5/6] thunderbolt: Add CL1 support for USB4 and Titan Ridge routers Gil Fine
2022-05-11 14:05 ` [PATCH v3 6/6] thunderbolt: Change TMU mode to HiFi uni-directional once DisplayPort tunneled Gil Fine
2022-05-13 9:53 ` Mika Westerberg
2022-05-15 20:27 ` Gil Fine
2022-05-16 8:34 ` Mika Westerberg
2022-05-16 8:59 ` Gil Fine [this message]
2022-05-16 9:34 ` Mika Westerberg
2022-05-16 13:21 ` Gil Fine
2022-05-16 13:19 ` Mika Westerberg
2022-05-16 13:45 ` Gil Fine
2022-05-16 13:43 ` Greg KH
2022-05-16 14:54 ` Mika Westerberg
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=20220516085903.GC8368@ccdjLinux26 \
--to=gil.fine@intel.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=linux-usb@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=michael.jamet@intel.com \
--cc=mika.westerberg@linux.intel.com \
/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).