Re: [PATCH net-next 1/1] driver: tun: Use new macro SOCK_IOC_MAGIC instead of literal number 0x89

2016-10-26 Thread Gao Feng
Hi David, On Wed, Oct 26, 2016 at 7:12 PM, David Laight wrote: > From: f...@ikuai8.com >> Sent: 25 October 2016 13:56 >> The current codes use _IOC_TYPE(cmd) == 0x89 to check if the cmd is one >> socket ioctl command like SIOCGIFHWADDR. But the literal number 0x89 may >>

RE: [PATCH net-next 1/1] driver: tun: Use new macro SOCK_IOC_MAGIC instead of literal number 0x89

2016-10-26 Thread David Laight
From: f...@ikuai8.com > Sent: 25 October 2016 13:56 > The current codes use _IOC_TYPE(cmd) == 0x89 to check if the cmd is one > socket ioctl command like SIOCGIFHWADDR. But the literal number 0x89 may > confuse readers. So create one macro SOCK_IOC_MAGIC like SPI_IOC_MAGIC to > enhance the

[PATCH net-next 1/1] driver: tun: Use new macro SOCK_IOC_MAGIC instead of literal number 0x89

2016-10-25 Thread fgao
From: Gao Feng The current codes use _IOC_TYPE(cmd) == 0x89 to check if the cmd is one socket ioctl command like SIOCGIFHWADDR. But the literal number 0x89 may confuse readers. So create one macro SOCK_IOC_MAGIC like SPI_IOC_MAGIC to enhance the readability. Signed-off-by: Gao