From patchwork Sat Feb 17 20:13:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ricardo B. Marliere" X-Patchwork-Id: 773925 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.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 6BB887E76D; Sat, 17 Feb 2024 20:12:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200780; cv=none; b=eczna/Lunm+ODWQjffvmG4Nv1pAhn7mRVWKjCVk1uz9Lyd2k8OMJJG8b9uxz7cOVkPrV0gSrC3inLjybs/lP5xxY4E16fK4MQ4NsgG1Nd7VFSzAaeWzz5N/bE21jmwTfDoxXRRRhm2TkLwdHZEyqTMwGtnXk1bBGuJFyil9S5zk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200780; c=relaxed/simple; bh=IyZ5Y2ln3RlvrkcZB5wxYoE9pnILf6gx+8QtBGCE55w=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=vAawgPFpctB9coQvEtbbHC9u4mSfob2TVmTwZUjEw2qCrk7chaFHKSx0CObi4kMi8Au52mZpsuFBBjZZM89KIKAEGkmxBfSfoFnjlVQ1Kmc/6bPgcik2WIac9OMhd9XiGWTcgeCQSIpvaAgUp4cQIjDtf9xGQ/uudfnv+a8+Cmk= 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=S2YAL+kh; arc=none smtp.client-ip=209.85.214.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="S2YAL+kh" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1db51e55023so18453985ad.1; Sat, 17 Feb 2024 12:12:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708200779; x=1708805579; 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=56fgxRj3TpAnVefFQ6EA11ISjF6QjKkNNnHYVEnweY4=; b=mSPaqaMx7IflpYuKnvm0X+4MRVMU9HTXmjk0HDIFs82GbLsQJjmA7YEF6IqwDE0tQe XqTzgSNauKdyYaqzddhHwNS9v2OnCwf/nNRV9vlBpz4Wv0JEQ0DLSRcnIcWRsa29kYrV Jc5ORtEJ27iOX3pwS+LtBOJzefofsoedWsvYZF2aV5CpJXkEBqXXpRJO+/ouCqz5IUwq p23AHZ9/0OGepNkaNXRrOcZRztvNR6phMJ7v2yUJL5nDGF3vFkNgpoXyejdgWH+GeQM6 wirL0kDHP2fCdyY9FGm7jCJDY7WYC1JEaEW3M1ByF4NP0KPx0cEQHrmPyJE4JaQ3Tplj zL5Q== X-Forwarded-Encrypted: i=1; AJvYcCW9LjPr1bk18ISHtMznCnaxFQMaAUQss6seC2ES+ePlUWbr4nnu9nnK2Q41X3lM42fVG3ezbA3sV/asY+uZqTH9KLuSX2YShOcR71oPKvzdy2D/5+cy9XI2ieaE0EHIIX1zSh27WSu6zramPBYulwR/42fkunCCbJ62CjElSRKRnHBe X-Gm-Message-State: AOJu0Yzz3NRhuXzx5oRJOd9Fi6xZF6fMZ7q0simy4k+RTgp3jrU5kz7+ dCWvcJ9U6PJjmsnwD2Sibufex+EWtyHlLS1vukvtL6l89VW+2qVv X-Google-Smtp-Source: AGHT+IFN0G4viv/q31g5wHX99KqakJNN37bIX87mIyybeLlZ/Sfgqj1rQ6hk9aP8wEZXTEX+ZVNd8A== X-Received: by 2002:a17:902:bd0a:b0:1d9:4ebd:b94d with SMTP id p10-20020a170902bd0a00b001d94ebdb94dmr8124665pls.55.1708200778637; Sat, 17 Feb 2024 12:12:58 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id c6-20020a170902c1c600b001d717e644e2sm1775479plc.247.2024.02.17.12.12.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:12:58 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1708200777; 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=56fgxRj3TpAnVefFQ6EA11ISjF6QjKkNNnHYVEnweY4=; b=S2YAL+kh0Ndho84cJSPnOrpRjlxyb10n9jAW+DUbupNBUfDKzggwmjd/9WCaHSkR+46azL 2AK6aG04VRb1ndhiyShUpQ6j9nWDkXbHcjGG9s4n/rpJ2bQUUjIGFkK9MAji07zV7pmDzz G613qt5cPe9zQQrvzu/2f5somHa/UHHhTwA0McZ7XmghcN2xCxwaG7iBYOnYhiuqeHf8j2 QieSU9bzCTL5OP34PkoO+XO22QVtSbt0gTim3r2TQYbAQbMWQR0CdeuMle49EHZh6Fe57V l3Cnft1drmIStHNSBjZyDu1yfPgFgq1PbzJry/h1quTjvoWv1yjPDVHbQgK5kA== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 17 Feb 2024 17:13:23 -0300 Subject: [PATCH 01/12] net: usbnet: constify the struct device_type usage Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240217-device_cleanup-net-v1-1-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=1041; i=ricardo@marliere.net; h=from:subject:message-id; bh=IyZ5Y2ln3RlvrkcZB5wxYoE9pnILf6gx+8QtBGCE55w=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBl0RNr6Gp9GNDXZ/f9gFTZqt54W8bHuxa5WRwmT +10IQuF+3yJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZdETawAKCRDJC4p8Y4ZY pnTGEACcHsdt6a9Y5FfAgBF8o79GsUsKvuWD6AwO8fxF1xsijq8IXzEgayakRi1jxuMExJQSpCS ISM72jxPJfLkGTCGYLwaXQfwosqcvOl9wrPMzp12IATU+XnrR1yadpQZq/44LqgNEFXXYzn3Isd Csle38sZO51Pe+qP1AAwL+Zq8zsC9WdHkI/ymiHlRrCdzFdGyaZwofjuZtf9/HkaY7cpzou55Q5 G8Z4Izv2JmWIQygfcJr5OQQcyzgsCsp2D9rLmE3BXKfU8RQZOl2uaMED/eW7z4m0YlvujrZEm2S z/8hUyAu33WfQb6Rv/+229jp19oC9kERVHbd3SV6m+KoHuIKdICqy1ICwkVyPe2DpW2ZLr2bdy8 vvkZwAvTPPAotk843CsLHFOFXdQqpfQEysp5jXGozYuTl0/+iyzONeM+wC/od67xg6/7CuDH4NJ N/tOYh2W6RMpiCLDJaLLg+xdZzsUgy4sToMzr6xcPSF+D0yyM7NiQQkXnWHNq/x1bbfibrQ+YFp k96qCXv7Ngao3mDdPCinT5jeTmEcSJxfg6jYgeeEH2HjG1v6PZ04oCMRtOMooEIUC3gHF8CPRRJ K6W76lFmenl8n55n3zGcQRsWYNVNYv/NCPRwNKg++h6YSR15tKMlUaCakay46OZpqtR8qNbapsp Kt3+s3o0ks63iOQ== 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 wlan_type and wwan_type variables to be constant structures 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 Reviewed-by: Simon Horman --- drivers/net/usb/usbnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 2d14b0d78541..b21ebe24057f 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1654,11 +1654,11 @@ static const struct net_device_ops usbnet_netdev_ops = { // precondition: never called in_interrupt -static struct device_type wlan_type = { +static const struct device_type wlan_type = { .name = "wlan", }; -static struct device_type wwan_type = { +static const struct device_type wwan_type = { .name = "wwan", }; From patchwork Sat Feb 17 20:13:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ricardo B. Marliere" X-Patchwork-Id: 773924 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (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 A1D1C7F7D5; Sat, 17 Feb 2024 20:13:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200787; cv=none; b=tRnYr65wLI/vEfArTBf9eYU4O+VuZXKfKgSPY0HGrpbtbdFV6ETamdj39mP2uUIbdLkxj50LnR4aIXhPCznIKE0sjKONWhJNf3gErApe4u9xd7m1Ei67f2SSbIiBjiEgl5itAgM43HTVOsp6nwFDH4u+nBViXXzNVbg+xFNB3tE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200787; c=relaxed/simple; bh=yarIivvwEL0iBD1g1oHgz89LM3QZ0OUN7cz5OAdk7mI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UOLbIgZLQibNrroxjymwSARZ3ZE+81m3F+YJRqnOV4Bm6jgW9nS0lvRKYH2P27GcRe0W3vV6O4t76vNYYXI7xiDzR0KQwmT7qhg+DD36cdiOr6f3IsKwJ4evvNN2Cy1yH1mUgAteq54v+Dhvb+3k0di8heJ0GuEaqekjhxVWF6U= 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=BVCJuvt6; arc=none smtp.client-ip=209.85.215.178 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="BVCJuvt6" Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-5dbcfa0eb5dso2846495a12.3; Sat, 17 Feb 2024 12:13:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708200785; x=1708805585; 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=n4lnVoJ8bQxR7w4vsZ3NULyq4tTkrXiB/TSkyItFgKI=; b=hWkP5kPsgfv10dKWIaE1z5CxA9nnpBv6Vj59U7A+fRWsonlofZNYiftnhxt/bDF6Nc +W2w9b72nHsSHh5Xq1s2Z2Y9vId35ppuhXcxTDztxyt1Ochqf2PswZCAZ6gUp9ZSvOEO ZQrIq/m8jWko0QJg+zvf5WcR0iAbjLLhGVDeRSdqF7vi7OiFcFJnWIwvASHAAH4xcANw JmqK8jsFW1GIJqam76Ee37mxqAVPhpmL4XXaO8dj1g5l1TRSkKCxOPLM+WM0uHqTZTf9 NGQSy2ZOm/qx8turQN340UQ4rpN8+gIluLxiv+AKXA9zMZBmiyratrXH/GgOhSwS+Wiq V0pQ== X-Forwarded-Encrypted: i=1; AJvYcCXzbXc3sbmSuxMEdBZC8AachjLTOFO7Z2+hB/jmv2TN4mrsvtG3oZNmDfJFuWRMaMfRSiupv/oJ3bNVVd56tZDSvUnAQ5l5qalMP2kO+YfntCG47w1047clG3hpsMZi0vNqip8zH2uAnlZf2M0VvOfTglLD8LzF9L1sGJkCwjZ2h1uD X-Gm-Message-State: AOJu0YxceHzfPmxj8/aELZU6dXjzQZulOcFe+bB72yt3IrkKvladRrB1 hjEuHQRAVnArxHMSltldNLzYTUTnWHXZa3yYFvTcxkg0YRWNWe2W X-Google-Smtp-Source: AGHT+IGkC6VGVNk5gf/yLI5f/Rzq6GQZ0RQFSd4sKubWgHq3nKwxK2vKluwYiLMMsAeYxXPxVd61gQ== X-Received: by 2002:a05:6a20:2693:b0:19e:cd37:798c with SMTP id h19-20020a056a20269300b0019ecd37798cmr6260420pze.35.1708200784973; Sat, 17 Feb 2024 12:13:04 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id nd4-20020a17090b4cc400b00298d2182f1asm2224009pjb.55.2024.02.17.12.13.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:13:04 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1708200783; 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=n4lnVoJ8bQxR7w4vsZ3NULyq4tTkrXiB/TSkyItFgKI=; b=BVCJuvt6vBgbxH0uFwQCn9nbLFXOoXBPbgUO4JSqLO/jTt81HjBtK1jdN135IbZqW/0RR9 nwOYq402GyjaxAfDV6uKb8z2UnvXKhzVPpr9+V+PD7PelUyFHvtyldkbtXJNDztgb03Ty8 5clTJ0WsGs8etCeuPYKtx3592tKIn5qMWoCxOm/hVQGP/jzgP7Q9doThvu3c+IH0rHihpY +5VzrOyn6bLwcSgB2RdMqDoDvARfEBlpRt3PRU1zcNH6/AYhOcQP8NHVYF+sUgfLARu1/w w6+G0alpXWVTVJtNxHHcZuHHdbMHoA6li8jJufC8iLzq2vSVXIKIN+RTUCXcrQ== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 17 Feb 2024 17:13:25 -0300 Subject: [PATCH 03/12] net: bridge: constify the struct device_type usage Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240217-device_cleanup-net-v1-3-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=892; i=ricardo@marliere.net; h=from:subject:message-id; bh=yarIivvwEL0iBD1g1oHgz89LM3QZ0OUN7cz5OAdk7mI=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBl0RNsLeps0ymdOOTLpFtWqQ9G0MMgWi/AyXNVh u8lKIx8I56JAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZdETbAAKCRDJC4p8Y4ZY pvIcD/0QD0rQEfEJbu6CBq/BX5x9HIhqTgkJo61Y/K/wcXzdd+w3rK3or3FVbvPmqllbtPIXtTG sGirIaVmwmtK1LAXZaiMuO3026FFoz/9SlMc3ZPUTN6z0MRLzSqj01ts5CNCS16nkGQ0Cyv9CZk 13QvAS7BQSNHipHQPDMaPH9CXzm/+wW6FAmXkjAmIZZbnqF2HlZWcOWuok51y9i36Wojc9RcVNJ GEoZ1lmCD4LM8Etw0y25R/xcKwHK3vL4+pYHNKUmxMipc0VPrQj1Mb9ibeAYcTQ/wW8GJImxBoF /DKp0JYFuSGhD7+7igL0gdirB0kWXMb0goRKJwxriSJglJusvqcJ2IOOPCgSQ6JjV0xGjWLlf0s ZTRPbVO0KfycjpQPOIyLkep2MNLaGI22ogSdj+8OoOyJoYQ9UMA4fYt1p1nmSZO4ICGX3J5kElU Oabuedb6f9fE1Sh+GDabspCCmiSQUMRytt1CTm8iH9YxyBWfiZdw0dEN6h1+sjHImDWBuh0CjTv F7x3zTKLnRTYYhwpfw29Q8Eo8RV8gSemQhAOCn6+I/VpcCGZqIB3IGKnITqIz+36ZbV6is0OGpa 121AGI2Hd3rvJzAbXNJ0M73SiHzucPhrfy6DbAqxddlGdROk+5tHgNdR7skZTz98J579y4CHEgV nN/MjYA/fgm+GCA== 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 br_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 Reviewed-by: Simon Horman --- net/bridge/br_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index 717e9750614c..874cec75a818 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c @@ -474,7 +474,7 @@ static const struct net_device_ops br_netdev_ops = { .ndo_fill_forward_path = br_fill_forward_path, }; -static struct device_type br_type = { +static const struct device_type br_type = { .name = "bridge", }; From patchwork Sat Feb 17 20:13:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ricardo B. Marliere" X-Patchwork-Id: 773923 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (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 0429B7FBD4; Sat, 17 Feb 2024 20:13:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200793; cv=none; b=sKovMJYOIs9oBBlXUU25hCRcSpPZzrTv76kNDIZIATbHgVlrzFnGjpPQABgyl0W6c8fMBpwVdc7p5A9pTiPtpKqE/SLZcoUDLuwvO4LaeqPpNn/5FZqfiY9a3/5qIiadQ3bdUS9ZaqVkAYBnj3OCDcRMwRzbZluF11LFSPYmwwQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200793; c=relaxed/simple; bh=aQBvQr+Pe+2Gdbn5h+6FJWRS7Wqp35hLnpBo+JrfFcE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LBtgU6lWR5tKRbgfMcknZ1OthJ0cRn5Ejav/8jSwZqCeo8RCCcXP8Je9Es8gvgMPTvExG9x/tUd+EwXlkjLFIXcl2dlXVdRiKTK1jR72TT5Tcw/W4xmZG0XBAQiFBRHI512JSJHsqjtz8gwb3cACkDd9JeZ+Cdg/E59EAYSQhsc= 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=UmxpvfAq; arc=none smtp.client-ip=209.85.210.172 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="UmxpvfAq" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-6e34d12404eso361466b3a.2; Sat, 17 Feb 2024 12:13:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708200791; x=1708805591; 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=FEuXntwtolyrlm3wbVMT08ww/bg3HU5xRFFUlrOyRbQ=; b=pviOGEbjTw3jKzfvh1h0CDnjkWxSzgCd57utGMB+WrLn7mcIl0eARToPZ0wyftwEl6 84pX/yaS1Ibj51B58ubN6Qo6sH+PNwBd7RqElqW3WEhkTb4EYnaxuk1Pd8NQRm3WdAmt RPeWrrMPJSnu8cw9cQ7IUTRNVbkcvb8r1kShgiowC1PWz7UtBPdk+IdKPpa6nrcoZMrn QVKNAC65LLNz1B6WNoFK1gmoR/vS8dtVZdo2AS6/L0z8psSlDvG/XrWz/H8Qn8asRT2r kYpt4Nn1ZdxMsVRkZJflDUp+b49pbPW+p0bl9D7W5ySnDJAbblMZov2HdWbFUZGzbUPb P/4g== X-Forwarded-Encrypted: i=1; AJvYcCXXmQ86ZJwuDq6tOYMbKsE2n4Kg8/4GF5EvRV3pkzntCY36HJ1o39XbDhKBlQiZmSphQ0u3evMgTqg5Az1DGopRFPVhMEuQEmmgDpRjTjZSFWqg/dQXOFKXLdMYrWr7vTwShqTWSKmjpWmKJV4B6H3r6cOp9MIOVuG9bmk5ghUkRnsi X-Gm-Message-State: AOJu0YxPPWXkpigf4Ozjmci2DfS/cSGj4tTGykSg1uv0MAR330Vgdmzk UjUFfOXtQPazIsf0x5W5SsOmejfG19GFXnOjhBJd0JAJ4zx3l0mN X-Google-Smtp-Source: AGHT+IE6eFVutf1BYTTUYSRgr8HCyPIsLiQPHnoPhdZoeptC1ac1MJxlH+mBle21JoDut38uXqmsWg== X-Received: by 2002:aa7:988e:0:b0:6e1:3095:ad9d with SMTP id r14-20020aa7988e000000b006e13095ad9dmr6509095pfl.15.1708200791427; Sat, 17 Feb 2024 12:13:11 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id fa42-20020a056a002d2a00b006e1171f258fsm2019454pfb.89.2024.02.17.12.13.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:13:10 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1708200789; 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=FEuXntwtolyrlm3wbVMT08ww/bg3HU5xRFFUlrOyRbQ=; b=UmxpvfAqarUNkPffy3seTReZz5qMWgi8v3SApdgmR1d9vczN8F5+eoq+4uWMSPnxA4Af57 djqaNikBLM7JvGpYvAqTgkPkKYnqfCs8bWa7SurWtfxc+2uZ9wDkAI5ixDavGrNrpVtrH1 SetmFix30f8vyzl8qID7V4ygKmVNcIbJ7Ql12HVsKmpGeyHR5tB1i0QqSjvG4L4CDIYJEy xoAJQRyDMDrh0Irqjlkm7HknuMgyU8r2yCYMhKOqzu655ySnR7YYN0qab02enpzw6zechU JZac+ksmPQwewiIMeuR7q9PfRXBuYQvrLKFZXgIJoid9MTzWejB5AMU6unjR1Q== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 17 Feb 2024 17:13:27 -0300 Subject: [PATCH 05/12] net: ppp: constify the struct device_type usage Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240217-device_cleanup-net-v1-5-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=930; i=ricardo@marliere.net; h=from:subject:message-id; bh=aQBvQr+Pe+2Gdbn5h+6FJWRS7Wqp35hLnpBo+JrfFcE=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBl0RNs2f1g5o/e/BEyd4kl0ZtxijMW2EcQb6nFx 2kSle2JEJaJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZdETbAAKCRDJC4p8Y4ZY pikTEACbuU2f2CGOpTmtcYMBYAQ4we2HAl59b7wf7IiC/ErBNVITa5kPdRvcbD/iiBf2w7QAPT9 gCfs1vJ3mEhkX+lxOKTXdTyu3z2Ta8TlIcc/umZQqMulq2FhTV/429JGz9AMqS6GgB2GZxslU9z YV4EcJED89mFqLpMnbrkICBrg7tQor/KpbNnMHsMc5GTqtlAIJdZ6+MHfFUsTgf3TuDymVfydgt RDLf1rnGcebKQdL6MfMiucDiVUNKJK6nIvFv+VisZ8v3EBE3tH3Q4FSxnuj3c8kaAgHyg1vo8gZ re9kyyPW3Jj4oB62OOcKace4iCsonf2ggVotYHJeAfupENj7sDnoag+g69J4ju63V6d/hsbW6XM 0KuYQywggRLJ9skWFOg2ZubU3gRFfDVIe9CQIh5HBhCmaTDFn3JZCq3v/3k4h3ISRJTLwuIuMYJ DRzo+sbrjAdLVYczG9LLuZUPxgY/LJB2YgBfZAveHStWkiWMoKfAWdVXxPmSayBbKd+HXFIsjS8 JO3RM0o98BIP5teqd8mxcOwViytpLH1LdnOdmRZ1ENK+ulJk7vKNIDddHC9aqOMA+UND90lyNeB Z6XowtvByutULf+ZSv9S8umsPWlCtkV7wVfqW0WzGtNyxMjM+X5VFkCeL9gfYBkM/yZLy0p9gIz D/L8xC+Lb0X6CRw== 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 ppp_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/ppp/ppp_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index 3dd52bf28f15..db1d11ae817b 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c @@ -1607,7 +1607,7 @@ static const struct net_device_ops ppp_netdev_ops = { .ndo_fill_forward_path = ppp_fill_forward_path, }; -static struct device_type ppp_type = { +static const struct device_type ppp_type = { .name = "ppp", }; From patchwork Sat Feb 17 20:13:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ricardo B. Marliere" X-Patchwork-Id: 773922 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 6DBF68005C; Sat, 17 Feb 2024 20:13:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200799; cv=none; b=TDjB1PijRAFILAzWhrROnCkBnjYdmAkvNYw3eU/287Gy4AOxg/0hcMxrplVb1ghNk53DFMXLmoSTRurygxdX+bedLz+U8c1uIBx42/WbSsBD7YzJrbywdQmuSYvJwCpK4P9YrIrv9N3Y4EgtFVXqPAkGMsC3b69VVqca3Pjt9kQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200799; c=relaxed/simple; bh=kHvt+/F2ooSfbOrMdtoNwwajc5x4yhIjvXK1NyStQZI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pp5xsylMo3yEBYpNK0bnCAMGDxh57TBRe1CXxJnF1nwcSvkA7jIRrZpyGye7CC9mnwzHFJ7GlNCBanlyoFgErcQs7ZOb41AR0Jiy3wONIdlkrw0i1GldZNYKKv8/ByeeFXNAdG+ugqVcW2HXILtAc36F+SOXL7iCBfJFTGkWXnY= 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=HEhAtR+8; arc=none smtp.client-ip=209.85.214.178 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="HEhAtR+8" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1d7431e702dso31489435ad.1; Sat, 17 Feb 2024 12:13:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708200798; x=1708805598; 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=ZG+KoJy6pRblhuWX2/D05oUkUQuIMXhhucrzDvVlYlE=; b=RB0I9M2ziG61c8We8sOUW1VjMdv5k/HFX2lRxNeP9pOYkEMS4MwWJa3KvG5yUWYEFX yBBbsqx+hmX0rceNJ68pChma5c1cIuT24qJQnVDCwUZw38CkBRFmEgTYpxNJWhBtnkRk 3/6LcEf+mBaIzz1nZqwUbMy3ijDcV9MFKqU1V+Uy6CvB996zZYF+T6joMFllA3TSELWw T83Cv0mFCoRUyftigm+Swc4wbcvoQ+Yof3L26nxwltPBHbPwiglbb8S/4Mjcx2dSDsST zswEUUr+bH4OLkX7U/JRpEQETmjjEBDyKfCzWVUpgLnPqq9RS9D/RgbTM3QlspXDv6R6 0o4g== X-Forwarded-Encrypted: i=1; AJvYcCV3Q64PAQH6SsS1X0RYuiENtzYa85MXkrreuSlrJzh46jOfFKJG5AG0wc832YKzbZQRykHHeD0CDhoys1OkAcKXpZrl40UKjs+X73hzyhCzz+7ZZiEqVgZxHLjKb+BW8ndcEdvNXt1AB4c0z8vwTl2XbhfEWo4Ch7sL0U+4JEjkz2we X-Gm-Message-State: AOJu0Yy7iWHx0pzGopJ0Jp1UBSZWvGIciobIeiMuL+6hcv1x5F9L3K0k m701CnSJjeDCt2wcqC3DYPVsQmTe204hgiZ9otBSGUwXS1SEn5RD X-Google-Smtp-Source: AGHT+IHzphwhzo8tbYM+p6/gYaVgEbgNvjbGcE2SfbxeY6gbmMUbFR3d1rXGnGH3MrU8MeiaEPDx9g== X-Received: by 2002:a17:903:8ce:b0:1db:cca9:f751 with SMTP id lk14-20020a17090308ce00b001dbcca9f751mr2001665plb.59.1708200797758; Sat, 17 Feb 2024 12:13:17 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id g6-20020a1709026b4600b001d8d90d4f67sm1790155plt.249.2024.02.17.12.13.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:13:17 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1708200796; 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=ZG+KoJy6pRblhuWX2/D05oUkUQuIMXhhucrzDvVlYlE=; b=HEhAtR+8PZmNDV69ZHRPRlCpP89KCx45OhFTY4TqkLiARuvgTlpESSsVziYD1qMfVfG3tM B2BqoyI3dbhlfc+ZkxSsFituOt4W6Lw0KB/o1DoLWws7BxI7n7HyLB6om/Ct+FJjc36cHW eTjP6zmvPxTGJEJ3zvJH3qBBuvJXkrxwK3gfeUrLAPjmzQqakhz0B1TIglDV9wN2Xi9Uom zQzNjA456XPVCL4VfJ8DS9K6cHOD1eGlPej0oOTQ3TTbrDMIpk/KZfPTcD1cYlMRL8taZc cwDkRhDHV006kCAJM/O+YGQgynSjohkcyQvz+CFIo2rzJfLyzGmVeDKHUe0dRQ== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 17 Feb 2024 17:13:29 -0300 Subject: [PATCH 07/12] net: hsr: constify the struct device_type usage Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240217-device_cleanup-net-v1-7-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=871; i=ricardo@marliere.net; h=from:subject:message-id; bh=kHvt+/F2ooSfbOrMdtoNwwajc5x4yhIjvXK1NyStQZI=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBl0RNtDN00gPnUTOP/lDSwWQ0x7L6llPI5tF29a zRgR4kJL/yJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZdETbQAKCRDJC4p8Y4ZY psHPD/wMlaMU/Thwr8IQbr08FD8hI0pzxyseaJ9IXtN7SxFS/0AMKdGSATVJDztXAnhrVg/1rQi 11sHPZttzf5hgFsRJrY8Pq8i+nIROf2FCeh4s+snINqjyRmtSVrj9HjR2mjBblbJgZwxJCfQjSp FfgnnxfRaUZ8hFIxWIzrYcXDQuAUckYIppLFeXdatJhflN0s0ef0p/8A47HMML3WmpMTdWbyudK AhVA9rYZOOTsMpzROjj5dQKUzXz2up+TIaRXq+qfxXU4q+EP2idMbxhBLSdzYC7EkFehVmbuoT2 iCAGiDVhSPh1BVopl+hMiOHRhTjeAehqyvjW3YaUdGeU6LCSk6KgQt6nnbsIantTFz6iTlvVgyw rmJSabE0fQWCman7WBcHy1hkIX7d6UfBQmAJa6TWmzsnmyfzTQJuRPWUmAoZtI9L+h2zL7DYq/e IxYTKaIIBlRLJngFHwZJ1d9hcdGJKYTf5k3k4m+tDpkC6mfuIPdG2OAdHcujYt0lrjLnBFG9S0k ihRQE471z5CSx7nbgp0Neu7K4EZq0q6FfcAnKJnk/E17oFt8FXdhVkHN9wDrd1PVFCCmXXMCjSB TF23dBXT/Yoc+BM+0d1y4pMsjxYHchgd6c6t5qWoGEvndRQwPEqb3OTm1Sg8kIgqYqhir0BzrSl RXTywcnBlVLV84w== 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 hsr_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 Reviewed-by: Simon Horman --- net/hsr/hsr_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c index 5ef6d437db72..c98b5b71ad7c 100644 --- a/net/hsr/hsr_device.c +++ b/net/hsr/hsr_device.c @@ -467,7 +467,7 @@ static const struct net_device_ops hsr_device_ops = { .ndo_set_rx_mode = hsr_set_rx_mode, }; -static struct device_type hsr_type = { +static const struct device_type hsr_type = { .name = "hsr", }; From patchwork Sat Feb 17 20:13:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ricardo B. Marliere" X-Patchwork-Id: 773921 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="mmLItJ/2" 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-Google-Smtp-Source: AGHT+IGXInpkUwpO67eEfAZG6SMtlHXxrmmO6ZqL1R6Tv99t29Os7Hx2UnFHEXYlf5KDA9RavDqXyQ== 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" 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-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 , "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=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 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 Signed-off-by: Ricardo B. Marliere Reviewed-by: Simon Horman --- net/8021q/vlan_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", }; From patchwork Sat Feb 17 20:13:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ricardo B. Marliere" X-Patchwork-Id: 773920 Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) (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 098F381AD1; Sat, 17 Feb 2024 20:13:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200812; cv=none; b=lTJ68Zw/bJ7DlVpcWWwM3rsHCsCaARIapq2FlW46deSfORKC2No/i4yjS4UO5jQuwSrtoeILGR6P0ZVajdMpqCz/jgEJtBuIYJTjPZTYYE8zNgJdxdPij/gHcZin2ShTP9Plu7rOzREmeXSDtoiN9ty58U2GIPjepGQ98YpFHXg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200812; c=relaxed/simple; bh=jckpWHmanpSHMnPw7HQu4VFxOjRCXzlNGUWz/0ZTJeo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CqdOGHEKLjrt46aYJux59g8B+in4CYVL3JV1dCmoXSok+/KdfBxOUNCTZGqJjbwcTkzRVWahg2rSQL8NIH4ZTlpgRV0LgWt+0OF114AZSp89go4E+tvBsv0EN55ZbWLpP7EnQfBQeRA9/Bq/v9ol96ETEfTrztqjgSM6Vo3AOxg= 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=AEPsU/lk; arc=none smtp.client-ip=209.85.216.44 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="AEPsU/lk" Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-290d59df3f0so2594297a91.2; Sat, 17 Feb 2024 12:13:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708200810; x=1708805610; 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=xrOIV6/f3vZV0RT8ynNTPeBVRF+ik/O4GVtwFdY3Oyg=; b=wLSZgbve0H7TLeVoJ32yiPKWqIXNRIMB+610QNtIfsAHEwbb7GLirCP3+w0BJD8b40 9CJ4zsLupmuVmlhUMlgzmAKgd6EcETWP1MXvydhUCODs+Ubnc7Y6Xvee+BhnU/nKUPyD NG1cQ9/7ePYgknKAdIS8tNCk/PIeKFK06LgQF/Rx49BJ6hCM9E7LwwFm5bpIMu5TB3Fq pc+kbJZXRIfSVLIAbgSsH1zOa8Fx8JWFdFJT1mgCWgMsc4vIktgRfLlEXBnvWIx88O/e rsFTBW/XOl0D/aavQKilPtvWCK654e/jRDT1nyc7ZGsTgurIFNbeEg106Iyq54CHRFqA LnSQ== X-Forwarded-Encrypted: i=1; AJvYcCWbMQTmd3r1tMWttaSaSLLc/jGfa0kBnwH0CrlsV3cDK/S1glPPJCJVSfNwbfXG6SlUfBqa/w0zgobWfmClgEgol8b/0vkex/ip297zc/NxU4ZABnjCaO4hRamN6wBOGyYOEnu9N+PF7NDiI2+Wq2VFqTo/GujP8JblkFZKoQ9Py4g1 X-Gm-Message-State: AOJu0YxwMQ2XzjFoiT0EmZfqnaswhCUidJhbG7PJhjDsj74HCFzqOiBz fuEsYa/ePJeX0eiQ706LNd3W+LkZLfoqTcI0vPMVVJnbHunlPvCF X-Google-Smtp-Source: AGHT+IHNI4aTrKzu/exZ5IH5/eCHtxL8hDAZoK8faGROygZc23MMA8HJ0xHAJA5VeRP382zhxD892g== X-Received: by 2002:a17:902:d504:b0:1db:cf64:732b with SMTP id b4-20020a170902d50400b001dbcf64732bmr2255775plg.21.1708200810472; Sat, 17 Feb 2024 12:13:30 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id u10-20020a170903304a00b001d7222d8caasm1819993pla.50.2024.02.17.12.13.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:13:30 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1708200809; 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=xrOIV6/f3vZV0RT8ynNTPeBVRF+ik/O4GVtwFdY3Oyg=; b=AEPsU/lktqn3QfPkZuEQm1XN26hyVbHsQy2EgjvgwjwYINSHoYjBxSs6VAbGYuAse+jkho nC/6oIOwksA5vNNR63Px7gPiyBOVN39R364ExTjAUoDLHzy45hKqh3MUdoo5YUYI/ZMWU/ sIrsG7p2/vGA7i7HCh+At+PqUbwnZAmYg1NNaT9X2NRcONmDkaGHFcY8RLKEmXcnXRdqFZ /iG78rVfrlgohqqZV9JOIMyQpxjfdsWjZHt1rp3gBssaGKtOmJpksnkSVyOdav8gnRno09 tacQqRgf0/ntW8i7N3ZSPdQ5uF1eJ84LMXvvY9SWQcAMlbhc2EjGLefH/yocAw== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 17 Feb 2024 17:13:33 -0300 Subject: [PATCH 11/12] net: wwan: core: constify the struct device_type usage Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240217-device_cleanup-net-v1-11-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=1014; i=ricardo@marliere.net; h=from:subject:message-id; bh=jckpWHmanpSHMnPw7HQu4VFxOjRCXzlNGUWz/0ZTJeo=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBl0RNth7ayQciNaopWilyJn+5++vrrozSI/AGf2 LmjjU+2+ReJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZdETbQAKCRDJC4p8Y4ZY pvQUD/9eIcYw88bFShKSfY20/NUwqHxGY+WcJStJhCBjIXXQwTk3eCT9KVJ0xwG0N3tF5kYz3Xl QSlbOE6MLsb4fXgUTkADqWhPK3nWR8JdoQbMGRet3W37oK1kNkucG7iNPHPD6HLX2gq/kmNIj9y /1hMOur7RKkt28HNKThkE9bDYtpg1AlNEVKn1C3rzCGd9la+DadlzsMhytSdrWaj2UPApUFW0ZU V8h5vmyy2+48oX7xlL47839rTZ0hEbnjSPPXBElgDdgtatCmS7M8JVl0NWQyHJEEfXqinfFSJuu hwUq1OJ3CAUK0OXPZmVJ0O0HGJ3zaM0hANsIbv5WBfsulXuyDX+aVRbzj7F/2yDcubeo0UDIZ/f T4wvopAoGYBXU/dbWKtH71h5xB9/7qVbQNIT4MxnSWQ2F6bP+yKVgNjwOdZLIZTh66ugT8g55jb Y6CJzOtZn1i3ywzG1NS9DLb7xH/OuDRHum8iakV5jChkg5GTVnb8Rbhb34X6K0MwV5IPIZ7ty6K nnBcmmn9DAOYphgAGwlHAtisVEDWyL+E1zDdGHMzYgMbPaUlh4HXKkJmKN3XP6r0Pwlxc16Ahqh 4k+gDQ+xNrnjKCCTwFHSA6w5Nt5k6VrsQNusqQVDLsuKYYf16rPeHyA72lJiKCyrySAc7asdE6y HVX6bd5XxFV5mXQ== 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 wwan_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 Reviewed-by: Simon Horman Reviewed-by: Sergey Ryazanov --- drivers/net/wwan/wwan_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wwan/wwan_core.c b/drivers/net/wwan/wwan_core.c index 2ed20b20e7fc..b0030f3ed0f0 100644 --- a/drivers/net/wwan/wwan_core.c +++ b/drivers/net/wwan/wwan_core.c @@ -920,7 +920,7 @@ static int wwan_rtnl_validate(struct nlattr *tb[], struct nlattr *data[], return 0; } -static struct device_type wwan_type = { .name = "wwan" }; +static const struct device_type wwan_type = { .name = "wwan" }; static struct net_device *wwan_rtnl_alloc(struct nlattr *tb[], const char *ifname,