All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Voon Weifeng <weifeng.voon@intel.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jose Abreu <joabreu@synopsys.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	Ong Boon Leong <boon.leong.ong@intel.com>,
	Wong Vee Khee <vee.khee.wong@intel.com>
Subject: Re: [RESEND v1 net-next 2/5] net: stmmac: make stmmac_interrupt() function more friendly to MSI
Date: Tue, 16 Mar 2021 14:21:13 -0700	[thread overview]
Message-ID: <20210316142113.40fd721f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <20210316121823.18659-3-weifeng.voon@intel.com>

On Tue, 16 Mar 2021 20:18:20 +0800 Voon Weifeng wrote:
> +	if (unlikely(!dev)) {
> +		netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__);
> +		return IRQ_NONE;
> +	}

Where did this check come from? Please avoid defensive programming 
in the kernel unless you can point out how the condition can arise
legitimately.

WARNING: multiple messages have this Message-ID (diff)
From: Jakub Kicinski <kuba@kernel.org>
To: Voon Weifeng <weifeng.voon@intel.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jose Abreu <joabreu@synopsys.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	Ong Boon Leong <boon.leong.ong@intel.com>,
	Wong Vee Khee <vee.khee.wong@intel.com>
Subject: Re: [RESEND v1 net-next 2/5] net: stmmac: make stmmac_interrupt() function more friendly to MSI
Date: Tue, 16 Mar 2021 14:21:13 -0700	[thread overview]
Message-ID: <20210316142113.40fd721f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <20210316121823.18659-3-weifeng.voon@intel.com>

On Tue, 16 Mar 2021 20:18:20 +0800 Voon Weifeng wrote:
> +	if (unlikely(!dev)) {
> +		netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__);
> +		return IRQ_NONE;
> +	}

Where did this check come from? Please avoid defensive programming 
in the kernel unless you can point out how the condition can arise
legitimately.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-03-16 21:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 12:18 [RESEND v1 net-next 0/5] net: stmmac: enable multi-vector MSI Voon Weifeng
2021-03-16 12:18 ` Voon Weifeng
2021-03-16 12:18 ` [RESEND v1 net-next 1/5] net: stmmac: introduce DMA interrupt status masking per traffic direction Voon Weifeng
2021-03-16 12:18   ` Voon Weifeng
2021-03-16 12:18 ` [RESEND v1 net-next 2/5] net: stmmac: make stmmac_interrupt() function more friendly to MSI Voon Weifeng
2021-03-16 12:18   ` Voon Weifeng
2021-03-16 21:21   ` Jakub Kicinski [this message]
2021-03-16 21:21     ` Jakub Kicinski
2021-03-16 12:18 ` [RESEND v1 net-next 3/5] net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX Voon Weifeng
2021-03-16 12:18   ` Voon Weifeng
2021-03-16 21:29   ` Jakub Kicinski
2021-03-16 21:29     ` Jakub Kicinski
2021-03-24  8:43     ` Voon, Weifeng
2021-03-24  8:43       ` Voon, Weifeng
2021-03-16 12:18 ` [RESEND v1 net-next 4/5] stmmac: intel: add support for multi-vector msi and msi-x Voon Weifeng
2021-03-16 12:18   ` Voon Weifeng
2021-03-16 21:32   ` Jakub Kicinski
2021-03-16 21:32     ` Jakub Kicinski
2021-03-16 12:18 ` [RESEND v1 net-next 5/5] net: stmmac: use interrupt mode INTM=1 for multi-MSI Voon Weifeng
2021-03-16 12:18   ` Voon Weifeng

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=20210316142113.40fd721f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=alexandre.torgue@st.com \
    --cc=andrew@lunn.ch \
    --cc=boon.leong.ong@intel.com \
    --cc=davem@davemloft.net \
    --cc=joabreu@synopsys.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=vee.khee.wong@intel.com \
    --cc=weifeng.voon@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.