net: socket: use pr_info_once to tip the obsolete usage of PF_PACKET
[linux-block.git] / net / socket.c
index 886649c88d8f4c2e004e11de26e7bafdfec91760..c5ddc52cf2b29b7ec0de0c792697ee1edecaca5c 100644 (file)
@@ -1107,12 +1107,8 @@ int __sock_create(struct net *net, int family, int type, int protocol,
           deadlock in module load.
         */
        if (family == PF_INET && type == SOCK_PACKET) {
-               static int warned;
-               if (!warned) {
-                       warned = 1;
-                       pr_info("%s uses obsolete (PF_INET,SOCK_PACKET)\n",
-                               current->comm);
-               }
+               pr_info_once("%s uses obsolete (PF_INET,SOCK_PACKET)\n",
+                            current->comm);
                family = PF_PACKET;
        }