aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet/sysctl_net_decnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/decnet/sysctl_net_decnet.c')
-rw-r--r--net/decnet/sysctl_net_decnet.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c
index 0e9d2c571165..bda5920215fd 100644
--- a/net/decnet/sysctl_net_decnet.c
+++ b/net/decnet/sysctl_net_decnet.c
@@ -86,9 +86,9 @@ static void strip_it(char *str)
86 * Simple routine to parse an ascii DECnet address 86 * Simple routine to parse an ascii DECnet address
87 * into a network order address. 87 * into a network order address.
88 */ 88 */
89static int parse_addr(dn_address *addr, char *str) 89static int parse_addr(__le16 *addr, char *str)
90{ 90{
91 dn_address area, node; 91 __u16 area, node;
92 92
93 while(*str && !ISNUM(*str)) str++; 93 while(*str && !ISNUM(*str)) str++;
94 94
@@ -139,7 +139,7 @@ static int dn_node_address_strategy(ctl_table *table, int __user *name, int nlen
139 void **context) 139 void **context)
140{ 140{
141 size_t len; 141 size_t len;
142 dn_address addr; 142 __le16 addr;
143 143
144 if (oldval && oldlenp) { 144 if (oldval && oldlenp) {
145 if (get_user(len, oldlenp)) 145 if (get_user(len, oldlenp))
@@ -147,14 +147,14 @@ static int dn_node_address_strategy(ctl_table *table, int __user *name, int nlen
147 if (len) { 147 if (len) {
148 if (len != sizeof(unsigned short)) 148 if (len != sizeof(unsigned short))
149 return -EINVAL; 149 return -EINVAL;
150 if (put_user(decnet_address, (unsigned short __user *)oldval)) 150 if (put_user(decnet_address, (__le16 __user *)oldval))
151 return -EFAULT; 151 return -EFAULT;
152 } 152 }
153 } 153 }
154 if (newval && newlen) { 154 if (newval && newlen) {
155 if (newlen != sizeof(unsigned short)) 155 if (newlen != sizeof(unsigned short))
156 return -EINVAL; 156 return -EINVAL;
157 if (get_user(addr, (unsigned short __user *)newval)) 157 if (get_user(addr, (__le16 __user *)newval))
158 return -EFAULT; 158 return -EFAULT;
159 159
160 dn_dev_devices_off(); 160 dn_dev_devices_off();
@@ -173,7 +173,7 @@ static int dn_node_address_handler(ctl_table *table, int write,
173{ 173{
174 char addr[DN_ASCBUF_LEN]; 174 char addr[DN_ASCBUF_LEN];
175 size_t len; 175 size_t len;
176 dn_address dnaddr; 176 __le16 dnaddr;
177 177
178 if (!*lenp || (*ppos && !write)) { 178 if (!*lenp || (*ppos && !write)) {
179 *lenp = 0; 179 *lenp = 0;