Re: Removing if_type switches in if_vlan.c

2015-04-21 Thread Ryota Ozaki
On Tue, Apr 21, 2015 at 10:40 PM, Matt Thomas  wrote:
>
>> On Apr 21, 2015, at 12:47 AM, Ryota Ozaki  wrote:
>>
>> Hi,
>>
>> There are several if_type switches in if_vlan.c,
>> which were introduced to support other hardware
>> types such as FDDI many years ago. However, no
>> implement hadn't come since then.
>
> Doesn't mean they aren't correct.  Leave them.

Correct but useless in the now...

>
>> I think there is no reason to keep them and
>> I want to get rid of them to improve code
>> readability.
>>
>> Any objections?
>
> Yes.  The one in vlan_config must stay for
> correctness.  The one is vlan_unconfig doesn't
> hurt.  If you remove the other switches, at
> least add a KASSERT() to make sure it's IFT_ETHER.

Oh sorry, I intended to add some checks for that,
not just removing the switches.

Here is a patch: http://www.netbsd.org/~ozaki-r/vlan_remove_switches.diff

Thanks,
  ozaki-r


Re: Removing if_type switches in if_vlan.c

2015-04-21 Thread Matt Thomas

> On Apr 21, 2015, at 12:47 AM, Ryota Ozaki  wrote:
> 
> Hi,
> 
> There are several if_type switches in if_vlan.c,
> which were introduced to support other hardware
> types such as FDDI many years ago. However, no
> implement hadn't come since then.

Doesn’t mean they aren’t correct.  Leave them.

> I think there is no reason to keep them and
> I want to get rid of them to improve code
> readability.
> 
> Any objections?

Yes.  The one in vlan_config must stay for
correctness.  The one is vlan_unconfig doesn’t
hurt.  If you remove the other switches, at
least add a KASSERT() to make sure it’s IFT_ETHER.



Re: Removing USE_RADIX in ip_encap.c

2015-04-21 Thread Ryota Ozaki
On Wed, Apr 15, 2015 at 4:48 PM, Ryota Ozaki  wrote:
> Hi,
>
> It seems USE_RADIX switch in ip_encap.c is always
> on for years and nobody uses non-USE_RADIX case.
> (It even cannot be built w/o USE_RADIX.)
>
> I'll remove the switch in a few days if there is
> no objection.

I did it as ip_encap.c,v 1.45 :)

  ozaki-r


Removing if_type switches in if_vlan.c

2015-04-21 Thread Ryota Ozaki
Hi,

There are several if_type switches in if_vlan.c,
which were introduced to support other hardware
types such as FDDI many years ago. However, no
implement hadn't come since then.

I think there is no reason to keep them and
I want to get rid of them to improve code
readability.

Any objections?

  ozaki-r