From patchwork Sat Feb 3 19:14:50 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: 196364 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp47015dyb; Sat, 3 Feb 2024 11:15:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+qsg6n/iVcOcnPruL438HOJ6wr4ucIUrvwOTtUW5O6Yv8Tym2SrUhP61wS4UYNwMsp2+A X-Received: by 2002:a17:902:dac4:b0:1d9:4297:5257 with SMTP id q4-20020a170902dac400b001d942975257mr7268224plx.10.1706987707425; Sat, 03 Feb 2024 11:15:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706987707; cv=pass; d=google.com; s=arc-20160816; b=CB33L6XrYwNI+pP4zeAq2pyVFQZKBxyY7ZuE6/BuxMw24GmkJytqUwRDLB6WHO6gyQ w6XbA8yIn+8Tl6W2KbbU/rTJFQeMWEQdNPJ+3vhGaguKvtUyxDGzB1ZU5fS95BjYIRbR GdOBY9CdpeqvP59iNCJVss2l56ZZynFoxQ/m7KSWKDpozIyeqwxbtjbcPb617Qk+tiZX fqotfYnKCO9A2jprCyUGvk1MMjW/z6GDVMJUhcBrvT+IdrQFeTaO/Vf8ICJZMPuPTUoL ZgU3nkBVLVM07Eus4Zwlcqt71rqsq8YSEd8Czx/uMf02kwOn6YOyvEUWgymjJndyGJfR pTlg== 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=oJET0TJH1U65NigEFEtlflIn1ibg/vn9cYHzNhQWszQ=; fh=WwIgdQ2ZuCraASaE0XVC1mG5YRHvbv9ZVdQDeEnKjcE=; b=GcQCu26V63WymPviqW9B9OfGjlK2r5AwTAnGN9dmFIQRvc+/efHGnBI1Ooars7zK+J ECXRnPzAsFX/euOwDgwOdz9ANoC4ssBZ/bORhykQyNJ3GRBFXYek7HolTahR2IkpH7E9 nq/L8MdtXWRWO5DbXuDkxyMzhJIX1AY/n9w8ag/u6DyPZJdIesq3sHBPYUG4/oPzZ7jk SbveSupbGDohDwPcJfp19y1xwMoJ7QqLy/bFTUpoJ70/DfdCSAc0SSmzDLwqv3tPwUJK n61P6eqMeynxq8NKWXRRcLCRV6XBwITRCoGKoDW4e1n9Mq+Ns8HUmt5pRV9oSVk6Dixq bdNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=WpUvm5OD; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51264-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51264-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCUR9N8ZureDQ13ERCej6qa4JLjJmjYpmAuQiXQr3E1c89VxBZIJxSf7ZFZI8x39EE/9nSlVFRFn/fdq1s01QN1/5kS3/w== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id a19-20020a170902b59300b001d950cac4e0si3481665pls.557.2024.02.03.11.15.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 11:15:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51264-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=WpUvm5OD; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51264-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51264-ouuuleilei=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 376062826B9 for ; Sat, 3 Feb 2024 19:15:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F1B376024E; Sat, 3 Feb 2024 19:14:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marliere.net header.i=@marliere.net header.b="WpUvm5OD" 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 9C9905FBB0; Sat, 3 Feb 2024 19:14:36 +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=1706987678; cv=none; b=P9ODdhE9CRFiTSTZb/BgGU1Z+GYN763WlkWXObD4iVGPanNPaUuIkO0eSjRgxHkO12VZD/hhq5QYhHbX2v2a99w/9mNmYoTbak/KVAGP0e9ATky0/sRI7IFE+HbeXmqw1yrz636DL8NNLnwVYbtcWJIK8qsFK1JZ3facIaRYYOE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706987678; c=relaxed/simple; bh=YJgAF4TThke/vMQrMJy8V92C3oDBIvbtDIV3XI4K9Fw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IoknppJOw8RTZ4Y9kdDpX0EGGgOMDHp5agUOoMc4WijKd1Je7pS4DgjDh5/XnWlQqDGCM0wyc7mreDX7desnn6TSZvPPgIXu/FGYbWoAZVz+36Wo+pc3c69EiIzyX0rMSbZaW4Jkv0cbP099QVnI+2LWUsydpg0PeQh4bpByZyE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marliere.net; spf=pass smtp.mailfrom=gmail.com; dkim=fail (0-bit key) header.d=marliere.net header.i=@marliere.net header.b=WpUvm5OD reason="key not found in DNS"; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marliere.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1d95d67ff45so19917415ad.2; Sat, 03 Feb 2024 11:14:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706987676; x=1707592476; 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=oJET0TJH1U65NigEFEtlflIn1ibg/vn9cYHzNhQWszQ=; b=IykI8DhhXA3+grI8vBgxVU/+xk6uO7ihonwjUE9P4iQNZMlycLjEbCqNzPqmhYrEtW 2BkskKkpipw2eimxHbHM8KNDh7RaU9q4z5GzDO4pn8Pcep7o+L//l14v5fYA0yBsH9g5 vQN7eje/C99wiyIZBLC00WFiiCoW7pULLD90FV/Rasuud4Zx6/Hpw4IV8QCofYwM2OpK Vtsm8lQFO/nbVxZAC5nCMFRvoXAs+rEbxynddYBrBmJPr9IHKKyGTaklwc/80GhnubN7 Phohm+KMeF/dYUR1Z8jD6W11325/Y4qco5Qz4WBlx3JivDYMH60c2qDctcKbjdBOME6n DGwQ== X-Gm-Message-State: AOJu0YyFpanqJVI/4tV2pvMSkwL/Cmxg3m17KFKYfXQh3XFFaoS4jlZo gk0MFRkf+JfFvgxAkaNFVFPAr0VleFkh6magJQSaUxX8fnwNm6pcNhqzNUHHmL9IiQ== X-Received: by 2002:a17:903:94d:b0:1d8:b6c8:d9e0 with SMTP id ma13-20020a170903094d00b001d8b6c8d9e0mr6296162plb.68.1706987675889; Sat, 03 Feb 2024 11:14:35 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVe5Riw6nr/e/D4wQcwZT+XkvPffOZQR5FrR9jAUcXg2HBHjniBzX73skIE0njlRrJ4iwU601xHl6DQ48DyH56lIGQpdDxayCB/INvxlBgyXPjgsW7LHQ+/+StbJvf9aXIQGT7iUqr9sNSNOU7LcMIVF62q9XQGEAAsH6P8x6g= Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id jg3-20020a17090326c300b001d94871ba92sm3547187plb.239.2024.02.03.11.14.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 11:14:35 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1706987674; 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=oJET0TJH1U65NigEFEtlflIn1ibg/vn9cYHzNhQWszQ=; b=WpUvm5ODeKQ184FHczRUdAoK5W4vWELK+4J/2DKWO9zIwcu3f1wGYXsVq+6XKQec8rPulU YO7OKrSVRLnn/W3ykO01XUHhFQlOUR37eI55n0zch9Y8+qWkHhwVlT13aZSSliMTRoQsbc 5/2BrzM64x01MrbEkAsyx73zpoeSKQ4OkzoKuCuEaZhfJYsoFxiIrEoCGA26ZjHParzDBV 26MdH1GhBejDVNEUSJHTf25azF3fN69QBnm1cV3Bo/E7dNJa2U9FmMVTkf+9BUeO7JgM+j X4Dwwy2d5Nq/DbKXgfJ9FKuwxRLre55BWMya0+Hl1N/CRY94KqIFtgNTARfo8w== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 03 Feb 2024 16:14:50 -0300 Subject: [PATCH 1/2] serdev: make serdev_bus_type const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240203-bus_cleanup-tty-v1-1-86b698c82efe@marliere.net> References: <20240203-bus_cleanup-tty-v1-0-86b698c82efe@marliere.net> In-Reply-To: <20240203-bus_cleanup-tty-v1-0-86b698c82efe@marliere.net> To: Rob Herring , Greg Kroah-Hartman , Jiri Slaby Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=916; i=ricardo@marliere.net; h=from:subject:message-id; bh=YJgAF4TThke/vMQrMJy8V92C3oDBIvbtDIV3XI4K9Fw=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlvpCzAPRaxZq1wR9wnA9A7wR1tx4JGhSOm1ThK W1p/hqZIOCJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb6QswAKCRDJC4p8Y4ZY piGhEACsCq/odfPalxovqRLgpSHql9eQe9yrxXoUeuZ+7hpUU0kDjLWhF+Ig0gknh5YdAbXZR8M 0soGGusjWuR1QnJ1gMN3N4dOOhmewcaa/WHuFJtz+wkrTUzrRn/G9JRuZg/FdgL/TO7pu21PU0w OTDgsAHH5b4cynQeuIUhK0gf8LCucwjQkYsrvsEn53rh+qjb47WG3erA0N1upYLjyyKI7asm2Ah YKcfdp76x6hDy36RT8nNpdmkhigg1pqVk2XIlOhAV0aSTGwhXDLNo0+2ixobpnnc9K8Sn9eszaV 4TQ7DqyRDkQOX8bHDh6imbhOH/d+TYQK4x+s0IgIQ1R65i3mcHaxHvTCoRoupVsYPJDHRNNUwVy 7+HV6D59xa/m3jnvchVBJYD+GasD0AQ2ZCPzyW8A4j1AI3q/6xCM4UDlcZcq6RJWP8zeLA7vDne CseH+hAFU1+IHwQrrdWmaJVXPylTXfjLX97oZjIK3ho6/ae2aUlcQ7sqCPm9afNL/i9n5A07fw5 0q+dWqlqiTqjEjHQImMJpmUGnkG/HzbnO+SQfKsujtOCejI2KxJ6sVueEz8n7o1CiIxFaTwQrAc Sm+Yp3pCa367fwUU88WLqg7XABJ5OGf8t9uFS+Z8Q7z3tqREHkqCANfuT0APTO/HVu+9s1rAbFp E6ceLWIFSSscuTw== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789906342631321174 X-GMAIL-MSGID: 1789906342631321174 Now that the driver core can properly handle constant struct bus_type, move the serdev_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere --- drivers/tty/serdev/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c index 822a5cd05566..613cb356b918 100644 --- a/drivers/tty/serdev/core.c +++ b/drivers/tty/serdev/core.c @@ -431,7 +431,7 @@ static void serdev_drv_remove(struct device *dev) dev_pm_domain_detach(dev, true); } -static struct bus_type serdev_bus_type = { +static const struct bus_type serdev_bus_type = { .name = "serial", .match = serdev_device_match, .probe = serdev_drv_probe, From patchwork Sat Feb 3 19:14:51 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: 196365 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp47162dyb; Sat, 3 Feb 2024 11:15:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQmJ7BE400B6kXaTjSIWgy042T5p9SxFngOdpuEkalNuLOpm2v21Psp83IRWoXghGjEXsr X-Received: by 2002:a67:e256:0:b0:46d:1b2b:abc2 with SMTP id w22-20020a67e256000000b0046d1b2babc2mr1193076vse.11.1706987731849; Sat, 03 Feb 2024 11:15:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706987731; cv=pass; d=google.com; s=arc-20160816; b=B8+6Rzf/M8QV5wvcAfj8sAGZ08oJ4Px2lL+hkFr64V+CIiP4Py5oNDKneAdaLjdt67 p4t4ZTNhNYSpe8WzsJVTowbQc3gNmXkg5A+/lMWbrfD/AZZ78DYdaveiZUG6LBahJsL9 s529R37cRZYswK921ip0HnNFvyObYwRvFKxzI3ZrR0Me7gUJEhXlJdvdhaq31pLoFD+v 2qw1it9Q71RktOpnGMPYpSDksbk1GyqMzn5LR6qHwl2KkxnX1N88tLYLTU14bIubJfxi I9cwh+JaWJgF7M0nxQ4R9n2pheJuLFa7v8ijfvFdGKUSFdT2rTxc2eRBw40veqec57+q UnpA== 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=L0me723O1wv9PKFRXBwhR3oYK5VM7+JumecBNWaeJjo=; fh=24HvVPOl3IYobdLMKVx+clj9h2e7d9xJUOPtsJKCC0U=; b=BpNgv78OCPaKqcKhtVlGMjNE9O2EKwwOONArxwNcM+xTCSssze9bJFpNiqIhZ9PZKW JEMTvvKIsG1RxWZ59IIu6XNmvMA5PoHlXjBBJ/7iASc5Fk27MZko++34IvzOH6X0FELm 4hHbGL8Q1MNCnw0CRoWgKOS8S4p6nPFIv9TLLILLqnUGUS0h1u8ZL/OCpUxgJKeI2wKc c5giSuB1z4Pe2wpkOua15ObfFkcDQCXDmucmaujMS3esQt0lp3JC43E23cU/JiWbAEW4 r47DQew0S1LmUvXvjQ+ls3bpWV+75DhBwpI+A4fStuHrLkJ0cZhg8ql5iv1wFG6eJxuS AguA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=KRbdvwMG; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51265-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51265-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWa9zgjqppc8qkKdkAb117xQMGP0jVYyEOTGJLS8HAVsDaXtvJ0rnXcfrNYsfTc2UJP7sdSR7yHKPMIYXhWsB/W4GRGTQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ep8-20020a05621418e800b0068c80ffd356si4841399qvb.294.2024.02.03.11.15.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 11:15:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51265-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=KRbdvwMG; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51265-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51265-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8D0A51C233F8 for ; Sat, 3 Feb 2024 19:15:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C2EE604AB; Sat, 3 Feb 2024 19:14:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marliere.net header.i=@marliere.net header.b="KRbdvwMG" Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.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 4231A5FF1C; Sat, 3 Feb 2024 19:14:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706987681; cv=none; b=kLJFGGD1ZSrMeIGDrC+iCEou+D4ufPS/3wL41+ntcntRw5ZE+j3smxiyjQm6Xo3y47v/wMWxnGjj9TD3lW2yfuYNlwZ7Axrk1a1vO+1hVohD2mGfD2gELs4GH3tH0fNQKdqozKc+SUq0yCHR5oYZyvRw9zGTkXpL7Xx5L0HcWgo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706987681; c=relaxed/simple; bh=M2yMvEd7apf6euaEi/MHIC/Ic/qD4VKhS5jPAVrikwA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=k2ZL6njkAA6NDScvZZzLiXNvaFrtYv56UzphJcxuyg+TvVG3ySdsbgVxXNDN2iPpiwg7wleN7gAaVbes30lHWMA5thh6q7fg7liGd+v493aPfv9beSrnE6CvqRyop6oF8ruNf77nkuNqIaESGZ3Buv0k924zvjq2eOXymCjfldA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marliere.net; spf=pass smtp.mailfrom=gmail.com; dkim=fail (0-bit key) header.d=marliere.net header.i=@marliere.net header.b=KRbdvwMG reason="key not found in DNS"; arc=none smtp.client-ip=209.85.167.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marliere.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f181.google.com with SMTP id 5614622812f47-3bd72353d9fso2374901b6e.3; Sat, 03 Feb 2024 11:14:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706987679; x=1707592479; 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=L0me723O1wv9PKFRXBwhR3oYK5VM7+JumecBNWaeJjo=; b=KsBD71UJ0gbuMCJruuVoadzDiRmFt/onGRiwMGYd1/4Va/d+Etvrqd7HYZHuyqdXZ7 NSX8i2ta46yOO2K7eqQwwBAGRX3RxzTvuaAKgauNHiFXVWB7AKiElWnAADdJzVu0nUBA 8PcVW+wOE558zyBUOHFtPR4Ufp8hQGStrUY0i8twUtBhSHQ8EU6LF3ihDXbBa4xROaqI B5MWmMKNT7h56NE+VVtCvFkiOq00UWL6r693z5+6M5+I3ygxkZgLQfFpFugvCCTtKigh QaGlN9rEuaFiBMRQpNhuaaYWuZV2x+df03Er4PJ61xC3eNR3mOB2nYac33hVcA0tzEj6 QZ6g== X-Gm-Message-State: AOJu0YxgJ+vi6sOWaV8pmuLg0LMU5Zr+ixFpK+ronSh8AwClEqMW1VMW 1axBahVnHs+dobkcH34Q2u7sxfaIFb5Xp4ZMNRC6b16Fk+uKIPqR X-Received: by 2002:a05:6358:d389:b0:176:b16a:f392 with SMTP id mp9-20020a056358d38900b00176b16af392mr13876718rwb.10.1706987679138; Sat, 03 Feb 2024 11:14:39 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXGfKh5KmVF2ecxFgkGgZOOqDmQ0Xb8eDXW61jQi6uCGlMTi+IGgM0e8nXjeigDrGIx1pET62pvg02rmm3KAQR1s6RqdFsroLgwN6eNmB96OXAox9LnLBzBBcp28DAFKR1AkMyALZ4eSgpEhxUnCU87r5ubrz5vJ5CSw0JiDS8= Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id h26-20020aa79f5a000000b006e0350189f0sm481692pfr.91.2024.02.03.11.14.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 11:14:38 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1706987677; 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=L0me723O1wv9PKFRXBwhR3oYK5VM7+JumecBNWaeJjo=; b=KRbdvwMGjFmLzkKWvOBSiZx4/a5iSc8qLp7e4xzLuiy/ltEaPZMi6TPWRREL4O1nBQSlWP 8RX5J0hZt9s3ieEeoluGQZ2FjEsg3kqQIp5LP7JGzrTDSYqKjnT447jJIEPrbR06WMwzvx DmDwbAgAL8PRHOl6KiO7nciQ0ZkACt/V/sqz6xJbFStuiLWUbL6XVBKe9jmV+4G2VlN2kl 9gEtJ4iUk9qq7weLyqqRvA4B3QxgAGu3KtezI733s67jrRZVZD2OoQuyAmOr9Hb5F4EDKA BCtvwrcsNpOachD9g+u9bb9Y2kLTI26BsfqPUnUQk5qmwjdaFUxQx/8/MNXXDQ== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 03 Feb 2024 16:14:51 -0300 Subject: [PATCH 2/2] serial: core: make serial_base_bus_type const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240203-bus_cleanup-tty-v1-2-86b698c82efe@marliere.net> References: <20240203-bus_cleanup-tty-v1-0-86b698c82efe@marliere.net> In-Reply-To: <20240203-bus_cleanup-tty-v1-0-86b698c82efe@marliere.net> To: Rob Herring , Greg Kroah-Hartman , Jiri Slaby Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=962; i=ricardo@marliere.net; h=from:subject:message-id; bh=M2yMvEd7apf6euaEi/MHIC/Ic/qD4VKhS5jPAVrikwA=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlvpCztwVltvFpD3TUgSJStNwrCcetxPEJ5vyt+ ad3PmhHO0WJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb6QswAKCRDJC4p8Y4ZY pknYEACESQ6oYokCzwH0ujTwvXPm5TBYLTI0n0aFskJmL4ZV261rrh9o9E/9k6fW/oeCmi9kevW /VHTFX44Qq9xKmOGI7DXxm5cOhZ/DVt/ZosJH697v81rZZXrr+ii7kBrs5jxL3NlOD7vtfvP+OG /5qndp1NqOmqf5WdRxHAy/libJfez95bXoCaCGSkRG+xZH7xuGaFuUFbO/bEKz9kB0Msdwg8lCG cgcjFLIc2MQnADTDBWgMDyU0T7nZtkCFb6JhKYnrKVqpZnHkJgh/8k6lgwMKV63WSjnQsLuW4Wl VI5CiIGt5Me2rtjOrByQ/r5cP4Sqno12EV6gAJkbYs3LDg/uIZHoXKc4xWaVhBLjsy1EYtchday a371/fjan8CSuD8gMGBew7X+zPI/JXQy4mYTKuNa8tG0StTXRSUgQ17d/WBfkKCQN+qeRHWDv67 Wz31uXFe7LU/QoMeBV9GKheOqlRUpwzflbElWQ8FrOQm6FG5A0/yvuaUVkq2V4KyOdhadUx3nYs l6TWf32+tJ4y54GpN4iH522Q+Z5sMFp7jDdl/yb5woBldnbp3cZNUcxFekb0nOnu+bCEoX26IPf 7uXzoa7Gh0F/OhLxTyXFJ1c/NLlRc4gvdXi1s/+cdjXhZSVZGSxToXbGkW6TyhmQE0+Hd9Xsp6l HUqmrFTr9XYn4MQ== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789906367616545764 X-GMAIL-MSGID: 1789906367616545764 Now that the driver core can properly handle constant struct bus_type, move the serial_base_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere --- drivers/tty/serial/serial_base_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c index 3dfcf20c4eb6..4df2a4b10445 100644 --- a/drivers/tty/serial/serial_base_bus.c +++ b/drivers/tty/serial/serial_base_bus.c @@ -41,7 +41,7 @@ static int serial_base_match(struct device *dev, struct device_driver *drv) return 0; } -static struct bus_type serial_base_bus_type = { +static const struct bus_type serial_base_bus_type = { .name = "serial-base", .match = serial_base_match, };