From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E6EAC07E9D for ; Mon, 26 Sep 2022 18:24:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229938AbiIZSX7 (ORCPT ); Mon, 26 Sep 2022 14:23:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229952AbiIZSX1 (ORCPT ); Mon, 26 Sep 2022 14:23:27 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A9CB10E4; Mon, 26 Sep 2022 11:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664216473; x=1695752473; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=UsK+7D3FoPGcFjhaXGMgThTNGxv81x/VXSh4MA3UMJ0=; b=VzhYZqv2eMNK1Z1Nd4OpV4sLBVdC0PMI6fllQpNgX7btJwi+Dru19RzY Yh4iGVA9Asb9XbYNZJnMHL07qgY1cx9IacRf7pzwu8GlMn9CirJ3VXbU9 VgIvCr7dHewvMFL589f7AuN3vrH8MXwVI4btgi7iZxM3Z2ygpdlziOt2W 0iJE6LuPzoyE8iFs86aJlS5SbcnbBdFPyW8teWD+wBDq+PboZ9yy8ff6I wZ2GFzrcQeZ/GB2UXPRFNzk9OjXydmmU1qeer4Eho100wTikngA7dXTwd JgkAdRp/gYfOLlVbhuIlrPaIgTZFnHPftq4NtNMHtodWQTbcsRPo8EqRk A==; X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="281478099" X-IronPort-AV: E=Sophos;i="5.93,346,1654585200"; d="scan'208";a="281478099" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2022 11:21:12 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="746717533" X-IronPort-AV: E=Sophos;i="5.93,346,1654585200"; d="scan'208";a="746717533" Received: from unknown (HELO vcostago-mobl3) ([10.209.47.116]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2022 11:21:12 -0700 From: Vinicius Costa Gomes To: Vladimir Oltean , netdev@vger.kernel.org Cc: Jamal Hadi Salim , Cong Wang , Jiri Pirko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net/sched: taprio: simplify list iteration in taprio_dev_notifier() In-Reply-To: <20220923145921.3038904-1-vladimir.oltean@nxp.com> References: <20220923145921.3038904-1-vladimir.oltean@nxp.com> Date: Mon, 26 Sep 2022 11:21:11 -0700 Message-ID: <87illa80a0.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Vladimir Oltean writes: > taprio_dev_notifier() subscribes to netdev state changes in order to > determine whether interfaces which have a taprio root qdisc have changed > their link speed, so the internal calculations can be adapted properly. > > The 'qdev' temporary variable serves no purpose, because we just use it > only once, and can just as well use qdisc_dev(q->root) directly (or the > "dev" that comes from the netdev notifier; this is because qdev is only > interesting if it was the subject of the state change, _and_ its root > qdisc belongs in the taprio list). > > The 'found' variable also doesn't really serve too much of a purpose > either; we can just call taprio_set_picos_per_byte() within the loop, > and exit immediately afterwards. > > Signed-off-by: Vladimir Oltean > --- Thanks, Reviewed-by: Vinicius Costa Gomes Cheers, -- Vinicius