From: David Miller <davem@davemloft.net>
To: joel@jms.id.au
Cc: benh@kernel.crashing.org, netdev@vger.kernel.org
Subject: Re: [PATCH] ftgmac100: return error in ftgmac100_alloc_rx_buf
Date: Tue, 25 Jul 2017 21:22:03 -0700 (PDT) [thread overview]
Message-ID: <20170725.212203.942836822088934965.davem@davemloft.net> (raw)
In-Reply-To: <20170725004901.13406-1-joel@jms.id.au>
From: Joel Stanley <joel@jms.id.au>
Date: Tue, 25 Jul 2017 10:19:01 +0930
> The error paths set err, but it's not returned.
>
> I wondered if we should fix all of the callers to check the returned
> value, but Ben explains why the code is this way:
>
>> Most call sites ignore it on purpose. There's nothing we can do if
>> we fail to get a buffer at interrupt time, so we point the buffer to
>> the scratch page so the HW doesn't DMA into lalaland and lose the
>> packet.
>>
>> The one call site that tests and can fail is the one used when brining
>> the interface up. If we fail to allocate at that point, we fail the
>> ifup. But as you noticed, I do have a bug not returning the error.
>
> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
Applied, thanks.
prev parent reply other threads:[~2017-07-26 4:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 0:49 [PATCH] ftgmac100: return error in ftgmac100_alloc_rx_buf Joel Stanley
2017-07-26 4:22 ` David Miller [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=20170725.212203.942836822088934965.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=benh@kernel.crashing.org \
--cc=joel@jms.id.au \
--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