Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2387339lqo; Mon, 13 May 2024 17:54:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXfRXUr4U+fbVjfYbQk4GJjJJkRXVvV1o5Lbi907x6GZ8RHQ/521fY97lAV8BeDy6FUDdojxL/ZeF2nQ6trgM5Y93N5ib2/Ags4wMA8tg== X-Google-Smtp-Source: AGHT+IHYzk8rYFGLQ6zC+M8cTkLQy+bDDyl8+QqpDWBsrfUV/6cry2UQqjBPbFAyh54QDXrVGQ2d X-Received: by 2002:a05:6830:1e57:b0:6f0:47a2:c1ab with SMTP id 46e09a7af769-6f0e914b8ecmr14761240a34.16.1715648048613; Mon, 13 May 2024 17:54:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715648048; cv=pass; d=google.com; s=arc-20160816; b=pzqFjgjzfrsJuuesOQlUYoyI+pfPTjHjp4YbuLhXrMkIxydD2Oat3fR55yRr6vbYnO ZEXhpcx56wCr65C7deE/ajCJgi6zfsE1dsz8pLNpA+s3hxEgH46e3qpk/zoSag5ABPx/ +dZxO2t14AnYs3yfMRtUb6DjlMXBL/IvVov6yEeCaHrKdneVvvMNoGp+NlhBAEkQjDAb i/FUo1+ICR/UGruYSVIpYlOPyrUVg6QIjE4jbrt3Pu2737ShgDFI/xfhqCLg9eXOG7l5 UqQnhIrlmwa+cx7nHwEVcA3tI9Mr1qM6bdDwuvy31sBXLdhksy7EkpEW5Le9VBtnfoT3 fL/w== 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 :subject:cc:to:from:date:dkim-signature; bh=zpDrTH1bKCeRKzLVlKv+SISCkYeIslSer9BfXZrYlYk=; fh=zj29YMZPk+SfayPLTeRD+9T4CQuUV8a1h6/fHxNJji8=; b=wE7vO9EzHlUa2pep7p1wY8V7xPgHkVNL/p/xIf2gSF/QyrFO360FG9rlbVS4JI31Vt j8UqMSrpfVG8tdNEnBudiz5ybZgTlPXDouxW29hd5GlPvprWDLszZ7wxwfwTbUENE1Xi nfdY8IhbdEQnQevt6W5ONByVQb6GPU77l1IyEvvKvQz32WdDcDJWa1iWx1sEienMuJ8S B/chTbcAO6W7lhgN6dgQWA9ScMSF1yoVOQOK+SIlL8GojFIcGorJ8lHJUNtI5ZmcvjXP PzIowUt3t3PZLTCQbuXoGipcXFqG+bY6cOZWitc0A8Y1VKIvpd+9mCHhAURudcdMr1+o PKQA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s1BAXk5e; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-178222-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178222-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-63412a4d10fsi10111089a12.667.2024.05.13.17.54.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 17:54:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178222-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s1BAXk5e; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-178222-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178222-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 35948B2110F for ; Tue, 14 May 2024 00:54:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E39A1869; Tue, 14 May 2024 00:53:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="s1BAXk5e" 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 43DD5EC5; Tue, 14 May 2024 00:53:56 +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=1715648037; cv=none; b=VgzyU0V+DSQTMJXaMZQZdfAakXX+tkP8YQd6djEMVfXSSpgIe2qh64EizLriwbpy88rQx6AOaoKHoo3KFg2h8rAm/8OUUq70EmrjaNCwK3WknJQye/yfXKSTyrj/lcpkYycOkNEVyC97VDwH6qMGU8DiwI2DP9TXq+mWhagf06o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715648037; c=relaxed/simple; bh=s1n/JR8kGKHYvyCvVgeNEF7EnS9ebyhfaRGZ8+kz990=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kd0Q3HKwrwqereddhHq5roVBBbq5JFNXACMzF5Zbia6w3oCfNLhzP1E4OlELTT/5oa5WQvNjyytpAAoEosRKODRjBTSQkVo9EQKBY86oWvH03gR/Lvznb4O3FSksntmuSdth1PGJBwPdFjHx9AKi8QtwS68kRd7HMMevvUsmUMU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=s1BAXk5e; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 966DAC113CC; Tue, 14 May 2024 00:53:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715648036; bh=s1n/JR8kGKHYvyCvVgeNEF7EnS9ebyhfaRGZ8+kz990=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=s1BAXk5esInT1Hqsnj9I200E7+U+rkfROt0r2OTRz6faGUQQfNGUmH6L5I7lJao5C AAcFwsFU2uaf/Hgjfv8w3LolrQSYdXZl5sEqVlmhPd4hlRHNL8bvpEurTMuC4Q+ylD OCHFnUBCkpb9XOWyfat/oiqNcqF40vyGW7EiSNeCRbBM5vYVn+Bhp9NKw16gHK5LkP PHM7pBPjM4cMW39L6Xq2wZeCOv85E4yM7rCzzhEOg0s7LBpEagnYpS0ASv9ThynjGW Doei/OBzfDeUyDjMqPe6V6DcnyVZIugkkXESBlw4DGBNnnVdG4m29aGCiTF1s5KiNf dLlhjr6T6VG2w== Date: Mon, 13 May 2024 17:53:55 -0700 From: Jakub Kicinski To: Matt Jan Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Matt Jan Subject: Re: [PATCH] connector: Fix invalid conversion in cn_proc.h Message-ID: <20240513175355.2b34918e@kernel.org> In-Reply-To: <20240510154919.874-1-zoo868e@gmail.com> References: <20240510154919.874-1-zoo868e@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 10 May 2024 23:49:19 +0800 Matt Jan wrote: > From: Matt Jan > > 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 Why not. But please fix the checkpatch warning: CHECK: No space is necessary after a cast #36: FILE: include/uapi/linux/cn_proc.h:72: + return (enum proc_cn_event) (ev_type & PROC_EVENT_ALL); -- pw-bot: cr