From: David Laight <David.Laight@ACULAB.COM>
To: "'madalin.bucur@nxp.com'" <madalin.bucur@nxp.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: "linuxdev.baldrick@gmail.com" <linuxdev.baldrick@gmail.com>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [net-next 08/13] fsl/fman: check pcsphy pointer before use
Date: Tue, 4 Oct 2016 14:44:12 +0000 [thread overview]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6DB01E2ED3@AcuExch.aculab.com> (raw)
In-Reply-To: <1475566379-5078-9-git-send-email-madalin.bucur@nxp.com>
From: Madalin Bucur
> Sent: 04 October 2016 08:33
> Subject: [net-next 08/13] fsl/fman: check pcsphy pointer before use
..
> --- a/drivers/net/ethernet/freescale/fman/fman_memac.c
> +++ b/drivers/net/ethernet/freescale/fman/fman_memac.c
> @@ -507,6 +507,9 @@ static void setup_sgmii_internal_phy(struct fman_mac *memac,
> {
> u16 tmp_reg16;
>
> + if (WARN_ON(!memac->pcsphy))
> + return;
> +
Why?
Either it can validly be NULL in which case you don't want the message.
Or it shouldn't be NULL in which case you need to find and fix the bug.
The later kernel OOPS will make the bug much easier to find.
David
next prev parent reply other threads:[~2016-10-04 14:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-04 7:32 [net-next 00/13] fsl/fman: cleanup and small fixes Madalin Bucur
2016-10-04 7:32 ` [net-next 01/13] fsl/fman: split lines over 80 characters Madalin Bucur
2016-10-04 7:32 ` [net-next 02/13] fsl/fman: fix loadable module compilation Madalin Bucur
2016-10-04 7:32 ` [net-next 03/13] fsl/fman: small fixes Madalin Bucur
2016-10-04 7:32 ` [net-next 04/13] fsl/fman: use of_get_phy_mode() Madalin Bucur
2016-10-04 7:32 ` [net-next 05/13] fsl/fman: simplify device tree reads Madalin Bucur
2016-10-04 7:32 ` [net-next 06/13] fsl/fman: return a phy_dev pointer from init Madalin Bucur
2016-10-04 7:32 ` [net-next 07/13] fsl/fman: MEMAC may use QSGMII PHY interface mode Madalin Bucur
2016-10-04 7:32 ` [net-next 08/13] fsl/fman: check pcsphy pointer before use Madalin Bucur
2016-10-04 14:44 ` David Laight [this message]
2016-10-05 9:08 ` Madalin-Cristian Bucur
2016-10-04 7:32 ` [net-next 09/13] fsl/fman: check of_get_phy_mode() return value Madalin Bucur
2016-10-04 7:32 ` [net-next 10/13] fsl/fman: simplify redundant condition Madalin Bucur
2016-10-04 7:32 ` [net-next 11/13] fsl/fman: fix return value checking Madalin Bucur
2016-10-04 7:32 ` [net-next 12/13] fsl/fman: remove leftover comment Madalin Bucur
2016-10-04 7:32 ` [net-next 13/13] MAINTAINERS: net: add entry for Freescale QorIQ DPAA FMan driver Madalin Bucur
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=063D6719AE5E284EB5DD2968C1650D6DB01E2ED3@AcuExch.aculab.com \
--to=david.laight@aculab.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxdev.baldrick@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=madalin.bucur@nxp.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