Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1918940rdb; Sun, 4 Feb 2024 07:00:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IESSlkOcfseE99hKTCBM3NI1mxHJQxUS+UFv/LnwYCD8D6EtD15haB8gVykT0t6fXZtCE9r X-Received: by 2002:aa7:c986:0:b0:55e:ea35:1da4 with SMTP id c6-20020aa7c986000000b0055eea351da4mr2954690edt.4.1707058852740; Sun, 04 Feb 2024 07:00:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707058852; cv=pass; d=google.com; s=arc-20160816; b=XDr1N2kDpJxMErdJLDBp9KcqJYJpknKL5E3Sl+8LgmC1g+mlgom3ZHa7LlpRKW4CTu GmpesTWpKYWtEVtzFQ4bQ4rQOuc97dtQTh5FQaLhhIQ1z4zrjxjm5FvL24lz3iChlGbs T7K9lEx06YNqvuf8L9Z+kUmage14XMjHFD6V01JxMazkxevJmVa0a6uXF9scEqmi0maB 334vrU/qYhCnu/lCQaVUSsE75YXy5nOYwiSgzreJ3uQZmSMbaxlyhNAz2b9AfPon2IWk qGVfJmCKzrOoRcZv6Pr18GfnMh4cpvhQTDp4yahFW2L/wcCHai//5DpcLU82eg3lfLLr W9lQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=d3lqw9guILXTXW+HHup3WqoC7VU2sfl3wXM0hqsaEkk=; fh=SYecroB9m6KUbvAGB9WJeY5yugdqfexpWf0kmufWA8M=; b=h7YkSNJ3+C9tJMhLZ4/zECUXBfis7ZNk/C4aqFtKGVGQfs59zgQPLKxBhIlD+wdgmk Ko6hcKaCLfHvHLu1U3LM9eZmN/nsYgzECdeuyJP28DZeLV4mQbFK6qq0HGFoxY8WLN7h k8wH+Ywtpy8k9SbvlHdGlI12TFPKDpSAzUpCq93aXFeTD0guoJYnQ//Pfvw+0FPyx2rD OVjZuRutZH/tCkCk3365pkwsOhXt8peQlS2XDOkO+MvcOnADHqoQnasC+FTUAI6Io8VZ ZEX72H3W+GWa+qM6yTp52oY7+1GXQQp61af1n0iFGCTFtet9lg7OHej9GeIxb9GGxfhJ I0eQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=dUGOJxVv; arc=pass (i=1 spf=pass spfdomain=paul-moore.com dkim=pass dkdomain=paul-moore.com dmarc=pass fromdomain=paul-moore.com); spf=pass (google.com: domain of linux-kernel+bounces-51740-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com X-Forwarded-Encrypted: i=1; AJvYcCUNb8zIOi5oc6BP5/Ri6vPUrfddymBe0L2r1CNcCwMkoB3XPV3MtjNaukVtjnQZCyrbNmHWBNtqrnqz3XLwrlqoolsyUIdevfGNTgUmOA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c8-20020aa7d608000000b005600fe977a1si2051173edr.355.2024.02.04.07.00.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 07:00:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51740-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=@paul-moore.com header.s=google header.b=dUGOJxVv; arc=pass (i=1 spf=pass spfdomain=paul-moore.com dkim=pass dkdomain=paul-moore.com dmarc=pass fromdomain=paul-moore.com); spf=pass (google.com: domain of linux-kernel+bounces-51740-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7D89B1F216F1 for ; Sun, 4 Feb 2024 15:00:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D575E225A4; Sun, 4 Feb 2024 15:00:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b="dUGOJxVv" Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) (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 CF5E3224C7 for ; Sun, 4 Feb 2024 15:00:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707058842; cv=none; b=MJ1OcFgy1OnNnM4oxj3DBTncK4qxL/itQkFFrP3x+IptUk9SYOgw6Whv5+URekhgmrSRTc6LwDLtMjdnYnSD0mlyD39Clb5kga+QvjCx+9x9xhokj372RpL2lQAYmASfMj2MWDhfBsD6EecfCVdg00/9ha8OaGGKsC9MXUaUSSM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707058842; c=relaxed/simple; bh=xdSeQvV05nn5L8vGt2d4VTs22D9fCwHOm1ANUT2yxn0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=BjoGlxB8SFGxvVnIZsnDGRUXKXoR8DDbRGOyvdEESmG7U2kZm3YINtiq/ipR/GydX7SKk0LiSelvXeL4lf20hBojMeW2HGhL/Ga0JJRpHm8Wq/sL7ttAcB5KMgF4mAt5ddwoHyFRYQDvwI4m98OS6Xo/XA53RmqTvcy+v5mLgMQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com; spf=pass smtp.mailfrom=paul-moore.com; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b=dUGOJxVv; arc=none smtp.client-ip=209.85.219.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paul-moore.com Received: by mail-yb1-f181.google.com with SMTP id 3f1490d57ef6-dc6d8bd612dso3283476276.1 for ; Sun, 04 Feb 2024 07:00:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1707058839; x=1707663639; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=d3lqw9guILXTXW+HHup3WqoC7VU2sfl3wXM0hqsaEkk=; b=dUGOJxVvIFyaOE/esF1lx2c/aJ8UIlpFFzw9Bugjv00/V4xjDrVUKwCxRoEKGliqvy qpAKBABK/CzRE9rMS2V62znJ9uL8vD5BpUOL11NkesMvPY5+PJDCiVSw1ui0Y0Ivr2N1 EiMTZzUMUiREpK7xPsbXBuseqsRNybWg9Ch9XbKZjdlNQAvIxV4qITYgjrHBwn49B9rw F7GoWMm+Vb3IQrzVrhcRwxgim35KIPEsS4WybNbSaNitkU/Qd01OV1Q9V1fy0iWx7kJo JIhDGqOuoz3urEvcR7m68E8b0wfCOE8DkIA6tD4fzelxHvF9QSy8tIvM+ZKy34RPHZJQ T6wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707058839; x=1707663639; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d3lqw9guILXTXW+HHup3WqoC7VU2sfl3wXM0hqsaEkk=; b=nXtkcrJBaENe6HShAqGMVSEtdOopBcmrswRE20jJpvsWts4t57x30dfgWcTkK7D81v xJo8uXwP1coMEOR/HdK3Ov3eU2l9AYC+1aJFCsufhaOQmEEA8Clz6NbEc6O5v5dKJUBX HbHYFgNsKhKE4kjol3uNRAqSxXndjLYodWCsOja+H8iDKb5LYD9zNI8GY25AETalvsES EkDyevl0ieBM9gJtPY5Z7mDx+gXWfxl5Fx94mVz8ynhUgQ+005EuIFAyc0eQdzNVVtb5 mesl4d0s6A8vU6YB5/cLf9Mm2IWvtFvszDlRq//bmwegbyJoTlZbRonSZpbnKfBMTWXZ 0u9g== X-Gm-Message-State: AOJu0YxDaADNRYhJaJp4mvDuzXWoBiY3+l7nUYYsSLEmXBVA9cWW36Mr W1qeizRY9QIM9SK9T2wFebZxVD80rrZ5Tqn9CvqdT1HGrtTEkrVf3zErnKbsCenaBrg8yEFtz/O 3JHSvK+tQUGzeR78VboiPemSitOoJ29JiEGeM X-Received: by 2002:a25:e08c:0:b0:dc2:46ca:e968 with SMTP id x134-20020a25e08c000000b00dc246cae968mr6398171ybg.4.1707058838640; Sun, 04 Feb 2024 07:00:38 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240204023531.2225264-1-dongtai.guo@linux.dev> In-Reply-To: <20240204023531.2225264-1-dongtai.guo@linux.dev> From: Paul Moore Date: Sun, 4 Feb 2024 10:00:27 -0500 Message-ID: Subject: Re: [PATCH v2 1/1] netlabel: cleanup struct netlbl_lsm_catmap To: George Guo Cc: Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , George Guo , netdev@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Feb 3, 2024 at 9:35=E2=80=AFPM George Guo w= rote: > > From: George Guo > > Simplify the code from macro NETLBL_CATMAP_MAPTYPE to u64, and fix > warning "Macros with complex values should be enclosed in parentheses" > on "#define NETLBL_CATMAP_BIT (NETLBL_CATMAP_MAPTYPE)0x01", which is > modified to "#define NETLBL_CATMAP_BIT ((u64)0x01)". > > Signed-off-by: George Guo > --- > V2: > Yes, I understand what you are saying. > Actually, there is a compile warnings on "#define NETLBL_CATMAP_BIT (NETL= BL_CATMAP_MAPTYPE)0x01" > which is missing parentheses. > --- > include/net/netlabel.h | 7 +++---- > net/netlabel/netlabel_kapi.c | 8 ++++---- > 2 files changed, 7 insertions(+), 8 deletions(-) This is a much better approach, thank you. Acked-by: Paul Moore --=20 paul-moore.com