Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3c98690 authored by liping.zhang's avatar liping.zhang Committed by David S. Miller
Browse files

net: socket: use pr_info_once to tip the obsolete usage of PF_PACKET



There is no need to use the static variable here, pr_info_once is more
concise.

Signed-off-by: default avatarLiping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 98267311
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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",
		pr_info_once("%s uses obsolete (PF_INET,SOCK_PACKET)\n",
			     current->comm);
		}
		family = PF_PACKET;
	}