netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan-Bernd Themann <ossthema@de.ibm.com>
To: Christian Borntraeger <borntrae@de.ibm.com>
Cc: netdev <netdev@vger.kernel.org>,
	linux-ppc <linuxppc-dev@ozlabs.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Marcus Eder <meder@de.ibm.com>,
	Christoph Raisch <raisch@de.ibm.com>,
	Thomas Klein <tklein@de.ibm.com>
Subject: Re: [PATCH 1/6] ehea: interface to network stack
Date: Fri, 11 Aug 2006 13:02:12 +0200	[thread overview]
Message-ID: <44DC63B4.9070405@de.ibm.com> (raw)
In-Reply-To: <200608091108.51774.borntrae@de.ibm.com>

Hi Christian,

thanks for your comments, we'll send an updated patch set soon.

Jan-Bernd

Christian Borntraeger wrote:
> Hi Jan-Bernd,
> 
> I had some minutes, here are some finding after a quick look.
> 
> On Wednesday 09 August 2006 10:38, you wrote:
>> +static struct net_device_stats *ehea_get_stats(struct net_device *dev)
>> +{
>> +	int i;
>> +	u64 hret = H_HARDWARE;
>> +	u64 rx_packets = 0;
>> +	struct ehea_port *port = (struct ehea_port*)dev->priv;
> 
> dev->priv is a void pointer, this cast is unnecessary. When we are at it, have 
> you considered the netdev_priv macro? This will require some prep in 
> alloc_netdev and might not always pe possible. 

good point, we'll use alloc_etherdev / netdev_priv

>> +
>> +	EDEB_DMP(7, (u8*)cb2,
>> +		 sizeof(struct hcp_query_ehea_port_cb_2), "After HCALL");
>> +
>> +	for (i = 0; i < port->num_def_qps; i++) {
>> +		rx_packets += port->port_res[i].rx_packets;
>> +	}
>> +
>> +	stats->tx_packets = cb2->txucp + cb2->txmcp + cb2->txbcp;
>> +	stats->multicast = cb2->rxmcp;
>> +	stats->rx_errors = cb2->rxuerr;
>> +	stats->rx_bytes = cb2->rxo;
>> +	stats->tx_bytes = cb2->txo;
>> +	stats->rx_packets = rx_packets;
>> +
>> +get_stat_exit:
>> +	EDEB_EX(7, "");
>> +	return stats;
>> +}
> 
> again, cb2 is not freed.
> [...]

yep, done

> 
>> +static inline u64 get_swqe_addr(u64 tmp_addr, int addr_seg)
>> +{
>> +	u64 addr;
>> +	addr = tmp_addr;
>> +	return addr;
>> +}
> 
> This is suppsed to change in the future? If not you can get rid of it. 
> 
>> +
>> +static inline u64 get_rwqe_addr(u64 tmp_addr)
>> +{
>> +	return tmp_addr;
>> +}
> 
> same here. 

removed


>> + ehea_poll()
> 
> The poll function seems too long and therefore hard to review. Please consider 
> splitting it. 
> 
> 

done


  reply	other threads:[~2006-08-11 11:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-09  8:38 [PATCH 1/6] ehea: interface to network stack Jan-Bernd Themann
2006-08-09  9:08 ` Christian Borntraeger
2006-08-11 11:02   ` Jan-Bernd Themann [this message]
2006-08-09 13:06 ` Alexey Dobriyan
2006-08-10 14:49   ` Jan-Bernd Themann
2006-08-10  6:15 ` Michael Ellerman
2006-08-10  7:30   ` Michael Ellerman
2006-08-10 14:28   ` Jan-Bernd Themann
2006-08-11 20:56 ` Anton Blanchard
2006-08-14 11:26   ` Jörn Engel
2006-08-14 14:38     ` Anton Blanchard
2006-08-14 15:43       ` Jan-Bernd Themann
2006-08-14 16:59         ` Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2006-06-21 12:40 Jan-Bernd Themann

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=44DC63B4.9070405@de.ibm.com \
    --to=ossthema@de.ibm.com \
    --cc=borntrae@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=meder@de.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=raisch@de.ibm.com \
    --cc=tklein@de.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).