Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp373211rdb; Sat, 17 Feb 2024 12:17:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX/8JN2qbg5NoVyxUjPYrCt0TicX0YVNtCze0tZu/uHm4IGcm31IHtvU4CAVRaulhk/N6iPQ8GZ1ZWbjzQEd9rZywDWp28HTWdfMxsqrA== X-Google-Smtp-Source: AGHT+IEsbbyI9jQq/oCFc5Msf5knmMdd0aCJcZHD8WAImoQHdrjH6aELQ088DJldgz2UUAC5+SNs X-Received: by 2002:a17:903:98c:b0:1db:c1a1:9bc8 with SMTP id mb12-20020a170903098c00b001dbc1a19bc8mr3891998plb.64.1708201030509; Sat, 17 Feb 2024 12:17:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708201030; cv=pass; d=google.com; s=arc-20160816; b=shEvxC/He1zo9z9/ZIyjuY5RhsG8HYFv1K2ThFe45i0RVX9Tyk7ylkLV6zJnhfqAwr 1r33seQ2hIt5BmHc0LPHlpvxjs21A9uXR1MGbX0pS6wPNLN3bbTOHAxg6zg7LqzCapaQ o3mvK5jeTf6riUl2sCL46PVKI7Tes7Bv0rKMi/O8WH0GdOSjw34qAfSPqy3rNd9bJo2I WlGh//ex2KOciciSae12Jr2aPQUTEBSLBCanInBYENS8jJMJRV5J75KX/mDJ1UpfWWHp IYCNFKsNgS7ghRG3e1UXqgHlz3mA9WEUvtwCboUSjy3INEllMyxsge92jwG32HsJ8YSe TRDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:dkim-signature:from; bh=FEuXntwtolyrlm3wbVMT08ww/bg3HU5xRFFUlrOyRbQ=; fh=4JBsGZRZELIWZtnvO0r4XirHT2v3qkFIKvVL0R+0k98=; b=KtN/a8rD/rsMu4UeQppSl4LYWoY3G6ELvwPZ1dw77jhjunHzsg3Xg5lFkj3LHZELlP v9VPbJj1uakQc3qZt7HrW6fntSdrfl0LqcPmDcZo+biB02KF2ECXM7q+PXlrt5lBrAdI Aeq7fWgqmEU3onFfS4cjyyAIKgPKVBqBDs05gxNqe7mB5loFVsU8EOy6Runbb+T50URU KcMEkIlSU1djiQJsmhsTQnIdfaMUNRkG5BDN85VisM+Z+f+R66s9S2fP/UIT/pJNb78U +TctwlE2Y/IvfUksnyiEmILMuIPw76qpKYxbZGaOwe5xGahxc/cyrnBynq08x97u3ObI /1cg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=UmxpvfAq; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-70056-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70056-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id w15-20020a1709026f0f00b001d9ece29addsi1901244plk.178.2024.02.17.12.17.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:17:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70056-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=UmxpvfAq; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-70056-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70056-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 1FBFEB22D50 for ; Sat, 17 Feb 2024 20:15:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 362B28003B; Sat, 17 Feb 2024 20:13:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="UmxpvfAq" 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 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-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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240217-device_cleanup-net-v1-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", }; -- 2.43.0