Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2449943lqo; Mon, 13 May 2024 21:11:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX8X6makC0F08BoYa76xkkanTqlyzKw2BL1lOrhZTJDgJ0tVgLJtfcb0TJMzqGJ9U8ko7VxysUM8Ro6Lt8EY9GZN3XoDrT7en8udOuVAw== X-Google-Smtp-Source: AGHT+IGfKPiYN8CEbn6fvGx6vl5FJwPpGe2fcUYIHAuQiv+369KP1y2FS3Y7RnGT1N2G77qZ7ZMr X-Received: by 2002:a05:6808:170e:b0:3c8:3490:4a05 with SMTP id 5614622812f47-3c9971dcd61mr16317138b6e.50.1715659866720; Mon, 13 May 2024 21:11:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715659866; cv=pass; d=google.com; s=arc-20160816; b=nzNmyesdfXYQcIWBK/XvXqT84poeEnvkTN8r0S1O4JJjs+c3ojhx3BP6M8NquFy1nm N2oiHUG8jNC/EL3VQkMzLljCXYuFaM3HcnUOXK3fRu0BFjgwN3CqFm8j46jj5rcPYUj/ PAN2M7DrmoiOUbVbpU7O7tRKY2bWO4lL66wkd0rtzseWpmjFT5ZhsVO0c9ncBi/wIekU zB/wnwepoE4AOsemZ7jxEuUWE6gvyJhHmRBvsdjaNQAcCbIn5gO7le2LnZMtz3oPLmwv wKAfZxnRAJmMmcMxOeUqkVHs/n6SRUKHaX/+7Zt2e2zqKs1Lk5o/j1bcAX0l1Kz7dC8c fP0w== 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=BSfxmTXV8nxGh/b1Ev/VrDyL3v8i6n/5cPDbBilCR6g=; fh=ntlJLCGmVtdQPBBlFbgemyc8nUj9v9XboemiJbIFvts=; b=QxzjgXg7vVGGkjSV0CdzEvGFxdTdnQmOtlw9g+ctaE7LZKqHSfQUzSaEEA1pYmQQar oottF3bCaJ2XNgcOTY+I46k95ThPOgEEhrSWy1UAkolMCWYK80ZvSzwqYAopLTlBdZ0t poF3T5hWzxXbo7b2UHnqxSTraiz8kEVJfF4RTUe6+h1VwWdaegB/V7nHvhg5iucoPMYS TiU7wi7QGOlTw9gtgNICcijdvXTa41e6wYVQpd780SknBUnBTmzOEDSewUSKfRo9iDsc 39ZjWAd8Ibx08B9W2FvapRnGkTKTCnjfy1G7/mACH0BqXh9Ie8TNj/HFmpq9w3+stGbk RAiw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lHpDKC9s; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-178298-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178298-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2b198c4si10523243b3a.268.2024.05.13.21.11.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 21:11:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178298-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lHpDKC9s; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-178298-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178298-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0318E2863D7 for ; Tue, 14 May 2024 04:11:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EEB8011725; Tue, 14 May 2024 04:10:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lHpDKC9s" Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5E84AD24; Tue, 14 May 2024 04:10:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715659857; cv=none; b=Sk5Pn3WlkWXgoOJul/HS+5DOh9giZDrriwS6AQiozQ8xy4KAapzUtFDc+FMBHRHn28R55g8o72mHm0yJ0DZNrQfYDLbPavcOE4txSHNvRZes7bgoM2AGhmEXkJhWibAYZUd5t7olDUb9/8e+t1ghgKN2xBIRkmlARahjVMZsls8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715659857; c=relaxed/simple; bh=nYJVsMHjpPm6ySLWJRZtEodAtoJ8PsGWKFZlQoV7on8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IAseSlEJmd2I1HyIynM6bo/c7C34tabnNUgYkxzlw4J2ANQeMxcjgKVWpqeUWbrlbX8TG1eLSHWKiCcR5cncLD7DN8xbHseOXZZ5mTDVmZccSPl/+VvYNu5hMp+97680dI+JiV7CTdaV5zQKzlWFQmd39FGJ24/LIiO9m/a030U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lHpDKC9s; arc=none smtp.client-ip=209.85.215.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-61c4ebd0c99so3324976a12.0; Mon, 13 May 2024 21:10:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715659855; x=1716264655; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BSfxmTXV8nxGh/b1Ev/VrDyL3v8i6n/5cPDbBilCR6g=; b=lHpDKC9s0lUpTE80xmdYKqy54Nm4TusS+jAlAYaHfK2rzkefUD5UHTLXlvtd74H9jK cbDUL0kNKl2A4L6hvUW/Y5JBB1/R1NqMFWTdBa+U4bTknrZJz/0V0ns3b+rLqTkJls3X gtqsp9mTjsJO2HHuJZFlEloTgb2QgaZwLYNfzM5ylYRNpQzmfmr2eMfRqF0SLSRda+Dq AWbrbSeI76mtQjJRheFS5z0vzvSIQI0LxaUteJE0VVgbcuGzhSO/I2CIgW6tB2ArMRwT ISjkZLdB4w/bC8xDQyZt81WUwe9QYxlmvKX+kg4YmqjsXb8zKH/ixz5eKOQZy5F7UJT/ MSUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715659855; x=1716264655; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BSfxmTXV8nxGh/b1Ev/VrDyL3v8i6n/5cPDbBilCR6g=; b=eqZvnaSRPd+11rmqMybzdlUlKoGIuJROCefzB/6OJ5riCyheq5uoGdpXlxEKmDMx75 N95Du+SdT/G0zM89Qc83uWZihH/w/iULz5ZAEzPfO3lOmRpwgZFf1UwTelrjMjp7ppHz ZSou4VDG7KKcX9+VVUKnKYhAZRYdGuYWgzKqs4pYrkOkuSpGVIR/YkIG2kkxsv85LkGP uJWymm/ZBgLa0LJ8Iwoe5nSs7TYlHPhsaiebcfUdRFHj+nOiFqkRwIqB5xjXK+6VVVOT LdEqsXSikl+PE7qUTZ06bDyrINmnlNpDvZJbLa8np0tdk1qZAM/kJELZlOAqXNOApsHX lKQQ== X-Forwarded-Encrypted: i=1; AJvYcCV2VYi/aC5lLQBWTD2vm20l3U1jBLvT+LGNKmZjRIcxSnvJnF9zK5vQdYflUjVu+OS9m8qUb/3qOZSC6PwZze4aOWzONYIoxI5gks7HBQOH38Ddb9wLqzySwXJ6hxtG1d1qpBRO X-Gm-Message-State: AOJu0Yz1q+R5WuHCSz4cwEQvEYKA1oBxW128zNF1Ggw1MHGPVGoBmEl5 Ro+hTlaFfpeGzWdW3aGN1yh3XZl2Taf6VZ6yOUkh6GE3qV5d3pSwPekQucQp X-Received: by 2002:a05:6a20:560c:b0:1af:fff9:30dc with SMTP id adf61e73a8af0-1affff9313amr3490832637.30.1715659855212; Mon, 13 May 2024 21:10:55 -0700 (PDT) Received: from TW-MATTJAN1.client.tw.trendnet.org (219-87-142-18.static.tfn.net.tw. [219.87.142.18]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-634105e0762sm8540039a12.63.2024.05.13.21.10.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 21:10:54 -0700 (PDT) From: Matt Jan To: kuba@kernel.org Cc: davem@davemloft.net, edumazet@google.com, linux-kernel@vger.kernel.org, matt_jan@trendmicro.com, netdev@vger.kernel.org, pabeni@redhat.com, zoo868e@gmail.com Subject: [PATCH v2] connector: Fix invalid conversion in cn_proc.h Date: Tue, 14 May 2024 12:10:46 +0800 Message-Id: <20240514041046.98784-1-zoo868e@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240513175355.2b34918e@kernel.org> References: <20240513175355.2b34918e@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- change in v2: fix: remove space after cast 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 f2afb7cc4926..18e3745b86cd 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.25.1