Received: by 10.192.165.148 with SMTP id m20csp1883228imm; Thu, 26 Apr 2018 03:44:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/s9REuzYPei4Yc7PsqWRz1saRCsN6QCn4VoP1C0a0l3QWbDjTVP2+93jxy7KJb6XFSheDP X-Received: by 2002:a17:902:784c:: with SMTP id e12-v6mr33395800pln.60.1524739488696; Thu, 26 Apr 2018 03:44:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524739488; cv=none; d=google.com; s=arc-20160816; b=StMuUqYQ5kgyxO+BQ9QsD4Kth0GIlUN/ctGQYopGKawTEHBmUoQiNylwwxwiPY88ea NeE1B/zQEkWANbam7fcxzt79Qhn72VFj4whYEOjidO6ho0IL46wV/IGwiEfF+DGlwteT wkR+r6ASZmqJAIQoD5IsMgWXNRErkWxtgmEpxkCAYj44aQXZnCWTYHZ2MB7zP4y4ewY5 Yt7BnKW3N81fc/OWnDL/i67FPMczRtUhRrIpxwQkN7aWOMtzPhJSJbhSyLWK4FetTgbo f3mty6iIJKY55QAs2fjTAUAuOSGyeRupF8fMGp9CsiM1mngArwAwkSC5RzCMZv9plHof 2n8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:arc-authentication-results; bh=oMpEXqcpxaVj208gFZLTAM0HroENCslGC8nIc/2T+HE=; b=IGJDHck5b3zw9urnwwvUtgfMYPghEjAc/1Ht4SWn7NtrusCa34nxH8PblyIYIOAU8E SRAdSN7wYlTSoCc5DxQtqLdDuKucm987ldTi7sH7wzHuyw5Sh/DjiH2G3E1yU5HNmCfc jE4qNfKJB6sVP4T9MibJfWcvwLqC5Ft9nfhfbLCpMBqJIbF28LGuvdeIt3dxK0+7MGUO H4FG5JjZ3dcQLSh8/XdGfFjEAp4m/dgr48Sanwg9uyrtoYz28pLyRNRP2Tlz0pXgrSAG QFrrfRitAG6U4C79yB3NdGe/cel8BebVNmQ2wjK2xBXfrT3rVOBpd0USIp9rgztZn08P dbdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=isp8IW1x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n26si16081016pgc.677.2018.04.26.03.44.34; Thu, 26 Apr 2018 03:44:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=isp8IW1x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755635AbeDZKnO (ORCPT + 99 others); Thu, 26 Apr 2018 06:43:14 -0400 Received: from smtprelay.synopsys.com ([198.182.37.59]:58980 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754630AbeDZKnD (ORCPT ); Thu, 26 Apr 2018 06:43:03 -0400 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id 5C6F81E05F3; Thu, 26 Apr 2018 12:43:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1524739381; bh=vBjvjszLfog7Dtoqv7Nh013Z+xnXZD7hkWHtscAvHtk=; h=Subject:To:References:CC:From:Date:In-Reply-To:From; b=isp8IW1xWK8wvMUHjfKtTXs8NwmPHMr6qeF+6DKm5+WcFr/BWnbbsyEDWz0tLwJd7 CfF9dkRSP/u10udFlgy/w/gkdeTaj2tL0L+h4Mz2tZMH+j4eVwbmauW8AjBhdMQp0a lIdmXZvYrK6xZwnIPXiFTgJhOtbk44xFKgBj2BUHormQiot5xkQ6sNNByRnxn1E9KP sZkB/IWqfPb2beThwFCN9Dy+lA0Pv2x3Gzstlhketg+iT0i2lDZzUJKG6Ow2aoHcAQ uEjp8hP6vtqgbOQqklWpRJIDz7+TxEb78xlBg+wIBBkEbRWysnpAUn+Z5ib+q0ewua Qwl6I4cvQW+Xw== Received: from us01wehtc1.internal.synopsys.com (us01wehtc1-vip.internal.synopsys.com [10.12.239.236]) by mailhost.synopsys.com (Postfix) with ESMTP id B4AA5384C; Thu, 26 Apr 2018 03:43:00 -0700 (PDT) Received: from DE02WEHTCB.internal.synopsys.com (10.225.19.94) by us01wehtc1.internal.synopsys.com (10.12.239.231) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 26 Apr 2018 03:43:00 -0700 Received: from DE02WEHTCA.internal.synopsys.com (10.225.19.92) by DE02WEHTCB.internal.synopsys.com (10.225.19.94) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 26 Apr 2018 12:42:58 +0200 Received: from [10.0.2.15] (10.107.19.31) by DE02WEHTCA.internal.synopsys.com (10.225.19.80) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 26 Apr 2018 12:42:58 +0200 Subject: Re: [PATCH] net: dwc-xlgmac: fix xlgmac_xmit()'s return type To: Luc Van Oostenryck , References: <20180424131733.4510-1-luc.vanoostenryck@gmail.com> CC: Jose Abreu , From: Jose Abreu Message-ID: <9521fd13-883b-51ae-de15-393a2da8e62e@synopsys.com> Date: Thu, 26 Apr 2018 11:42:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20180424131733.4510-1-luc.vanoostenryck@gmail.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.107.19.31] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24-04-2018 14:17, Luc Van Oostenryck wrote: > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', > which is a typedef for an enum type, but the implementation in this > driver returns an 'int'. > > Fix this by returning 'netdev_tx_t' in this driver too. > > Signed-off-by: Luc Van Oostenryck > --- I wouldn't do this because of at least two reasons: - xlgmac_xmit() calls xlgmac_maybe_stop_tx_queue() and xlgmac_prep_tso(), and this last one can return a negative error code. I expect some others drivers to have similar behavior. - If you look along net subsystem you will see that this enum is directly converted to an int in later stages. So, and given that you sent a large number of patches about this, perhaps it would be more clear to change the function definition? Thanks and Best Regards, Jose Miguel Abreu