Message ID | 20240217-device_cleanup-net-v1-9-1eb31fb689f7@marliere.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-70060-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp492541dyc; Sat, 17 Feb 2024 12:17:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVr8rLOuXWr68E6UysKOLtxH4adAh0y+4vY4vjrjb84aW+bBu1oDI6x6xuVMI7cZFjQfleLvF7pO3wJbrNGdWUeW9uW1g== X-Google-Smtp-Source: AGHT+IE9exg/1kKAUnhd2+AVhC8DmVtqB3CHgqjwCC/d/lVcDqmmgVSQESM75BgFmGPw7zgFrPUY X-Received: by 2002:a0c:e20c:0:b0:68c:c6ff:2fd8 with SMTP id q12-20020a0ce20c000000b0068cc6ff2fd8mr8066557qvl.49.1708201027392; Sat, 17 Feb 2024 12:17:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708201027; cv=pass; d=google.com; s=arc-20160816; b=A7yB+V/KkL8moOnO/V4YpSnsXyp6X93gLU0cUJy1oYvCedrkoqTE+QNuPdoennTZVf hl3xyBFi77TEpVGgOvuLa4kN4MlHrHH5QRUG56Pgh4Aic1gylRx5MPiZJemAc3mxHxdT W7xOnYqoE44lw6OuklxoXwABsz1o1DBlNdm/Z5HErx0WWnUgmXY87Vj1FD0swGRu48OM +Th9stTzo3QkWZyCzA5Ltb+KjTzV2mBQ4lbyoXRA9UWvWn1xeBmfmYM11awyfaCVf7b3 jEebsRan0O2pyPSNFrLTZLEV3XfiDOyqx6VkDMwvV2syPTxpsx2nsUe46zhvgferZU+t kl1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:dkim-signature:from; bh=XmWynX/cFY/zYOq/2eCC7fEshtrUVqvaNfQwMNQ7SfY=; fh=s+oMaIpbX7WrbUmrlydNSTaLB9IvOtCCa8wUSRHEi9k=; b=WZOZnb9oX1j/P3vmoPI2V9JSGeadPvHcA2sp5Uk3gkhjxZYG+t2T9Ajw2cZxoALaaI mSvJoXFt8xnTx0GAu8pATfOknEsDTkBum/QZlpWBJn651WJayrCqS4u/Xqg2DlFI5P/v artEL7FIZ41Zn4LMKhB1w2K0kKUU47masN3bK5gSuMmkSQZuYmzFV6QfcMrgJUxDybwy kF6GwUNUZ2FwnRqdU1HRNQzvWhyP55pDybc69+0lMzPY8TCxBOByoeBhVV9fSCieHNLt Z3mQjtRu3uI12ULLqPiVZ8ZTsIYSy/bhsEvqmNa4sobPpPSQQQ1WcsHrxfzvL43mMKcK 8Z8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b="mmLItJ/2"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-70060-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70060-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id im12-20020a056214246c00b0068cb23ed4f8si2752529qvb.316.2024.02.17.12.17.07 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:17:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70060-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b="mmLItJ/2"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-70060-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70060-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 31AD11C216B6 for <ouuuleilei@gmail.com>; Sat, 17 Feb 2024 20:17:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 479527E767; Sat, 17 Feb 2024 20:13:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="mmLItJ/2" Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.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 BAAD88120F; Sat, 17 Feb 2024 20:13:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200807; cv=none; b=Uf5PSEwHH6056Ea+uLry/M4imH+5PBLqVQQlIu8dP9EQToY8Sjj+g6fROjxnrEURBzmQRCd60qSd8mY/YfuCef1npBAR44YhH/PJ7V19RUdpoXFcgHgSwbk2NFJaz1laRiXH98QudPVAP9P6nsGzPW8mIZgLKifUM1+7qdgPHvw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200807; c=relaxed/simple; bh=y6BYSrCEA+qZPTeLeEv74HdrbzQ4CCbt7n0reUwhfoY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=f2t/5vdE0OpRql20boES76nhg4w2mIPXKwu/YdrB70XDlycwPw9MKoo32oqyogvIoIZZ8OeVZRJHV87ZlXdhuRo7NFvGBDtl/pOMz62VWlW1Y65Dlm4jupk/HQVAvs7f3l1A05uuXxxxCDAD053OturbU4tsk9dfrkcGlwW1JUA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b=mmLItJ/2; arc=none smtp.client-ip=209.85.215.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-5d4d15ec7c5so2592747a12.1; Sat, 17 Feb 2024 12:13:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708200804; x=1708805604; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:dkim-signature:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=XmWynX/cFY/zYOq/2eCC7fEshtrUVqvaNfQwMNQ7SfY=; b=JuZVSWYHsg2sxnZiCsKNxGhZkcMmT9kr23AITP+JdsoHFa3PnYBdzRAGIyedC0bMvb n9yW8gKBvaAaO0NfuXLug1M8uOodw9X35F5pNWqxvEKS5qjqgOqkT/kvnOCnD7k0Bosl u2ePz/n9QD3T2VHLAlhcs/o5EVrqPYLFg8d/1vXI2pV2R1QbQvefUuu/L984sIow6Tzh pjpjr2k0uvU6gjlTj4pBgZa6JmY1sB8yjGI2WtvvivrxfHTotVjor1YAxc9CYz/J0cbf cossGcTTsmxvx7VGRpfPBbeaDFhKOswQgc5Mz21QhQHsycJploabjhA+W813kMogJfXC s9pw== X-Forwarded-Encrypted: i=1; AJvYcCXNevoQzUadtRRklgMSvnlk/wMw/oBYEijx6oP0izWADEpoqfLdUgHqsMEkIT5aWh0Lfi7W660Q6YIB97gGZa19ZEvbK1xEZfKr/8DyVit0KqTTktZvr+cYgfj8UFUCRNszhlGvZ5GjxRhq0MFpPMhBok/dhHKKIhU+8r2yj6Q3R1zf X-Gm-Message-State: AOJu0Yx+ZLQH5HEY0unQFXjqmiXgEPWnimzXfsrkfhTadd3Tn/RgfE57 d5LdqZQg5puYKufnkZLm9z+njAT4MGAts86KJYbDo91+w22F6hQ9 X-Received: by 2002:a05:6a20:2d0f:b0:19e:9d92:492e with SMTP id g15-20020a056a202d0f00b0019e9d92492emr11119962pzl.44.1708200804103; Sat, 17 Feb 2024 12:13:24 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id fh14-20020a056a00390e00b006e08c103dddsm1999319pfb.192.2024.02.17.12.13.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:13:23 -0800 (PST) From: "Ricardo B. Marliere" <ricardo@marliere.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1708200802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XmWynX/cFY/zYOq/2eCC7fEshtrUVqvaNfQwMNQ7SfY=; b=mmLItJ/2x1YIEiW8tOghxhkXrDk0/58hvlSpnv7t72c3p1Qjr0lwTfr3tBnpPX29WNkMCG TCGdzm3/QEMD9og4rc7VY6itAm0m+qbsCy/EytMaV0wD8VZICY8mL9ofq9vHqjbqpJamMw emrryPMrxmYrz37Te0OuQbVZ1xcHkk87JvibWr/i+erc92CrLkSb1DBHlfhoJVoV9dg7+t P5cmdlPdMFB/Ne3PelnGsX/vnXewjknUzaKkV/KVBLc66QA5ZAUgkWGeWaKO+4osaLK20y L5UhBx84gxR/OUwUT4ixAQpN0Qa9FuFvUjHspFtulAAvAd3oQBnehPF3zobBsQ== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 17 Feb 2024 17:13:31 -0300 Subject: [PATCH 09/12] net: vlan: constify the struct device_type usage Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240217-device_cleanup-net-v1-9-1eb31fb689f7@marliere.net> References: <20240217-device_cleanup-net-v1-0-1eb31fb689f7@marliere.net> In-Reply-To: <20240217-device_cleanup-net-v1-0-1eb31fb689f7@marliere.net> To: Oliver Neukum <oneukum@suse.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, Vladimir Oltean <olteanv@gmail.com>, Roopa Prabhu <roopa@nvidia.com>, Nikolay Aleksandrov <razor@blackwall.org>, Loic Poulain <loic.poulain@linaro.org>, Sergey Ryazanov <ryazanov.s.a@gmail.com>, Johannes Berg <johannes@sipsolutions.net> Cc: netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, bridge@lists.linux.dev, linux-ppp@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Ricardo B. Marliere" <ricardo@marliere.net> X-Developer-Signature: v=1; a=openpgp-sha256; l=884; i=ricardo@marliere.net; h=from:subject:message-id; bh=y6BYSrCEA+qZPTeLeEv74HdrbzQ4CCbt7n0reUwhfoY=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBl0RNtfkuOOhHL7kJiC+Ppke+4cIU9PVk1Ov4nG MXL0y/nXcaJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZdETbQAKCRDJC4p8Y4ZY pgv+D/94g+Fv2KX/++lAfaa5txLoX+0t+RdSw4BU2/ZLzxwCGk6D1dqvyxAxeQNpvnsSMVvu/Xb aIgLGT+kw9AH1PPNAzjVhxvQ+4dRD0jGaE1S55vQYlvuYD/EoNfbUBfPRO7502bYtuei+ZtpnN3 Y77RsNGBDlT0di184JU7nMC0wNSM9vY/b+T9I+1+Trmo+OeWFAkAhLn5A3mYt8xSZAnSHiAdLIU awjwNwWo59k6W/01zNDwnsV7wJkyxy7S7q+Qxc/EOb5IIvcHBsOMmLLIaSAfzqayQxLwSdWrsnS BFvJfFIELdcWsjvgk14W3Aon59uGIGph8EKU+fMRWCzEMFfTPjHJONBfaLg0XvgqGAR6K80HSwH UP6IjZ+GKKwksYq3z5819HNKR0jiF2UPqN8QMC3fZ9sTt/FV3zKJMDmTwvu3K124Js8dk6DRG0K NB9aHAC9I/HGjkbvgJOmc8O30Q6NM21KE3FZ4Sa2Yql9v5ZVnkVSLaLh94vgAVyJKaO30+vxIoj ZwB2h4Onx0QmWr2/LbquNc0SqdkHVHuJ1pj78wCYbSjM1oOLs19o6lTf9yFHIs4yMuVQhjU/mqp n9LGhrfGQy9v6jWy4K174vgXeQZ+Ys0ot/5+40MtWJlKLxwi1quuhhtel1aTUYgeJFDgF1g1pnI ofJclDNx7CiDU6g== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791178600384253190 X-GMAIL-MSGID: 1791178600384253190 |
Series |
net: constify struct device_type usage
|
|
Commit Message
Ricardo B. Marliere
Feb. 17, 2024, 8:13 p.m. UTC
Since commit aed65af1cc2f ("drivers: make device_type const"), the driver
core can properly handle constant struct device_type. Move the vlan_type
variable to be a constant structure as well, placing it into read-only
memory which can not be modified at runtime.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
net/8021q/vlan_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Sat, Feb 17, 2024 at 05:13:31PM -0300, Ricardo B. Marliere wrote: > Since commit aed65af1cc2f ("drivers: make device_type const"), the driver > core can properly handle constant struct device_type. Move the vlan_type > variable to be a constant structure as well, placing it into read-only > memory which can not be modified at runtime. > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Reviewed-by: Simon Horman <horms@kernel.org>
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 790b54a7cbe3..df5552518251 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -537,7 +537,7 @@ static const struct header_ops vlan_passthru_header_ops = { .parse_protocol = vlan_parse_protocol, }; -static struct device_type vlan_type = { +static const struct device_type vlan_type = { .name = "vlan", };