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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2B72C2D0DB for ; Thu, 23 Jan 2020 20:01:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6D92321D7D for ; Thu, 23 Jan 2020 20:01:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729164AbgAWUBL (ORCPT ); Thu, 23 Jan 2020 15:01:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:41158 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727453AbgAWUBL (ORCPT ); Thu, 23 Jan 2020 15:01:11 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7A6E7AC44; Thu, 23 Jan 2020 20:01:09 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 21F09E06F7; Thu, 23 Jan 2020 21:01:06 +0100 (CET) Date: Thu, 23 Jan 2020 21:01:06 +0100 From: Michal Kubecek To: netdev@vger.kernel.org Cc: Luigi Rizzo , Andrew Lunn , "David S. Miller" Subject: Re: [PATCH] net-core: remove unnecessary ETHTOOL_GCHANNELS initialization Message-ID: <20200123200106.GU22304@unicorn.suse.cz> References: <20200122223326.187954-1-lrizzo@google.com> <20200122234753.GA13647@lunn.ch> <20200123084000.GT22304@unicorn.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Jan 23, 2020 at 09:47:56AM -0800, Luigi Rizzo wrote: > > For the same reason though (comply with the header) we might perhaps > want to replace with cmd with ETHTOOL_SCHANNELS before actually > calling dev->ethtool_ops->set_channels() > > (I realize this is not particularly important) That structure is filled by copy_from_user() and the structure passed by userspace already has .cmd = ETHTOOL_SCHANNELS - otherwise we wouldn't end up in ethtool_set_channels(). Michal