Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1185563ybc; Tue, 19 Nov 2019 16:14:58 -0800 (PST) X-Google-Smtp-Source: APXvYqz77RY/+nyssC56tZ+ecJkkAGSbOJyNpuljglONc2I4QtgTJev8+xjigxwBX7xf80MdKD18 X-Received: by 2002:adf:edc5:: with SMTP id v5mr134862wro.322.1574208898805; Tue, 19 Nov 2019 16:14:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574208898; cv=none; d=google.com; s=arc-20160816; b=F/xmJiqwsbDmUVy93RGq1tgUU/FTkwrc7Bv+JYKwWN8yyCvdZEjDuPN1DsR468ry0a v9AcpXuOCUS1vxdGMxGy2382oZy9Mdv1Cz0J4bhpXZ7nuhCbAtT0WRIrgm5zGZruj5Es a01TgMeWKTne23DdLkipcPg/2+Cj0jLkWK8nxZO1tvlu0qTYHA0FHzhT3gu6+ievYgZG c0QpJGcsFE9lvC+hG9jxj0f5i3mUMG39QDocTGWRu6wsZb84uUJl32Tjy3C8GEf6RZfu 8sbxxR8TTZ3M32uqqTtaaZQMXYmz7UQ9XvHwTJlz9RZXTa9SN1oAOS3VqjRFnookLIyE a87g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MoB+EnvvzF+TKOzDdDl2FIhJAJ8fgDbMtbJ023hVTI4=; b=fnlXt411ebDjy8/L3N9GZKDj6k3uV13I956byq25zJgpvguEYbPsqnqxk/XGuAP4rB Mtgw1Aeu121VISn5tUUX6LTeKjFPHmZyBUcbPuwcIvRpwJVs7JYQ7ay5olXUVAZhKIXs yuEZ80pQHyC9tuaZeL/fbh42kB7KTdHP+U7Y3GhbkK1oP4tBW7NVLZFMuGC90HHQQm6B eryVdnNFBlv5EEytomX0qDGJkyJIOn8aqaRwSkBK5p6it5vNso2ZyxCpqGBBiGC5MEey Spe+gf9omgjx2qbe6F94wJE13y9JdR9THSvDzkuMK1bqeQfNt+wKMFIaUTA6wB4eRrME NQfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=n6HD1bl3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g15si18043789edl.95.2019.11.19.16.14.34; Tue, 19 Nov 2019 16:14:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=n6HD1bl3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727574AbfKTAKt (ORCPT + 99 others); Tue, 19 Nov 2019 19:10:49 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43057 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727390AbfKTAKs (ORCPT ); Tue, 19 Nov 2019 19:10:48 -0500 Received: by mail-wr1-f68.google.com with SMTP id n1so25997980wra.10; Tue, 19 Nov 2019 16:10:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MoB+EnvvzF+TKOzDdDl2FIhJAJ8fgDbMtbJ023hVTI4=; b=n6HD1bl3yqCxiiZi/5cAU7oaqd3YvVeEzm0imWuGoncldGWUBcBJFY+tUYFnUvc6NR ruC3CkPh4rl7UQaou1MLZgqlZ3gbze8sWqx7fvrkYBgjxkDVQkMepCnFoa69p3ufqSus 0UzveAt1dil/L3VK6mHkZxeC8Tpo8RuYqm7CgEmHaV/Led8vAg6QXk0ssyyct1K6cubq ByRJ7MYJ//J4apv+UBVkJqaTqEGtlYBCH+NuFPf9wSOMh0e100+aKvmfHEWH5/qz8Quw 4QZz3p3h3qxHu15IRDch1dTPst+dBtvqdgxX9PZN+nHq/eBTMYhUyaewgWLIZgXSWwHB MQFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MoB+EnvvzF+TKOzDdDl2FIhJAJ8fgDbMtbJ023hVTI4=; b=OmgKKv1GwtnrMMa2UQ1Uu6B2VJ7vdkHF6COUOfjJBcyul9nEHqUKXR9jfjq9/QzDNz n2RHfmGMd+KY2EBkirFnBPXXPd/fVNjgCoheK9d0bamkZwrY9+5pKjHVMtItPC5bsMBq DG5B6WPo5sQO3WNpbX4Tw3P7OQbTKq6bEQFVzGR2kE0kzkei+rigBEBNmpj4IPplq9TH FX5Pfe/tpVCAsDBZFuVmnK14jmcnEe8mku0+8T1S/SEGWH7IerH9YXXKoWEOFrpO8uJr ZULIdx6a+cqHtq/2XUAy3mgl2de43+8fL0PKZitRrF62TOKK6e5wwPBMnIRCmOOJMfP3 Kqrw== X-Gm-Message-State: APjAAAVXK0ZPPEVB2oAi1+pSwLhj7Tsp3K/Z+jvEUtnosAyYzThMpu95 AymOr/4Ih1qigqcpdoJrh4poli55 X-Received: by 2002:adf:c401:: with SMTP id v1mr90873wrf.375.1574208645317; Tue, 19 Nov 2019 16:10:45 -0800 (PST) Received: from localhost.localdomain ([2a02:a03f:40e1:9900:5dce:1599:e3b5:7d61]) by smtp.gmail.com with ESMTPSA id r25sm4781457wmh.6.2019.11.19.16.10.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Nov 2019 16:10:44 -0800 (PST) From: Luc Van Oostenryck To: linux-kernel@vger.kernel.org Cc: Luc Van Oostenryck , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Magnus Karlsson , Jonathan Lemon , netdev@vger.kernel.org Subject: [PATCH] xsk: fix xsk_poll()'s return type Date: Wed, 20 Nov 2019 01:10:42 +0100 Message-Id: <20191120001042.30830-1-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org xsk_poll() is defined as returning 'unsigned int' but the .poll method is declared as returning '__poll_t', a bitwise type. Fix this by using the proper return type and using the EPOLL constants instead of the POLL ones, as required for __poll_t. CC: Björn Töpel CC: Magnus Karlsson CC: Jonathan Lemon CC: netdev@vger.kernel.org Signed-off-by: Luc Van Oostenryck --- net/xdp/xsk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 9044073fbf22..7b59f36eec0d 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@ -418,10 +418,10 @@ static int xsk_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len) return __xsk_sendmsg(sk); } -static unsigned int xsk_poll(struct file *file, struct socket *sock, +static __poll_t xsk_poll(struct file *file, struct socket *sock, struct poll_table_struct *wait) { - unsigned int mask = datagram_poll(file, sock, wait); + __poll_t mask = datagram_poll(file, sock, wait); struct sock *sk = sock->sk; struct xdp_sock *xs = xdp_sk(sk); struct net_device *dev; @@ -443,9 +443,9 @@ static unsigned int xsk_poll(struct file *file, struct socket *sock, } if (xs->rx && !xskq_empty_desc(xs->rx)) - mask |= POLLIN | POLLRDNORM; + mask |= EPOLLIN | EPOLLRDNORM; if (xs->tx && !xskq_full_desc(xs->tx)) - mask |= POLLOUT | POLLWRNORM; + mask |= EPOLLOUT | EPOLLWRNORM; return mask; } -- 2.24.0