From: joe@perches.com (Joe Perches)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH net-next v13 3/3] net: hisilicon: new hip04 ethernet driver
Date: Wed, 14 Jan 2015 00:06:22 -0800 [thread overview]
Message-ID: <1421222782.2847.1.camel@perches.com> (raw)
In-Reply-To: <1421217254-12008-4-git-send-email-dingtianhong@huawei.com>
On Wed, 2015-01-14 at 14:34 +0800, Ding Tianhong wrote:
> Support Hisilicon hip04 ethernet driver, including 100M / 1000M controller.
> The controller has no tx done interrupt, reclaim xmitted buffer in the poll.
Single comment:
> diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c
[]
> +static int hip04_rx_poll(struct napi_struct *napi, int budget)
> +{
[]
> + while (cnt && !last) {
> + buf = priv->rx_buf[priv->rx_head];
> + skb = build_skb(buf, priv->rx_buf_size);
> + if (unlikely(!skb))
> + net_dbg_ratelimited("build_skb failed\n");
> +
> + dma_unmap_single(&ndev->dev, priv->rx_phys[priv->rx_head],
> + RX_BUF_SIZE, DMA_FROM_DEVICE);
> + priv->rx_phys[priv->rx_head] = 0;
> +
> + desc = (struct rx_desc *)skb->data;
Perhaps if (!skb) is possible, there shouldn't be
a dereference of that known null here.
WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe@perches.com>
To: Ding Tianhong <dingtianhong@huawei.com>
Cc: arnd@arndb.de, robh+dt@kernel.org, davem@davemloft.net,
grant.likely@linaro.org, agraf@suse.de,
sergei.shtylyov@cogentembedded.com,
linux-arm-kernel@lists.infradead.org, eric.dumazet@gmail.com,
xuwei5@hisilicon.com, zhangfei.gao@linaro.org,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux@arm.linux.org.uk
Subject: Re: [PATCH net-next v13 3/3] net: hisilicon: new hip04 ethernet driver
Date: Wed, 14 Jan 2015 00:06:22 -0800 [thread overview]
Message-ID: <1421222782.2847.1.camel@perches.com> (raw)
In-Reply-To: <1421217254-12008-4-git-send-email-dingtianhong@huawei.com>
On Wed, 2015-01-14 at 14:34 +0800, Ding Tianhong wrote:
> Support Hisilicon hip04 ethernet driver, including 100M / 1000M controller.
> The controller has no tx done interrupt, reclaim xmitted buffer in the poll.
Single comment:
> diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c
[]
> +static int hip04_rx_poll(struct napi_struct *napi, int budget)
> +{
[]
> + while (cnt && !last) {
> + buf = priv->rx_buf[priv->rx_head];
> + skb = build_skb(buf, priv->rx_buf_size);
> + if (unlikely(!skb))
> + net_dbg_ratelimited("build_skb failed\n");
> +
> + dma_unmap_single(&ndev->dev, priv->rx_phys[priv->rx_head],
> + RX_BUF_SIZE, DMA_FROM_DEVICE);
> + priv->rx_phys[priv->rx_head] = 0;
> +
> + desc = (struct rx_desc *)skb->data;
Perhaps if (!skb) is possible, there shouldn't be
a dereference of that known null here.
next prev parent reply other threads:[~2015-01-14 8:06 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 6:34 [PATCH net-next v13 0/3] add hisilicon hip04 ethernet driver Ding Tianhong
2015-01-14 6:34 ` Ding Tianhong
2015-01-14 6:34 ` Ding Tianhong
2015-01-14 6:34 ` [PATCH net-next v13 1/3] Documentation: add Device tree bindings for Hisilicon hip04 ethernet Ding Tianhong
2015-01-14 6:34 ` Ding Tianhong
2015-01-14 6:34 ` Ding Tianhong
2015-01-14 6:34 ` [PATCH net-next v13 2/3] net: hisilicon: new hip04 MDIO driver Ding Tianhong
2015-01-14 6:34 ` Ding Tianhong
2015-01-14 6:34 ` Ding Tianhong
2015-01-14 6:34 ` [PATCH net-next v13 3/3] net: hisilicon: new hip04 ethernet driver Ding Tianhong
2015-01-14 6:34 ` Ding Tianhong
2015-01-14 6:34 ` Ding Tianhong
2015-01-14 8:06 ` Joe Perches [this message]
2015-01-14 8:06 ` Joe Perches
2015-01-15 2:56 ` Ding Tianhong
2015-01-15 2:56 ` Ding Tianhong
2015-01-15 2:56 ` Ding Tianhong
2015-01-14 8:53 ` Arnd Bergmann
2015-01-14 8:53 ` Arnd Bergmann
2015-01-15 2:54 ` Ding Tianhong
2015-01-15 2:54 ` Ding Tianhong
2015-01-15 2:54 ` Ding Tianhong
2015-01-15 9:05 ` Arnd Bergmann
2015-01-15 9:05 ` Arnd Bergmann
2015-01-14 16:34 ` Eric Dumazet
2015-01-14 16:34 ` Eric Dumazet
2015-01-15 10:29 ` Ding Tianhong
2015-01-15 10:29 ` Ding Tianhong
2015-01-15 10:29 ` Ding Tianhong
2015-01-15 12:30 ` Arnd Bergmann
2015-01-15 12:30 ` Arnd Bergmann
2015-01-15 4:39 ` Joe Perches
2015-01-15 4:39 ` Joe Perches
2015-01-15 10:28 ` Ding Tianhong
2015-01-15 10:28 ` Ding Tianhong
2015-01-15 10:28 ` Ding Tianhong
2015-01-15 9:53 ` Arnd Bergmann
2015-01-15 9:53 ` Arnd Bergmann
2015-01-19 18:11 ` Alexander Graf
2015-01-19 18:11 ` Alexander Graf
2015-01-19 20:34 ` Arnd Bergmann
2015-01-19 20:34 ` Arnd Bergmann
2015-01-20 2:15 ` Ding Tianhong
2015-01-20 2:15 ` Ding Tianhong
2015-01-20 2:15 ` Ding Tianhong
2015-01-20 12:01 ` Arnd Bergmann
2015-01-20 12:01 ` Arnd Bergmann
2015-01-20 18:12 ` Joe Perches
2015-01-20 18:12 ` Joe Perches
2015-01-14 10:19 ` [PATCH net-next v13 0/3] add hisilicon " Alexander Graf
2015-01-14 10:19 ` Alexander Graf
2015-01-15 8:37 ` Ding Tianhong
2015-01-15 8:37 ` Ding Tianhong
2015-01-15 8:37 ` Ding Tianhong
2015-01-15 9:42 ` Arnd Bergmann
2015-01-15 9:42 ` Arnd Bergmann
2015-01-15 12:39 ` Alexander Graf
2015-01-15 12:39 ` Alexander Graf
2015-01-15 12:56 ` Ding Tianhong
2015-01-15 12:56 ` Ding Tianhong
2015-01-15 12:56 ` Ding Tianhong
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=1421222782.2847.1.camel@perches.com \
--to=joe@perches.com \
--cc=linux-arm-kernel@lists.infradead.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 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.