Netdev List
 help / color / mirror / Atom feed
From: Jose Abreu <Jose.Abreu@synopsys.com>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
	<linux-kernel@vger.kernel.org>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>, <netdev@vger.kernel.org>
Subject: Re: [PATCH] net: dwc-xlgmac: fix xlgmac_xmit()'s return type
Date: Thu, 26 Apr 2018 11:42:55 +0100	[thread overview]
Message-ID: <9521fd13-883b-51ae-de15-393a2da8e62e@synopsys.com> (raw)
In-Reply-To: <20180424131733.4510-1-luc.vanoostenryck@gmail.com>

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 <luc.vanoostenryck@gmail.com>
> ---

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

      reply	other threads:[~2018-04-26 10:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-24 13:17 [PATCH] net: dwc-xlgmac: fix xlgmac_xmit()'s return type Luc Van Oostenryck
2018-04-26 10:42 ` Jose Abreu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9521fd13-883b-51ae-de15-393a2da8e62e@synopsys.com \
    --to=jose.abreu@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox