ipv6: bool/const conversions phase2
[deliverable/linux.git] / drivers / net / ppp / pptp.c
index df884dde2a511c27b95db1edef5848886b6c9abd..72b50f57e7b28df4a0be367c219dc2cee3022739 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/ppp_channel.h>
 #include <linux/ppp_defs.h>
 #include <linux/if_pppox.h>
-#include <linux/if_ppp.h>
+#include <linux/ppp-ioctl.h>
 #include <linux/notifier.h>
 #include <linux/file.h>
 #include <linux/in.h>
@@ -116,8 +116,8 @@ static int lookup_chan_dst(u16 call_id, __be32 d_addr)
        int i;
 
        rcu_read_lock();
-       for (i = find_next_bit(callid_bitmap, MAX_CALLID, 1); i < MAX_CALLID;
-            i = find_next_bit(callid_bitmap, MAX_CALLID, i + 1)) {
+       i = 1;
+       for_each_set_bit_from(i, callid_bitmap, MAX_CALLID) {
                sock = rcu_dereference(callid_sock[i]);
                if (!sock)
                        continue;
@@ -481,7 +481,7 @@ static int pptp_connect(struct socket *sock, struct sockaddr *uservaddr,
 
        po->chan.mtu = dst_mtu(&rt->dst);
        if (!po->chan.mtu)
-               po->chan.mtu = PPP_MTU;
+               po->chan.mtu = PPP_MRU;
        ip_rt_put(rt);
        po->chan.mtu -= PPTP_HEADER_OVERHEAD;
 
@@ -670,10 +670,8 @@ static int __init pptp_init_module(void)
        pr_info("PPTP driver version " PPTP_DRIVER_VERSION "\n");
 
        callid_sock = vzalloc((MAX_CALLID + 1) * sizeof(void *));
-       if (!callid_sock) {
-               pr_err("PPTP: cann't allocate memory\n");
+       if (!callid_sock)
                return -ENOMEM;
-       }
 
        err = gre_add_protocol(&gre_pptp_protocol, GREPROTO_PPTP);
        if (err) {
This page took 0.046329 seconds and 5 git commands to generate.