lkml.org 
[lkml]   [2022]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [net-next PATCH v3 01/14] net: dsa: qca8k: cache match data to speed up access
On Sun, Jul 24, 2022 at 10:42:20PM +0200, Christian Marangi wrote:
> Sure, it was just a stupid idea to set everything not strictly neeeded
> only after verifying that we have a correct switch... But it doesn't
> make sense as qca8k_priv is freed anyway if that's the case.

I don't understand what you're saying. With your proposed logic,
of_device_get_match_data() will be called anyway in qca8k_read_switch_id(),
and if the switch id is valid, it will be called once more in qca8k_sw_probe().
With my proposed logic, of_device_get_match_data() will be called exactly
once, to populate priv->info *before* the first instance of when it's
going to be needed.

\
 
 \ /
  Last update: 2022-07-25 01:19    [W:0.055 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site