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: 13561552 X-Patchwork-Delegate: kuba@kernel.org 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: netdev@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 X-Patchwork-Delegate: kuba@kernel.org 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:24 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: 13561553 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) (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 6462F7F465; Sat, 17 Feb 2024 20:13:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200783; cv=none; b=WWcGKQhrkti+EtiyDzsTVsMtJSYBisR/c9gaxo54caUkq6GR3E/O+jcO6VlE/Fek7jVYfhftUbbYCMEqrj3JPLOoROn7OwySWglir5t2T4oP6QB2XQ2ffL386h5cstFN9rUI2kY8dYYQ0tHS1Gk4L7t/x3Yl5zABS3g05OrG7YI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200783; c=relaxed/simple; bh=se30nhUuFONi/uLGCt1oGU+KS30rvXjwHshvsRJBdW0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=t0wByAV6hG0/lMDlWbY5Dt0jS4FE6Dj+tF0VaSOzeTRYrkYq2p6p7o7admk8Q4ypxEG76lJKHj6WgAmXzQwxvTTR4ibTdOlQNq0f2dMCUQaViRu7fAi/ICCPMhcRSASVMvQceDQV1cnSJnQ4kvj/oE0AawRpDXzA3QrtBkqQ4vM= 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=JqNilKw+; arc=none smtp.client-ip=209.85.216.51 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="JqNilKw+" Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-2907a17fa34so1490019a91.1; Sat, 17 Feb 2024 12:13:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708200782; x=1708805582; 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=PBOYLPxL42yes/PWt0k3rULnYxEYTLijjIvk20QuDbY=; b=mN00kAG+/S+g915xTCnYNz0m6ot9pKS7pXzVwOingNOVR8pvkQtCMexaa07YFR7lnm hzpVNkQyD51JqAh172tFcph3/Wc/ncPCLih22nVyZOJ8yDEZGGubd9dAJolhGbh/qUrT NYyuxST9ArFpa4L7XbiJTiBubogU3xQD3l9PNKVSXX973kSHIXlkYdSm2mwr4vHEPfu8 WQg0PORoTNs+yh5nAq+16JSV4wiRNli5qXMkV4on1BWJqhCxB25NZYqt2mcVHLdI7FRL +i+2THEJDd7nR+ASHezJCMdLBI/ylQc33cP+Fv5RCkebhtI2aBe2CsTcGdiwyMYX6QRp O7pA== X-Forwarded-Encrypted: i=1; AJvYcCXGbXbZq/Uq0wvNk5gK3mjVoGj+oGsjMi2JlptOnztHUiWCBnn7a9hNBe3Xjez3C4igEEuxlPyvBRZWGLfvzKvynsOgkuQW9T/dHhyq4WjlhpWIOccKzKS+d2xk61ym1lKEHdJx1QkM8b5jYbljjI4C5cirBZESwvSRUHFmJvGKHcgt X-Gm-Message-State: AOJu0YwSeRRMk/UV/k+kOKz41+MEUkchlyEof8il0XAb8pDgl+YZYY/j QOIPc1m1bZn1a4V3ZVJFX1h/s3OGyCT/3Qnk0RrfFqHPlEsx78DY X-Google-Smtp-Source: AGHT+IGH9zvr0co3d5o5vWao4dRSzpuMZZKrFjpMQb3zg05GpPcxoqIB4QJJURIfa1KbVo/JLqPtGg== X-Received: by 2002:a17:90b:3104:b0:299:4a62:548a with SMTP id gc4-20020a17090b310400b002994a62548amr3305069pjb.34.1708200781761; Sat, 17 Feb 2024 12:13:01 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id sw8-20020a17090b2c8800b0029732fc0154sm2250531pjb.3.2024.02.17.12.13.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:13:01 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1708200780; 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=PBOYLPxL42yes/PWt0k3rULnYxEYTLijjIvk20QuDbY=; b=JqNilKw+JiKmfz0GVkhgq7XpaNJI6HKcCgz/uOViUOJ1FNMCAD1/gTJu+aDUBLKDXajmmN w1/CmMciuHZS4LFZ4I21EhcmZ1OovQ5coDXE3e56vhsJp8/EOE2CxHCRE3ebMao1X1tesl kWxA4nUJMwUxsF00drryb5FRq2OaIXZMU22YVwwrY8oXA+9fx7JNqWimTwrrdkAY6IYMvX Fh2kzJLq8yRtujM3VqU48+AKZVaoeAjB8rB3iqhAon4YBqXa3erp3EyNDkU2jjARI1N+fz zwE6NCwlGhpXtChCThiVK1PsUP3z4UIpe6hK2nJe3o35yjk2ckY6eskEOPBf4g== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 17 Feb 2024 17:13:24 -0300 Subject: [PATCH 02/12] net: dsa: constify the struct device_type usage Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240217-device_cleanup-net-v1-2-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=865; i=ricardo@marliere.net; h=from:subject:message-id; bh=se30nhUuFONi/uLGCt1oGU+KS30rvXjwHshvsRJBdW0=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBl0RNssKuhjoSlZTHECtiMIBdkIEL28xUnFQ38I 2zmenOBuNWJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZdETbAAKCRDJC4p8Y4ZY prBdD/9iyEhb8C4N0+XlW3uqQ0xH+mL4ImMhFfh9kTu7FUUegRqrSbGwM3ZBFeeyxnRURCE39q2 MyiwIsVfpHzke7X/+mUHa5qgvaj6N8Dzm4D1nx5+u38mC2BEps9ADFpTePIltG3ppcdHaGT5iph lSRn102lBOGujFj9EOXNOf0FnCynoKUrzJkI/dOvfHkrxLMt/H5SaHxAZ+S0skhRi9ELs+l0CPZ fKpimJe8iie2cn7ZuwwVNovf+5Df5MUXVjBvk0Hn89I1RmR7Y09pZgHtvTdbZRfK6Cgp2YTE17Z TGBYzdgfe/Fu1k7NjbXcqMXR7AgoLH2gkAq092wObtav53JL3OWBblFY+y3mIRbSiXll4Tkd3fR Tw089lRUtqgiKY13rj1RHIGHJqmwImEkGCTdti8fdf8AVuzir8O+v+/ZoihaHOZkhqHZwtYrL/V 0gbqdhWKRw8h0yXFSpwa9D3oZXCMaam14yO6mpJHGxb+33pejg0FjuHnolAtXgehm17w5qfEXOG UreSUahijZAmJqBaGbz0lqbVTXeSmKs7S6HnuNKbcO16AKvZ6Z3o8uBMG72rnlOh0s+QWdrKmXH Aw4NRjoubGBlaWG1oYzJ7+UnzBz0xStTtot/eFUP1fWheXTbaIHlfOQgwCmPctV6qVbxH5iBJyz C3vc2a0HMEEBY0Q== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-Patchwork-Delegate: kuba@kernel.org Since commit aed65af1cc2f ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move the dsa_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: Florian Fainelli --- net/dsa/user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/user.c b/net/dsa/user.c index 5d666dfb317d..4d53c76a9840 100644 --- a/net/dsa/user.c +++ b/net/dsa/user.c @@ -2429,7 +2429,7 @@ static const struct net_device_ops dsa_user_netdev_ops = { .ndo_fill_forward_path = dsa_user_fill_forward_path, }; -static struct device_type dsa_type = { +static const struct device_type dsa_type = { .name = "dsa", }; 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: 13561554 X-Patchwork-Delegate: kuba@kernel.org 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: netdev@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 X-Patchwork-Delegate: kuba@kernel.org 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:26 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: 13561555 X-Patchwork-Delegate: kuba@kernel.org 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="dHqpsrS2" 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-Google-Smtp-Source: AGHT+IFLhZCt1Bomhbdge0s9l8Q1F+WHBmFVAFHmGgf/RHuS+y/UixBWyt/egZ+mcioU6D9SSKlr7g== 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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 X-Patchwork-Delegate: kuba@kernel.org 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 Reviewed-by: Guillaume Nault --- 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", }; 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: 13561556 X-Patchwork-Delegate: kuba@kernel.org 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: netdev@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 X-Patchwork-Delegate: kuba@kernel.org 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 Reviewed-by: Guillaume Nault --- 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:28 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: 13561557 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) (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 35E1B80049; Sat, 17 Feb 2024 20:13:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200796; cv=none; b=BarT/dop92aGEwSHi3kZEkacFWltT0FCQ7DphEs/OryMV0u6qhydDmuGcp30HjHTh8Q62poi1nmNLZgfpOrjwNcEFRomBgkXkkaSEnXQLdGxajOHubCJNkfid91fQQuFC/8706f05m0FXdyy8nUFz5dXgD7Hs2WZOOT21pRNprA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200796; c=relaxed/simple; bh=YOg8kzVQDwjf4Bq7kKhd7VeOutfQ0nCyul1OGYb2N1k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NL9we+zT1b6DLg5HX7Ph1PvqHr927qeHrBCvJcMWYln52wgeckTh4GVOILRsqh7AmR9foLYAlu7ywD678pMB9W69Qm2AQ2Vqt29AqdL1+xVNMPThbwVW9ZbbLRGBYBHQ6fTFOTCzlxoyVWioqEyLiT+Tzo8nDLDPo5Yb6hDT69k= 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=LvJD02uW; arc=none smtp.client-ip=209.85.215.176 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="LvJD02uW" Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-5cdf76cde78so2595075a12.1; Sat, 17 Feb 2024 12:13:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708200794; x=1708805594; 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=YCWx4XGyppekyhLkQZEpGjtegnjXjHw0zMannEoZGZM=; b=AzmZD8mnJqe4YxQoHo4vvfzrHKPhrXEjMCIRtc2DYYKtdxox4em2v+eVfufGD7Whbm x5TTtws+u9ddfJ0Y4eGsAyFaMQVK2lnQRVLhMwwNHrZTzM1udERxXMSQw2w7e5thZmeu 1YXtj2feODlqG+tF+8MZFEwZ3cxQKeCM+d66coCK4vyedDMnQ4g7Od85kdRSUZqj+I30 P4u8FKbmupTO28ykqO9S/h9RJW8i5tophcuxdU5feGUf1dZPXa0xlCpgieP8mYubuTlN rW95zRKrTUdpJ75/HpjrnwZEJuGkBRJdjrtgCJv6a34Y7yKV4b4gHnz53uRKlgd0K7XC sVsA== X-Forwarded-Encrypted: i=1; AJvYcCVisFqZVrID4kD7SLUh5pl9RQMrXIgFGh71um8sA7FS6lxZrKA7fla7SRTOyEKxsqjWzJYQY4wPddZrtHlfyIaRlYjEhOLfHcBToE66n+XB0l30FoxpeWZuuoIbLwHYW+8+S5d4rNqkSbFDpjKaHoCzWKlxRuf5TQqnqCBPkRflPFCU X-Gm-Message-State: AOJu0Yy5qjxBr32Ou1M2dWIzeHfikf34FoE8DXUH5fauMqUxCngYon0I ydkxoSnIej0QN/lntArubjod61rlE53aqzwaKgAD11lJxUyu42n0 X-Google-Smtp-Source: AGHT+IE4hSfNSmmELalct0I9YR0J6e+q9Mspk8ruDuaB7ft9GHU35clTQuhdcdisWurlEqC2wsid/A== X-Received: by 2002:a17:902:7802:b0:1db:c407:c2dd with SMTP id p2-20020a170902780200b001dbc407c2ddmr2001054pll.18.1708200794578; Sat, 17 Feb 2024 12:13:14 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id x4-20020a170902ea8400b001da27cbcf60sm1784564plb.236.2024.02.17.12.13.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:13:14 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1708200793; 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=YCWx4XGyppekyhLkQZEpGjtegnjXjHw0zMannEoZGZM=; b=LvJD02uWj3k+Nr08+LjoZQ4U7zHCX5o/x5xf8cTMehEuoendWssKo7jsK3Y3dIbmqY27bO HVZwSMo0j8JE1cIHlW+yxmTt/cttr5H/6zkgwZZSJwJSMZVHEPvVfa9kWlVAGOv7nB8Y0l /NYIgRISInQs5VMHhYeD748dVhOyZwaK1ksQwbma1qk/BGUgrLkcpRCSu+d8OBDV7L/sS7 ZAaAkQvOT4VVK6TebZmLAtyTQQE+0w4wZnw325LDS8IRpcMN8oSWvESk16yz6aTozA6APA nvw8LlQvlNe23sOWVmii54uxj8rJ+JL7Rocsd+1BuJRkPaIz4LZxTXCbVrBjoQ== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 17 Feb 2024 17:13:28 -0300 Subject: [PATCH 06/12] net: geneve: constify the struct device_type usage Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240217-device_cleanup-net-v1-6-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=909; i=ricardo@marliere.net; h=from:subject:message-id; bh=YOg8kzVQDwjf4Bq7kKhd7VeOutfQ0nCyul1OGYb2N1k=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBl0RNsrHlscC/Pn9bzC2NTQXqUj6ySs9nByifKi Ccg3q013BKJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZdETbAAKCRDJC4p8Y4ZY piy+EAChCqwWchqM6ZpXCLcRkuV6P3qJl4sCOXUzQ4bhSoNfWUXQiTyMHFwVnEdNFKRDIaKYeYk U5iUFdSNy5AtfAslyF/33sONfDbXEw6rC03PEWcuUW6mOl4xSuqnY7zqoKkFd86g9Yb8vVdqmUs TeFGPKd0qrUT0WpJQJI3XJ9wf4QLnkwJ9EQzUfai8SCDzKmQf7H3MS0FdUxdzDy6djgYRm1MZ0r 4Mv2WDB6N4uDnxkizopad3qg+jKPVNDMAXRh9/Nh10Wx6azjN26ZrPIhkCinLObvpv1TFppx4Ly DTsGFIEvwLHORp6rBzzLC4z1+zzCf2vj7eXO5D3WIsMjHp1+xx0Bm2MvnHIOoJsp71P0Mu3a6ZZ 4vPNQujw7d9a8rGJqTOUwaeaamj94SpFMjRn4rDeItrOGVVsw3fwqS9Sz61NqVS33XgkLykI8sm AwASMJSANRsleN1X3J9+o5mgSCMgMu1GmolcH1rEaXwYuO6wcbieCos8jnyWB/3LsOpZiEbALfX dzgiJiAicO2OW2TpD7s9UitbToW9uTUECq4SDHa8pAcvkVtGY+ELdfqVfUZ3LQU9DrSgIy+qiV2 yryHWLG2/fQTBIraubqEub3LrZW4PVmCQ7AzimX/Aon0FL5NAcqIar65NMJq3GKN7gqoJoQRwKL +uVTULqhpNK+LmQ== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-Patchwork-Delegate: kuba@kernel.org Since commit aed65af1cc2f ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move the geneve_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: Guillaume Nault --- drivers/net/geneve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index 256602a72356..6f3f9b446b1d 100644 --- a/drivers/net/geneve.c +++ b/drivers/net/geneve.c @@ -1142,7 +1142,7 @@ static const struct ethtool_ops geneve_ethtool_ops = { }; /* Info for udev, that this is a virtual tunnel endpoint */ -static struct device_type geneve_type = { +static const struct device_type geneve_type = { .name = "geneve", }; 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: 13561558 X-Patchwork-Delegate: kuba@kernel.org 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: netdev@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 X-Patchwork-Delegate: kuba@kernel.org 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:30 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: 13561559 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) (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 8760380C00; Sat, 17 Feb 2024 20:13:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200803; cv=none; b=PG55zeBQWy4cpr9Eo9RReTa5vthppgF6Oa7HYnWIjA/RFccdOx11UPHfLpYPCL8M2TxMRAi5Y1f3BicdpeSWdto46Fvv2UdrmE1C9UAL5JnMg2b9KxhzRtpM/8C0wDCpdHA1r7nwhwhT2uTiuZuR9yr2aQaflwjw5QWn7ctaM9w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200803; c=relaxed/simple; bh=eeFgE80nQULg/ODH3WLl9PUdnSdgjTDRNDmmr+zQ1fI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VbGKxASldZZYM9jZx77GAs2zJ1xdbtS/CHin5D/kDas0br3OH6iLeRSqT6dBmoMHWYthyRl+Nht6wPWguYWD9T01Gji6TE4w0nee+vDNLirDWNm4GfkvydE4cNnNgKpcdjn2mzxn4SW3SnPAflF3afow/r/IYCbaQzBq6NLVtQY= 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=WIMhl9TS; arc=none smtp.client-ip=209.85.215.170 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="WIMhl9TS" Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-5ce6b5e3c4eso1282846a12.2; Sat, 17 Feb 2024 12:13:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708200801; x=1708805601; 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=8iNTygmT5ipcARp5YbQMkBNVEB7RzR82cYZWFFk8+0M=; b=ULajX2IBBzx8jTV0Kh3tvW6ZcMPqq+u/JmK24UJy6HR9+dUY3ddrapeFum5gDLmjbc yYIRQsGcM0Imtt8rU8pEUYu1JRnnglg4ggHBQXeCDeEnozz+aV+cV8V0gZpLRoAYL6t4 r8Cur9dSFxG9GRzVJnsmXZ4Kim4cvJ9X4tz1Ecm4fMXdJWga27lcMv7lDP5mdsr52zJP Y1jj4HJtQc4ARqvfx4tsCBzxPzC3opD3IWUz+jF5xdxIW5YFOqT3p/vtrh8RA6tGcW6N QQECIxMy3wkBN7wE0j400lU5ryIbZItKws/ZtvVCGp1JxDiSk2SqLUrLBFWXH1G6UEyB IS1w== X-Forwarded-Encrypted: i=1; AJvYcCWzVKLDRuyyR3nPZgjbg9srHIZuApPngaOKXgZAzXL5bZhQlC5bgiNnYFrt0zrZFXZ/NyF6YfvSa4+HWjpXo1Z0gZAA0Mf78hVLKomJ9Ccuw723n18cZNbDXfJoErbebjqoLBdw7wa/b69aCGcyH/RnrGc8ShcCUSxut+3OZqzMgHyz X-Gm-Message-State: AOJu0Yw95tyeblnl15P/HfL++DDeysr55il3JTGs6unRG/Hp7zMVngyI ghJz3zdCVuRHaFOtpbu4IGZM7V201B0sZl/CNTzW2as4s5bpsMiP X-Google-Smtp-Source: AGHT+IHSFdn6mSeJbZau5IuIx9IKsfcMi1A/6wHz+QaGjOuSMIpNBvBhhKVOwa50RrAitceZU+f0Og== X-Received: by 2002:aa7:84d9:0:b0:6e3:1fde:cb72 with SMTP id x25-20020aa784d9000000b006e31fdecb72mr1774098pfn.23.1708200800938; Sat, 17 Feb 2024 12:13:20 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id ka26-20020a056a00939a00b006e134c4d69csm2001825pfb.200.2024.02.17.12.13.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:13:20 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1708200799; 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=8iNTygmT5ipcARp5YbQMkBNVEB7RzR82cYZWFFk8+0M=; b=WIMhl9TSIiodCLJ2hmVc2j5qyyoHKviu61n28l1TovzHev6vEaZc6SP4BK3gFVJBUqqq5m EBRDBx+bXWIH5buy9/86HKeTKRrp0mrMnhqSG30q0KP0CPDlIPBU4GVKfjvkRoO5WnQfg1 wXaJddfm5IWx3/ZA5/cRwnwHVjA9vHopDfkxzMZenPpDKQ5uF5WR3shxhBLLXLlHCJ6yRt LHnjaJBsfqtHBKvtumFHmOzDv70kotqKyK72y/8IvBFlgys4fGZfLYLGstARgY1gf20mfe KBp/1nP8Zq6zVQTrRE7csmwVwnUws6WnjMC4mhsnRNcz5jt6jUeBHUqIvi7GWg== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 17 Feb 2024 17:13:30 -0300 Subject: [PATCH 08/12] net: l2tp: constify the struct device_type usage Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240217-device_cleanup-net-v1-8-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=888; i=ricardo@marliere.net; h=from:subject:message-id; bh=eeFgE80nQULg/ODH3WLl9PUdnSdgjTDRNDmmr+zQ1fI=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBl0RNtaYr4KM3ym68vowZ6RFZ8dGZ4QSN6ZFoqj dePyx6YDuqJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZdETbQAKCRDJC4p8Y4ZY pvbhEACfDIVsBUMTjBZbGV4kR4SOZZQiVQ3ZsIP9+Qga6a+hrWSp8vxQLL3MXOTueQ1WhMSffTL xc5aEmWO+QZDr7qUWUtwcTbtvMswxHFeMJJGWtLpU8skfmMuNKPL43e/GU3q0VdOrYx6l1sgglA zaTYZnYousVSSZfafz/zfUik3eQnfFIjACfV6YgZARpniBYYb1PQ8+0jtBKzmaVIv6rzKNk5YMg Kjf+lvl2m3vxKGT+M96hZ40Ot6oYKe2+G6e5P/NscQ0LMNjnC+SfKk2xEtvNa/b6wFpnkKQhu3I 4z0EV833G7g+UDPFuA8F5jVoauFyoA76ujGMgLrKLxlNek600Iov2EmbVpTI/VdLYU3oQAZ/BaY fAwRTS0qQ8h17A+9U1gVMQ96HcR6IRcevaxM55UREk1JckbFcm/TcWMPUlSKYONzpKhuunkGQnA WOGnSOe6UhxxO/js8tSLU8Xrys7cK9xS1F8pKSKQAye3h65j9GIEEsrQTf5DEBSDdLjGvoLFw7L f67MNie/cE1mOe8EA/MVyplPNDYWpgX4FVefNBqBl7pdKoEjGTJ3biF9U9+YCAdYAAls41bksKS 9danhTGJxyyA0qZSZ90y6qr3g5s5uyhZv5JTxV5qqkurUhgsZUxIykns77OrrFXXTGPeOjCV/2N /4I8cY9pNqMl/TQ== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-Patchwork-Delegate: kuba@kernel.org Since commit aed65af1cc2f ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move the l2tpeth_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: Guillaume Nault --- net/l2tp/l2tp_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c index 25ca89f80414..39e487ccc468 100644 --- a/net/l2tp/l2tp_eth.c +++ b/net/l2tp/l2tp_eth.c @@ -100,7 +100,7 @@ static const struct net_device_ops l2tp_eth_netdev_ops = { .ndo_set_mac_address = eth_mac_addr, }; -static struct device_type l2tpeth_type = { +static const struct device_type l2tpeth_type = { .name = "l2tpeth", }; 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: 13561560 X-Patchwork-Delegate: kuba@kernel.org 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: netdev@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 X-Patchwork-Delegate: kuba@kernel.org 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:32 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: 13561561 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (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 139377EEE0; Sat, 17 Feb 2024 20:13:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200809; cv=none; b=Hj8LtsZMd67fLQYwFXKNX7e8iuVxk0vZIZH+nuxTnyYf1itlvBiuNQmW2/i/RpKdD/mlVwD+KSVQgST2hEf9FauCMqNme0Opkgw0d2vKo4+LrNNCz7U1/wrH3kZdmHR3CYCHDwKBUamfBS+yf3n2en7UKMEkyyNjO8Uk5FN5CNw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200809; c=relaxed/simple; bh=7JK8021NFcn7x/A9YmsBl2kwgr4grPXAYQc8nQUqfUw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FnBNSSdXsDoiFZi4srm0U7LdQmMgcYcc4OBLU4efIkwKpqXBdX+1IiEoT8hWWNHcget84qsgX09abFbP+IUtAcdwpA9uh39G2v5Lb93w1NZM9fe+h11YJk232SVFiFW22xGFUrUuofia/TrgYo7t6yFNO6sD61e1LmhznWSZmWg= 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=TXoBVl24; arc=none smtp.client-ip=209.85.214.179 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="TXoBVl24" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1d780a392fdso18279185ad.3; Sat, 17 Feb 2024 12:13:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708200807; x=1708805607; 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=2ZT106h+HbFoSOyeUsPjhLLk33QTW+0Hf6eB5MZmNJg=; b=t/mttPdeX9ReWTHvQQa1zQdxaYyUVqDxoF1JpmHx+gUcO1rcPpKVTqpfF6H/dfwANo NRaVKiV++iqPvMZ/PYwBmGh1RugRb2rmhUqjVeMyjH9uEyousYD9DCXDZlXo5LesO2H/ xU5eKoKlmgq9djXKD5ZBRKOwp5IOSQA4uWlcI/5zfxwUbYxYftSyy8lDmdQugx7jzp8C 7akBZE5b9Sg+qCsYe3MLJRPRqQJH2kDhq6yn7qQYiA1ZY+vz3javrmKZVWCl//Les0IK ghlFOgWcDk7ZDKDat8vSxVtW3i4fzpFM1FT8uQ2ZoAjbVM3RUGI9Jhv0QFinbvdd30z5 i/Mw== X-Forwarded-Encrypted: i=1; AJvYcCXubZnsDv1ceGJPa9DO0iZQO/beY8Sp2V6xg7ucyctxi4pMJzbcEYRHHB/UgdNCVNq1uIqbdPAg6RmtsVj9YH4lGnjMJ2Xlvdts9TiqKcVzuUxeVwTtz+/vrcM2QlS9aXJjuvqRNUcPsJBDmUtm8uZgvSXlOvwtdJuWin0NMpc8+awF X-Gm-Message-State: AOJu0YyCAw6vK+9eriAaVr9R6+tTpNKN0oc9vQ+gjQJ7sddAR9mfXIri wPR764LfkcfvZfT4m1bkAMwE83/kzjlVYH2JM0XkVEB7154CB76V X-Google-Smtp-Source: AGHT+IFvYmltYPzSRDov3MAi/6kQwTMhhkBwf7enDquag6qlGhiZuAbJVCD2YWlFru5GZj7aFXoPIw== X-Received: by 2002:a17:902:6b4b:b0:1da:933:fb15 with SMTP id g11-20020a1709026b4b00b001da0933fb15mr8658770plt.0.1708200807322; Sat, 17 Feb 2024 12:13:27 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id v11-20020a170902f0cb00b001db5753e8b8sm1793294pla.218.2024.02.17.12.13.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:13:26 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1708200805; 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=2ZT106h+HbFoSOyeUsPjhLLk33QTW+0Hf6eB5MZmNJg=; b=TXoBVl246Dfzf3FAHyT7Y62k+DG1hxFI7ZTixZHUx/7f1oE1QIaTH22722mv98oiS4amFB Pq/B8EcRJOW8SDvzLi/O49soMg4gvaXfELNkDiqJnQJRsZE0vUeE0L/5B5gxwOb/7jxHuH EBOcV8gwiYBW4VwxTpBIY6XyIa6UB5rhY7h9169dQCFVucnYwBJu0WFqDStvQfJPx5Xkc7 MzRa8hpXMH4Wro5/sKAQUM9aLEXgTaHtvs5/LjAIJWPqTmwisOkejSk9ZYPnSLQJP/Lupu xMd8DpS5Hmt87Es51xt3AyHuRu4Gu3r5aQ9Ug85mXvHV7lJ2UYX0Tt11C7cLVg== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 17 Feb 2024 17:13:32 -0300 Subject: [PATCH 10/12] net: netdevsim: constify the struct device_type usage Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240217-device_cleanup-net-v1-10-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=985; i=ricardo@marliere.net; h=from:subject:message-id; bh=7JK8021NFcn7x/A9YmsBl2kwgr4grPXAYQc8nQUqfUw=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBl0RNtX5ra8kUh1Gz6cnS3au61vDBZZs5DEya2u Ot/UI9JBlqJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZdETbQAKCRDJC4p8Y4ZY puyZEACUj0qXPyNUoJgWO4PQw/6OQKeuHMPxJiEqCHR7FBusoaw9HyTc5elN7xY2vmkewPzGyYi GbnUjqXHRQIT+kRIoqc/sm10IHOI44K73eQosTD4XgmojUSxeFHSA9ePKxNdbjQ2vf6hnubUvKL n60/YHGR7lA/Y6M5uKF0q1kEUV1FC9576qVx7TG/ge+286EEjHBdCvSuPKoRhhSmY8jPjLUhv5a V8ZEMDD4Wx5nfcQBzLpfoCBCS9VQndN+p1UH3uQNZyYqp+eOrr03xF/EGKE9/PwtI9rPiDmMBUw AgbY0RBG3LGPfOeI2gr62rnWRIGeaO3FfpmBdKTZ9nJdujfl4AfX9NlQR9O8NuTlBKtbmyYVwek lrHHIQV/lW3HHYqpn5pWqCBbm055GjWDk1SXNe3FChipDYriecNeT7ryuYkYi0D4MOjEsWVFoaj DZVOXQTzgkxZoVAxfmPhi5LH2jtAwIPNp6rfmPKs1jVNQmrTmYUhr9PrYaFpFzryXApr/nia9kF fOSe1eoJQezsqfq46ysOezTJhrYhWx+H3HLPwl7EhZno6URbPlDoqBKtB9lcFyQbw4EdoDQvlMR CIX7wVNuSk+meGgvrtgtc31MoejYTufJzPSQtPNBbym6u4eixApErLTfcZUITop7RVu+8fZpiUr qBAkM9EZmOJJ4fQ== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-Patchwork-Delegate: kuba@kernel.org Since commit aed65af1cc2f ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move the nsim_bus_dev_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 --- drivers/net/netdevsim/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/netdevsim/bus.c b/drivers/net/netdevsim/bus.c index aedab1d9623a..0c5aff63d242 100644 --- a/drivers/net/netdevsim/bus.c +++ b/drivers/net/netdevsim/bus.c @@ -129,7 +129,7 @@ static void nsim_bus_dev_release(struct device *dev) complete(&nsim_bus_devs_released); } -static struct device_type nsim_bus_dev_type = { +static const struct device_type nsim_bus_dev_type = { .groups = nsim_bus_dev_attr_groups, .release = nsim_bus_dev_release, }; 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: 13561562 X-Patchwork-Delegate: kuba@kernel.org 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: netdev@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 X-Patchwork-Delegate: kuba@kernel.org 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, From patchwork Sat Feb 17 20:13:34 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: 13561563 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (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 7C919823CA; Sat, 17 Feb 2024 20:13:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200815; cv=none; b=KtP8y4UxWE+RSTfXLP76wShFE9NgrUwqpWF5By8834XAXzxZyRteZeSmPTd5bfArm2s5hXYM8jguMJTCw6xnkl2d9ZmmiTayCW/jcoFg3p4W+z3fHBnvAC7xWfH+x643fEsj2g7K9xO9xGpDzd6URPJKLJvL5ri21B+M7S46ujk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708200815; c=relaxed/simple; bh=w71Wbcz7FmwZv+zc0blwnBWeOoYM4g6wH5JSNctbpo8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rjWxOzkpUECAcdBbhciwFfhb83FjSJbIp6lxEZ8RyG/pawWjinjxvUDT4ef/DNWLVXw09FCw/gMaNwCZyONNvdo2perp1MALbmaW+EiuYKww1s589lizmcadqPV59yUUW8dZClDHnOaMc0iqHN0hbVPnWbTBOOEKvkrkMZs1PuI= 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=CoZRJa6w; arc=none smtp.client-ip=209.85.210.176 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="CoZRJa6w" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6e104a8e3f7so2623723b3a.1; Sat, 17 Feb 2024 12:13:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708200814; x=1708805614; 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=eLlN75gM6cSLXL0namU4YIlalW5Vi0mlHQZ3MHBhLI4=; b=fPyALyfMFb2vJBpQaOQGTAuxDXSDm3XBnWZIPQpCbUWhVRFv/Ij2tfRneFALI/MrMa LJV30g4l2VcrVrQ8uNOI1pLWZmNR/HYW4gJsTfOgXl4NsV9uTh3kJj4usnCEKgwsigLS wOD+xTELHoe6e6tVZR8TrJzXFZRUQYyCRRyi/Y8QqJzGQfvWNUatJYBsU0xynyl/Vaw0 K00SXCkeJnUvArvnGeVAkq+NmbapiMQ7Cv2kvstlWOPBFb/uooCe7vJfXiuxzK/bettt GGGA98aqD6pwlaL/e9Qa3WA8UCmP7Rnu+LIQIrINYsvpNpwb57wAZLMkXK7KkNholjhz vgYA== X-Forwarded-Encrypted: i=1; AJvYcCXiHlpQktA9ngw85tOFRtTFFo14fRQiqEUSAqPlzufRxQu1UJ57ydpZhSWs7JFdxNbWQ+RjxL/cfpAeIpGklE3fOWNoQq4EC5TwZI0K/pK9ltIevE9MZ002yH+zshC0ludkTiRvJ2uukQVt3D31Oe+Gd2LHMRaArSwUMdoQnvv1FdPG X-Gm-Message-State: AOJu0YwqL3B9quDFeWcXIzV8JEpI0G9nhb8lKDgJ2bTDJ9zlbQ0OOZ3i 94i8kI/ExUc+CBYFMpR9F7AiymIjRTibDuMzZ5UhLm8weblivuLH X-Google-Smtp-Source: AGHT+IETR8osEA01neyaUCatTxOdrg5wlbF2nxUD8OZZ8J5MVq8bPdspXda+OFm9Wsq/uoC1CkXsTQ== X-Received: by 2002:aa7:8703:0:b0:6e3:84cb:3d51 with SMTP id b3-20020aa78703000000b006e384cb3d51mr1500974pfo.33.1708200813620; Sat, 17 Feb 2024 12:13:33 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id v9-20020aa78089000000b006e13a88d52esm2024077pff.61.2024.02.17.12.13.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:13:33 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1708200812; 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=eLlN75gM6cSLXL0namU4YIlalW5Vi0mlHQZ3MHBhLI4=; b=CoZRJa6wPSrOMvSIpcKXRjMZvP8gNtwSvdc0gg5MRcDWy68yiY2a+GaHOh4MbVa/8prsRc 2ywLRY5zMey7LTXsfG7Dfrg0PuY4+BGFZtil2N7S561byE0ZLUHLI5DwZS7/xxeTtVxG8e OiG6kIi1hMAf2iPrjJ+zUgAXP78Fjtffq+8eVm4JZ6aTsW3bZXoO0FrguQxbX7mcOy7aSf J5BSr7EK++BMpAI7rDwO3fsBkF4WjjAdN6hjdauBvJ8BOv0txhmCCbJlLlG64vBt5r42uG Lmk/7rcUa/XRx1Tfs5WI4Us4LcZLxKdZb8JND0cFtwATOnHzlisxm/cB//LFEw== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 17 Feb 2024 17:13:34 -0300 Subject: [PATCH 12/12] net: hso: constify the struct device_type usage Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240217-device_cleanup-net-v1-12-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=848; i=ricardo@marliere.net; h=from:subject:message-id; bh=w71Wbcz7FmwZv+zc0blwnBWeOoYM4g6wH5JSNctbpo8=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBl0RNuu2dyMd0Dn82mZJ0uYEioT0ekZ6c+ZBXf0 tJ9Asq8mHeJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZdETbgAKCRDJC4p8Y4ZY pkD4D/41UqCiVB/yP7feFrZ2WeO+O//tY1R6qezrJnX86aj43FGYbFyljHIpvyNHnnbMW2EX+wj dCy+bKz4luNffXMSQHX4ddVDqjpd6/VzlEC8O9/3PaijK5gbyjs6oM1bSSKD5TAA19f6k89+OA3 mSFgkjwJRGSAH5tbn+zBjX0xRF/gaJn/rZ7+0ZTnW59ELApDiCdDBWxN1yG1RF9TB5E5uBykiok YmMvVC04WSuxJspHCWaZt1PZ4U2jFjg+Nw9+00ZmrnzYppqu7BCtmzB7PFeBThDK7lImtGB/8AQ OVjGXzCJXO3J/XRODHoAiEU0rhpx6InOgEG2o+o5OSt3TNDySGshVGqzMd8Yn7D4HWn/2KIlhwB bX3TFOKsD77AR5aexms8wG/Fs4sNE8JkDPrkVwx91DHFlDTefZAdmL5ck3XSlRWQE5H/DcpHWZw IWlocKvOMvNX3o8EZ0A+0YR44Eak9DcCrRhtjsmNEciBvAQAYW/8iB6ZJ7Pa1Yg/YgfkZVvqKE6 +rPTvMSWmt4bZROlHkSWJdAH0xzHC4UBmz+8jSE0MxukTx8qXfEIaOInczSJ2+InLSYLNi5YfmN Yh4g4ZzIA4y7GI0LDHH948xVVCD2SI6se+4PCuTjPee2BCSR87K7JADdBMqmunFEnUCmZMfn+ZK BMODrTGSqLQ8R0A== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-Patchwork-Delegate: kuba@kernel.org Since commit aed65af1cc2f ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move the hso_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 --- drivers/net/usb/hso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index f088ea2ba6f3..1aeb36119d3f 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -2465,7 +2465,7 @@ static void hso_create_rfkill(struct hso_device *hso_dev, } } -static struct device_type hso_type = { +static const struct device_type hso_type = { .name = "wwan", };