Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp262795lqr; Wed, 5 Jun 2024 05:35:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUMfjbebv+9ugqMG4cWLNSxM7YEMOkyE/pEWcGKewyca3BKn5fPsl43HD3Sw+IkfBlX73oZN+lFXSUKvzqg0zScNmkaXT9WAuG6xWAIkw== X-Google-Smtp-Source: AGHT+IH+1ep7NZqwEXcrYOctMuZe+aSmOpK3qV9zZ9bBCMTJhE5wrfwKgvPsUn4yhHdylu91/BF9 X-Received: by 2002:a17:906:680e:b0:a62:1347:ad40 with SMTP id a640c23a62f3a-a699f681e99mr147651266b.16.1717590922177; Wed, 05 Jun 2024 05:35:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717590922; cv=pass; d=google.com; s=arc-20160816; b=L9b6dTm6eQmhHNOlRQ15U18mPkD0qveJt1a5ib+N2uHdas1A5JaJc4mpu1w0Sv19Lt u+HAiIcvOpEP4IuHB+F5Bsvtr29Fzy/AWA9irYtIyBG4o92JDZqMz1Y6o4ae2RX/JBHX iHHEtduz5lz0kdu9iZEFdFWx3n/7DKGPZCIVzoD0g8Bjsqazk8u1+GA5azCBh4EzFl8g ODeSS/dUf3dbLwfAFxpDcjFqtZMtw1idpAvoGpAZVRDPMgSv/RNen+6J4PoWy/ZpH5VJ kiLbiWf2IHaxUAS8ZsEhtFCXR9zpfp2eOvXsWTXzkhf6f3x25RPf+X5STTWBCqVjncoM 9Ojw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=uK0nDnVgXWDMYFywjn9DfRxgnz/u0mDYQ1OI5o0PAlc=; fh=lVqxIBCzjhcbhh5dcuOpkhlww56fsitthDoznTM5K+I=; b=wQh6Q9bgXJaCE8xa+PfBgwiFlb7Sne0d2FYmDqL/78sgRTTzqbPHkUJ3+7gZ0Mr+Zt rWuj1bmY71jyLNRUNDCYDtd7o2o3o84fn+B4/DxTVXtftY6v9nd71BLeSacXkXV+7TSm XxoY/saslHasKgfH8JvT3/f+/Gwgd5B2p8CzeYL7QH3AmEucwb0eWzxYb6gDvr55etqw yY12PQfAZCJSjiEp7Q0c4PioyYYUXQE213+R/BTIJAQNXH+stBE1uDbQ3k54fzusfMrl 0+RTtDdJ76F9UXEQ/HVCcWZJMXU9xNrrE1u8KxL4oHISDrYLyLWXNcNCFzyKcn4bMgY2 7vKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hysBa1kQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202478-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202478-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a68cf33b35fsi427687966b.37.2024.06.05.05.35.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 05:35:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202478-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hysBa1kQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202478-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202478-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E06361F218A9 for ; Wed, 5 Jun 2024 12:35:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1BE7221C17A; Wed, 5 Jun 2024 12:03:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hysBa1kQ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3DB451993B0; Wed, 5 Jun 2024 12:03:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717589005; cv=none; b=LGyZe9nCDth0kTF/9Yr1ze5j/UgHsVHi9dll+89hMiiTir3pAPMvzlJGkV7T3kdUi8yTimcY7qow7+II5vdD07G2l6rGMoAykJo9F+ONs+svwH8aQiW4p5LN6DR2/uUd/AkTNAVpc62fsm0kZZ9gbQ35FCY8u76CfMa4iI7Z9wM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717589005; c=relaxed/simple; bh=IGgKpx5j1MkOyKp+cg7XNRPiZbHX1nqPZwkHTCb2kNA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PBHpSLx1NIYb6cqZzMlWkA8RcYt9e1wpGvKJb/9pH/zem1ed+NAi7AZT4gh4lfCDCHscDCqrDshkyo6Q1A+8876/X/zXQDSPf6CqNzBRvpqk4+KrPlPi5yMKT5bQv3tpUp+xCrPSI9kDApYhYhHudk9kkOcWie73u45Nq9e7kyU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hysBa1kQ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E24BAC3277B; Wed, 5 Jun 2024 12:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717589004; bh=IGgKpx5j1MkOyKp+cg7XNRPiZbHX1nqPZwkHTCb2kNA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hysBa1kQ3yVT+0xayW/X2DvC3+pa2+KWmA+hkKTX7NxKPwm2d+9GAUnowT4IkUPF3 RWHmneIi1OHSACefQd1YFbMBWFZ86cBoNyzJfF5kfphrs4zWxIghMtGvpczCk4d5/S Wh7t1Ci7DTqSCoofL9jwh5bXf6mTf7pWiQHXdaFSP7OjvphCcw3+iUUr87AgXzlKZK WienSsBAYn7zxSkjwEimrEDm+99F6X6hk/Etu1lEI1no359m4LaYIl8ebXZSBLBrht ugbeP/5Z21gh4SFIrf9Hc9BzWdj01V9QtdXjKv+G+IRXQUIpVGklH3eK0RsdG1jdld FQhQA2LPQQs2w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Matt Jan , "David S . Miller" , Sasha Levin , edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 6.8 03/18] connector: Fix invalid conversion in cn_proc.h Date: Wed, 5 Jun 2024 08:02:53 -0400 Message-ID: <20240605120319.2966627-3-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240605120319.2966627-1-sashal@kernel.org> References: <20240605120319.2966627-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.8.12 Content-Transfer-Encoding: 8bit From: Matt Jan [ Upstream commit 06e785aeb9ea8a43d0a3967c1ba6e69d758e82d4 ] The implicit conversion from unsigned int to enum proc_cn_event is invalid, so explicitly cast it for compilation in a C++ compiler. /usr/include/linux/cn_proc.h: In function 'proc_cn_event valid_event(proc_cn_event)': /usr/include/linux/cn_proc.h:72:17: error: invalid conversion from 'unsigned int' to 'proc_cn_event' [-fpermissive] 72 | ev_type &= PROC_EVENT_ALL; | ^ | | | unsigned int Signed-off-by: Matt Jan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- include/uapi/linux/cn_proc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/uapi/linux/cn_proc.h b/include/uapi/linux/cn_proc.h index f2afb7cc4926c..18e3745b86cd4 100644 --- a/include/uapi/linux/cn_proc.h +++ b/include/uapi/linux/cn_proc.h @@ -69,8 +69,7 @@ struct proc_input { static inline enum proc_cn_event valid_event(enum proc_cn_event ev_type) { - ev_type &= PROC_EVENT_ALL; - return ev_type; + return (enum proc_cn_event)(ev_type & PROC_EVENT_ALL); } /* -- 2.43.0