Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp259253lqr; Wed, 5 Jun 2024 05:29:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVOYOusIaYcLuP7veH3kr1DKLrBcXg6TqXuRPVhuE8Iy2+p7ql6z6T0nVf4Bh/Kde6XRTEWBIa+sbjwfYq/rlsyUct7dNvQz10FpTRjAw== X-Google-Smtp-Source: AGHT+IHnIM4WzX0G3RluzL9N6QLs/9XCnzOYS0k3c9qFeFQCpWQ4wHdHaJ/NdESpFuaCotk2+rwU X-Received: by 2002:a50:bb48:0:b0:57a:2309:c1e1 with SMTP id 4fb4d7f45d1cf-57a8b6b8b66mr1620662a12.23.1717590556351; Wed, 05 Jun 2024 05:29:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717590556; cv=pass; d=google.com; s=arc-20160816; b=eLbUlfEsQf1QPHM9iFEtoGLMan2xpsYOd274jQRO/N+Qo5f5OOKk5K6jOT9MDGN5/a 7xVfPWE89qSXT66SGTW6oEbYSJAwBSgBkznkdgoloC6Eksa8BQxF9zpXU88JOSRsYpQm jaw2/lVH/XbtzCjyWt/fiWhHzBpRDS6iJ2cDiijLoYH4G2aSp1yJ9fBaO9okJdifrZX8 u1oKoeQ834TLHlUvubzPpgz3bGmVufF04AX5CsYhsvYn1++/Ytu4qnQXQ9nbc4piEDeS EnNzsHmhCyF6MnBtd9DLhESZ5rL5SOQE9FFo1Fx6vuAlTd3HKF38PO8YcEncrB/XgjPx uFig== 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=VlLFt1McerQQH2NJ9EYgwJpNlV+jYWYNtlOWBQMwOPqMiXM8fPXChTLiBWl2Fu+5YS TEhR7OXKto75ts7MSMlxZqR3i8urbp3T1W0mAdKbFZI9GM5U3id0/Qplt9+B1b7ajImw uJSIvTZcDjhO655I+pRtBiRB1DghVqvzkuoMr4DwHXWnKB573a0gIumdglMPVUib9Hfy +TnnOenWjwQ5oZ0IbXgqQL4zLZ4YNq4joKTV03FogNR59RCv7EHDkCAedo0jZsj6HNSE f3n8+YlieHadxkfu9kWusrDqt/8emv1hQX5QlsBqPtO82UsGfi5Y5WgIJd8AVUOImGGf foNQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=msG4FhQv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202455-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202455-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31c69799si6117520a12.268.2024.06.05.05.29.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 05:29:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202455-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=msG4FhQv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202455-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202455-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 11C931F25250 for ; Wed, 5 Jun 2024 12:29:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13E2B199235; Wed, 5 Jun 2024 12:02:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="msG4FhQv" 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 31C48196457; Wed, 5 Jun 2024 12:02:29 +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=1717588950; cv=none; b=cdSwTbeFIs460rf7CbHXVjF64yk7vnOSefCbXcl36Evubj/SRQ2kYleURrUqY+HKKzHbqA3HHs2xsBbY6D5oc2LWi3xT9PSlftResRxDzFHxzE9DoLfOwMwCZyemoCrgx9ZNry5ekMTLItoUHbals2JFTODxmofrarAlbywyjTU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717588950; c=relaxed/simple; bh=IGgKpx5j1MkOyKp+cg7XNRPiZbHX1nqPZwkHTCb2kNA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NbS+EiV81ucYXiHrsgo5Yw+onLKyzV3CVBGUGf2XYjFpw2UGLxtr3OhKltc0ymrdTeXkbc80CmPPO/DybQnJFfagBf/LcKdlBTZz+fmuaZ2BIPQBaP49x2J6ipe4T92aCIm+vTG4uEF387tEBVUxPHAh4XrXw7+RESpDydLgKow= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=msG4FhQv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B843CC32781; Wed, 5 Jun 2024 12:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717588949; bh=IGgKpx5j1MkOyKp+cg7XNRPiZbHX1nqPZwkHTCb2kNA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=msG4FhQvxob4bhVwBzmsiH0lXTHWyvxOIsr0X6t1nQ0MSHSwryREx7rKEjlZtDf5h P49s+HtV6VQe0n2jDteXwrdc4PQuANjguPgz+hSLUFJr2aGfWYP6VgUkhK4+3+PBGS Uz8JWHotnojCKvZ7zIIQOFWKlfWVeMxaMtGACCfdaVm1jvmB/xICGXh5fXxXMCj+Ze hir9RMgXBv77fYyfLkvve9PJWFwq4Ec/CYNxZiZZKuQPIx/dByZ7AkPj3xdaKQg9Im eLwmD39Kxg8ShRT+p8hLUy6PiFKveQm/5uif3uv7SxVmaHn/m7y4a4Z40rncfWF0DZ k8qpQCS4yAF4w== 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.9 04/23] connector: Fix invalid conversion in cn_proc.h Date: Wed, 5 Jun 2024 08:01:47 -0400 Message-ID: <20240605120220.2966127-4-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240605120220.2966127-1-sashal@kernel.org> References: <20240605120220.2966127-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.9.3 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