From: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: netdev@vger.kernel.org, yoshihiro.shimoda.uh@renesas.com
Subject: Re: [PATCH 3/8] net: sh-eth: Remove duplicate sh_eth_set_duplex()
Date: Tue, 07 May 2013 14:00:49 +0900 [thread overview]
Message-ID: <51888A81.2000602@renesas.com> (raw)
In-Reply-To: <516FFF53.6010701@cogentembedded.com>
Hi,
(2013/04/18 23:12), Sergei Shtylyov wrote:
> Hello.
>
> On 18-04-2013 11:01, Nobuhiro Iwamatsu wrote:
>
>> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
>
> Step in the right direction.
>
>> diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
>> index 313d6ef..5c4e82c 100644
>> --- a/drivers/net/ethernet/renesas/sh_eth.c
>> +++ b/drivers/net/ethernet/renesas/sh_eth.c
>> @@ -341,9 +341,11 @@ static void sh_eth_select_mii(struct net_device *ndev)
>> }
>> #endif
>>
>> -/* There is CPU dependent code */
>> -#if defined(CONFIG_ARCH_R8A7779)
>> -#define SH_ETH_RESET_DEFAULT 1
>> +#if defined(CONFIG_CPU_SUBTYPE_SH7619) || \
>> + defined(CONFIG_CPU_SUBTYPE_SH7710) || \
>> + defined(CONFIG_CPU_SUBTYPE_SH7712)
>> +# define sh_eth_set_duplex NULL
>
> I don't think this is neeeded at all.
>
>> +#else
>> static void sh_eth_set_duplex(struct net_device *ndev)
>> {
>> struct sh_eth_private *mdp = netdev_priv(ndev);
>> @@ -353,7 +355,11 @@ static void sh_eth_set_duplex(struct net_device *ndev)
>> else /* Half */
>> sh_eth_write(ndev, sh_eth_read(ndev, ECMR) & ~ECMR_DM, ECMR);
>> }
>> +#endif
>>
>> +/* There is CPU dependent code */
>> +#if defined(CONFIG_ARCH_R8A7779)
>> +#define SH_ETH_RESET_DEFAULT 1
>> static void sh_eth_set_rate(struct net_device *ndev)
>> {
>> struct sh_eth_private *mdp = netdev_priv(ndev);
> [...]
>> @@ -834,6 +791,7 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
>> #elif defined(CONFIG_CPU_SUBTYPE_SH7619)
>> #define SH_ETH_RESET_DEFAULT 1
>> static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
>> + .set_duplex = sh_eth_set_duplex,
>
> Please, align = like in other initializers.
> Wait, is this change legitimate at all? You mean NULL will be set here?
> But why bother doing this, when 0s will be set to all fields without
> explicit initializer?
Yah, this is mybad.
>
>> .eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
>>
>> .apr = 1,
>> @@ -845,6 +803,7 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
>> #define SH_ETH_RESET_DEFAULT 1
>> #define SH_ETH_HAS_TSU 1
>> static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
>> + .set_duplex = sh_eth_set_duplex,
>
> Same coments here.
>
I see.
I will remove sh_eth_set_duplex from SH7619, SH7710 and SH7712.
Thanks,
Nobuhiro
next prev parent reply other threads:[~2013-05-07 5:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-18 7:01 [PATCH 1/8] net: sh-eth: Remove ifdef from definition of bit of EDSR and GECMR Nobuhiro Iwamatsu
2013-04-18 7:01 ` [PATCH 2/8] net: sh-eth: Set EDSR_ENALL instead of 0x03 is set to EDSR Nobuhiro Iwamatsu
2013-04-18 7:01 ` [PATCH 3/8] net: sh-eth: Remove duplicate sh_eth_set_duplex() Nobuhiro Iwamatsu
2013-04-18 14:12 ` Sergei Shtylyov
2013-05-07 5:00 ` Nobuhiro Iwamatsu [this message]
2013-04-18 7:01 ` [PATCH 4/8] net: sh-eth: Remove SH_ETH_HAS_TSU and use tsu of sh_eth_cpu_data instead Nobuhiro Iwamatsu
2013-04-18 7:01 ` [PATCH 5/8] net: sh-eth: Add CONFIG_PM to definition of dev_pm_ops Nobuhiro Iwamatsu
2013-04-18 7:01 ` [PATCH 6/8] net: sh-eth: Add irq configureation flags in sh_eth_cpu_data Nobuhiro Iwamatsu
2013-04-18 7:01 ` [PATCH 7/8] net: sh-eth: Remove ifdef for sh_eth_select_mii Nobuhiro Iwamatsu
2013-04-18 7:01 ` [PATCH 8/8] net: sh-eth: Rewrite sh_eth_reset function Nobuhiro Iwamatsu
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=51888A81.2000602@renesas.com \
--to=nobuhiro.iwamatsu.yj@renesas.com \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=yoshihiro.shimoda.uh@renesas.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.