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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 D76D5C32771 for ; Wed, 22 Jan 2020 23:47:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A38CD21835 for ; Wed, 22 Jan 2020 23:47:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="In0xdwlg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726167AbgAVXr4 (ORCPT ); Wed, 22 Jan 2020 18:47:56 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:50734 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbgAVXr4 (ORCPT ); Wed, 22 Jan 2020 18:47:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=c7KvBsdgUtN0++kEbgF75xA9hdBSrsxPPPPaLMNB2m0=; b=In0xdwlgg0n2uolrIuJSHS85Nn +3SK8do7ILaWgHGzTkYfrYTRGubo20CXF6/oZgYfcK8VL5CNDRp5Se/U2pskhQSCGGWaJkAdWfkUx 1BbX+zHqbjT3LdGTrXq7BoCsKsec6OdlD3BeKNEBzejwd9VMWRc6T1YrQ2e7dOwGJHrY=; Received: from andrew by vps0.lunn.ch with local (Exim 4.93) (envelope-from ) id 1iuPiz-0004I7-D4; Thu, 23 Jan 2020 00:47:53 +0100 Date: Thu, 23 Jan 2020 00:47:53 +0100 From: Andrew Lunn To: Luigi Rizzo Cc: netdev@vger.kernel.org, "David S. Miller" , Michal Kubecek Subject: Re: [PATCH] net-core: remove unnecessary ETHTOOL_GCHANNELS initialization Message-ID: <20200122234753.GA13647@lunn.ch> References: <20200122223326.187954-1-lrizzo@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200122223326.187954-1-lrizzo@google.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Jan 22, 2020 at 02:33:26PM -0800, Luigi Rizzo wrote: > struct ethtool_channels does not need .cmd to be set when calling the > driver's ethtool methods. Just zero-initialize it. > > Tested: run ethtool -l and ethtool -L Hi Luigi This seems pretty risky. You are assuming ethtool is the only user of this API. What is actually wrong with putting a sane cmd value, rather than the undefined value 0. Andrew