Received: by 10.213.65.68 with SMTP id h4csp1742190imn; Sun, 1 Apr 2018 13:44:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx49isfqsNw0pQpTWS8uoOoX+xdHALVY7khbVkaHvCEtQpQzCZcKk5uoxYM4WkEsc3nrBh7Un X-Received: by 10.98.163.68 with SMTP id s65mr5441401pfe.13.1522615498854; Sun, 01 Apr 2018 13:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522615498; cv=none; d=google.com; s=arc-20160816; b=SesbocHVV5xRBNtJrDLN0Yo8wIRGZiU/+8iUvet0Yz2UoPqvGL17arFWbTTQVCqxXz 7eUmmTnu2Avdt42PGtjqVfmfLNKGrEVUGr8IxR+aYSqdtHBkLFzwyraK9uaieGwx2HC0 XHH6f05wlIis/RFbXNnb1UcKuVpF7x01pTc4uQzn2EOdqq1EXByfZVlxBn9Rza1bZ6A8 +YCFNKIILH306lW1+oQ4DNSmkzBUlA8V717KxAthQ5gLxPXuz3DwOgmBA6Wn1WxlUgBb SXuM/RdH94O1P0Y3w+mOA+5sDV500CXrj7cE7ArG+hFAbedJvztjp/jNBQLEE8qZyMLX z9iw== 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 :user-agent:references:in-reply-to:message-id:date:to:from:subject :organization:arc-authentication-results; bh=xt9xMBzodKL8cfH6SOuDpa8wLD7vfh0YhnQuf9XIUjA=; b=KTTqkcixgUNbqt7/czu9Q6uGnB8dJ6dZ/fHYrDht1WMIy0pJ719KyOqJSx3pP0NN+0 qDJ7wp80W1kCzTc+xc6ObmzxkY7IUjizy5yLYk3sWmLozbAx673ITVBHGCf37pSsdn4H I4fqYEX1Gl12ydiU6NdnwW+qfYX9ZANKxe5/I8wAkXvFZX7esjmv/1Ybt41EzSCfXe3J TwZ6xFCWBk4uqxxH7xJLNF7T/bt9xiJ0/dJg1DUgKMCqGnWbnxjnBO8c69AwN6pQ3xou vkoXdbvrseY02s4cvwpEKZ8leZ622U0rKnGhT6Eap2mJlu+X+hWMa8OwVxqdmtXh9NpI ij8A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si8684416pgc.428.2018.04.01.13.44.45; Sun, 01 Apr 2018 13:44:58 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754554AbeDAUnc (ORCPT + 99 others); Sun, 1 Apr 2018 16:43:32 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:42190 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754147AbeDAUn3 (ORCPT ); Sun, 1 Apr 2018 16:43:29 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8B1CC4023141 for ; Sun, 1 Apr 2018 20:43:28 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-59.rdu2.redhat.com [10.10.120.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3B9A82166BC7; Sun, 1 Apr 2018 20:43:28 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 32/45] C++: __to_fd() needs to reduce the size of v for struct fd::flags From: David Howells To: linux-kernel@vger.kernel.org Date: Sun, 01 Apr 2018 21:43:27 +0100 Message-ID: <152261540772.30503.1698627927664620191.stgit@warthog.procyon.org.uk> In-Reply-To: <152261521484.30503.16131389653845029164.stgit@warthog.procyon.org.uk> References: <152261521484.30503.16131389653845029164.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Sun, 01 Apr 2018 20:43:28 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Sun, 01 Apr 2018 20:43:28 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dhowells@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org __to_fd() needs to reduce the size of v before it assigns the computed value to fd::flags or suffer a warning about reduction of size of integer. Signed-off-by: David Howells --- include/linux/file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/file.h b/include/linux/file.h index 279720db984a..9807271c850a 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -49,7 +49,7 @@ extern void __f_unlock_pos(struct file *); static inline struct fd __to_fd(unsigned long v) { - return (struct fd){(struct file *)(v & ~3),v & 3}; + return (struct fd){(struct file *)(v & ~3), (unsigned int)v & 3}; } static inline struct fd fdget(unsigned int fd)