Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp372462rdb; Sat, 17 Feb 2024 12:14:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV+NsPl+Evxg3YQKG0aX6O3N7F2rLih0GTqb6F7JJ5i49l9UDW90XpnXwVZjpOcjEsV7rs261j62ZrQnkRQz5QTMQJzEdm0n2xauqtiqQ== X-Google-Smtp-Source: AGHT+IEVO3sEcA5K/qnpfsxRC/EHTnAWhe2KB+qNr3DDqQTpOBr148Pty34AcOusBCVmLbsGm8gK X-Received: by 2002:a92:c649:0:b0:363:ab96:698d with SMTP id 9-20020a92c649000000b00363ab96698dmr8033838ill.29.1708200892876; Sat, 17 Feb 2024 12:14:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708200892; cv=pass; d=google.com; s=arc-20160816; b=rt+yM8/SzKPfX/tuPuZDKZXp2OprZf5gZI+HzcK7YnLIe8vdNWaXfg/XaaHNjSgi1B fnORT46abPts5K0SJqKuzYkeX2ArFyjnFTcHk9lMvwYXu+4UMym8ikwPp/D/55M/1SAr 0cK8N1CvvuOrU1YXUrRLT8C0VdrGJgtXOOkXLc2S+YkUieRKsH5uzwDEfr6NFQtcMw+G TNvFt1e5jTxaV1sI2xhCHJb/LYIqgBJQauckZjMgAoGkHdfId/ByUPQ8NV/pUcIR0dWN PZlEaocseLWGmv8jt59+jpUwER1sG2qYcRE8VN5ttIToSw6RIir3pv+uF/k7ehPvgTQt vQeg== 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=VQ226lEYIpvgIaj27cS5McvwAJ47DAULYwegieELHbM=; fh=uy/VWQOlcggML7ozqgxigmnlffUxO5HxNcL07VFiQSY=; b=fZoTHmVoD+4/kzwmnXFDMu7P6RS9NfjiHp8k+wMzPS562+sgin1jhu5y+nOazR21eX MT+i9tuG200GZAOWTTniYF51KiaUA9G8Ri6O2ad6RATNp0DNJxTeaZmuMXMU8ccOXEHi 5kVnlyFlPeDRPt3pyUJKyzvw9ycD0H+xwj2CV1RjnXoL0dCOCcC3/DV9tnpd8NJfbeMi o2hqZIZdrk2pZWkdK7FruK7FzF5BCvCa/cTfqHgIZ/YdUUVgKvPKRKfqN96NTpfeavRT C4IGwjFIgeSUT6vX6b37QEziM6eUAq08SKxp7vgqA7u3jkzLcT4obWSbLip35whACCob Cf1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=dHqpsrS2; 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-70055-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70055-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pe27-20020a05620a851b00b0078633c24de6si2801815qkn.90.2024.02.17.12.14.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:14:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70055-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=dHqpsrS2; 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-70055-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70055-linux.lists.archive=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 809361C21D27 for ; Sat, 17 Feb 2024 20:14:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B03A7FBC8; Sat, 17 Feb 2024 20:13:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="dHqpsrS2" Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) (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 D20977FBA5; Sat, 17 Feb 2024 20:13:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200790; cv=none; b=SMLbQ/qyefJGCI8im/upi2WNITWSRcbMZclNP95RzU+s/vPxe0gq7vDDePofjaX8mI8Y3TeS5S6zwE99fTP6OAgJQoyFXvLg7tIs1TQIs+mPp5LmEWTup++daApTyhaKEUU4sfBM7Xifvb+x/3kRMG1carv2AAQc0QnGbgNRSuw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200790; c=relaxed/simple; bh=xzeBB090fYVJMpjGXta60hiJrVnShFCfzUaEqJyH3oA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sPWDaFRB7J4OipVQsxvWFQ0EsyrH/GE6l0m2cd23AU+5ImThSkfl+txpCq24pwx1PjAV6pchQJLgi6WnU+HNmTD6kv/v+jEYjdZmoFNaFL/21MlXsF4vgU3RZ9wJ3HUBzrcZZu+CBrjGNQrG1td/1JxznLLgTbotjHBnCtTGI18= 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=dHqpsrS2; arc=none smtp.client-ip=209.85.215.180 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-f180.google.com with SMTP id 41be03b00d2f7-5d8ddbac4fbso2607160a12.0; Sat, 17 Feb 2024 12:13:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708200788; x=1708805588; 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=VQ226lEYIpvgIaj27cS5McvwAJ47DAULYwegieELHbM=; b=MIkJTMo7qPQXD3liwyGWcPRVIU1D/68q8YKO72qpZ8d941/wJLE1zvZE61IzI2sO4s MgSBrJf9z11ieTbIpFRYoiE0qEnP/UrsQryiXo+5ZxSzdxoWuzq4TqOkH14W+makfKk8 iDJTtWghli4eOA7/dM70vy4OymXUt6zWVCWoTHxx3ifd3IEMm0btnPYl6AxChWPbeHkI ja1eF6nksHt1rhkwMj2VQdHrKOvpsoIk0Jt0k0zMeyFB8MqCB1tDhYD1eY+jZ+hQEF5m gKHfhazAxAyKhu4uRQFysG9oXgHAj9akbtrD7ObdjJl/K5Q8qCrcpQdKFyOwTryuYqSP F76Q== X-Forwarded-Encrypted: i=1; AJvYcCUnMW22yIJXhwsbHGUUQYaUJCWhOjQWjFvN5gTCUZ5Oi2GaNhXC8yFLar1IERIULU8K68d2ojD7N+grw5K/NiBxYT81RG82Czw2DGaAs0aq0B2Yal7bF6fp8FD5WuI3UGUkIi2plfOUO/zGjigt7BYo1PXRE4OXzzuvJBOfGyIKYLS7 X-Gm-Message-State: AOJu0YwYtUNJeMFUto5q3A8UX7/WLhfkV9fPwqfiGRWwVwE6sRyBlb1V Kkfz0ORcoIuw9SZoDG6LnXmu83rL17py6QboFyTRciyAXnUmebO+ X-Received: by 2002:a17:902:8a96:b0:1d8:d5b0:aadb with SMTP id p22-20020a1709028a9600b001d8d5b0aadbmr6707732plo.66.1708200788089; Sat, 17 Feb 2024 12:13:08 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id lf12-20020a170902fb4c00b001db6739d337sm1806259plb.163.2024.02.17.12.13.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:13:07 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1708200786; 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=VQ226lEYIpvgIaj27cS5McvwAJ47DAULYwegieELHbM=; b=dHqpsrS2M0TRr374n753ucAGuFs0JUmJW/o10XLC7SUzjMp3Mi2LhWT0kndxVmTyj8pQfh 3QPj7yRkt2c2ZTwU8CSZvmpWODYzL4nsNAGyGKkVyR3Z0iDylKYaGwCCqDcmA2cWv9r6fk A0gq+DMvWZDsp+cI8MqRIc1bM/wgZWpnvlUZIf+m+uDYRng2BXbMzKouybj4I6pIwnFlRP IwSJXSq9eWijJnGBUTJ6tSDkyHFt7nT1nY7Cv0ki8wtQ5QatWcP8NugVYnvLl5nvEgxSZn QI2rnqZwdNpXt/SAWEjqFn76IkWvIB8fxtOWGpPZg1H6n95+obqz6IJL22hZHA== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 17 Feb 2024 17:13:26 -0300 Subject: [PATCH 04/12] net: vxlan: constify the struct device_type usage 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240217-device_cleanup-net-v1-4-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 , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Florian Fainelli , Vladimir Oltean , Roopa Prabhu , Nikolay Aleksandrov , Loic Poulain , Sergey Ryazanov , Johannes Berg 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 , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=960; i=ricardo@marliere.net; h=from:subject:message-id; bh=xzeBB090fYVJMpjGXta60hiJrVnShFCfzUaEqJyH3oA=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBl0RNsMqQd7iSTS5J2gzedoypz/uKFs5aj5gxJK 9QV6kc63FyJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZdETbAAKCRDJC4p8Y4ZY ptYID/4g5L979UugwQmNsNjt6XHDcY9Wp9n4UivzwKS0sHfJPjc4b4AJ9h7C8t0+c9RxcuYtqEc 1DXm871SWIeaLCCb/JtpDDtBAr+0YLC8sSl9lwQXlncfD3d6SZSqyw5SON1rTqDCFhKXm+EvzFs aExDJdRCYDMMAxRQNis6pRBkQMBiJtJJ8ZGm0IbjG/x7YuGr8uUi5GRvR2mSrXc35Q93v/U96Bv EbMs/+AfM9OAA2sRQs5LB87nd7//8XI9MLbwXLU8KXKsLo9oHLoyQxjNwZ4gr1A7RzzCSlgrjTx hkHBCYdmGqyWBmM/0ry6Dtx//tI4xFWYCXnjBqlbf0wFhAHERr0ROew0g1f/NQXPLYsMkf9pbNv 5AwdFU61xtK4erbLWG6+bF0M9yGqGVp2MulG3QgL6AGXQiMUehUlwHSenCgt/1VF0g80j/U4tS5 NFkRhYFWEI1ivfBYl0SLHWCQvVa3DpUjrsJBhWMO6yUnSvp8TqgkF9NpXSP9NdNYRtceXYQyeqF 2mNJAiRTyB0LczC/qoM8iqssntdh8c3DU1aIgAAN2ytPTtDuQScJf55t07lStqmKDGN+OmgOtuc 3SvzelrMrzwSpPREisO1Cp+WkD6/zhN/JqNtIC/9o1C1q83ijidtmiF9rHvWrY7Kk4msMgqh5/M KBYJbE0lzNTZfkw== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 Since commit aed65af1cc2f ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move the vxlan_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 Signed-off-by: Ricardo B. Marliere --- drivers/net/vxlan/vxlan_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c index 705a6fd6ab6c..386cbe4d3327 100644 --- a/drivers/net/vxlan/vxlan_core.c +++ b/drivers/net/vxlan/vxlan_core.c @@ -3254,7 +3254,7 @@ static const struct net_device_ops vxlan_netdev_raw_ops = { }; /* Info for udev, that this is a virtual tunnel endpoint */ -static struct device_type vxlan_type = { +static const struct device_type vxlan_type = { .name = "vxlan", }; -- 2.43.0