Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp450232rdb; Thu, 15 Feb 2024 05:25:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWmzi5fn1II7pfaWOAp/FrPPR0+Dbr/1lPFmN3rt4ETPrx5hF04MVsuJW+F06ZgcCGwCIQrsb4u0e5kKgkBSzSqQqp3/MJhBErGT1kU2g== X-Google-Smtp-Source: AGHT+IEgp4bl5HX3DT/0JCh7utTki166IpaLz64YyzWb8tC5q8gqCm7yDGsDUhngDsGyUHD2Sxrx X-Received: by 2002:a05:6870:3e07:b0:21e:4605:962b with SMTP id lk7-20020a0568703e0700b0021e4605962bmr770812oab.22.1708003504387; Thu, 15 Feb 2024 05:25:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708003504; cv=pass; d=google.com; s=arc-20160816; b=H5V1S/Tf/bPgmXpC7DZEQ8tseXmOSJeKzzeqCMzm/HIEpoRirxFaDVCX2/BDYY5WLV zGw+LFGdB2NIZhigYGA8xBh/SCx5tFjliWPjYBYpYXj+1IKiXPIeMty7RML+lC+euozN /nIujxww7KHbf7wMPX6O2g2kMWbYQCRrqw57XV908PZXneRDmmpXMSU1C+rfE3N0L5/C ehbHEUpPzJ1FPYmUMP8JYedTNl0FHHErCX3wreskP1brHsKzJc0+M/4pZ87+vYOMlSmw GtqkXRKsqJ9fKdkZ8rcZYfvci9nmrH/WuqCbzux19cOOf82SDzaxhSGQvjlNvG4MpCi+ ba7A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kBFzk9n9e8hP3AO0PW5gELJtQWfG/R8SgLTxadaovn0=; fh=nIJTM4HrN5ghe48v3UoREh0oK7HWhZS3QNP6RM3vvOo=; b=LhuFKL6ICvSmQFPjUsK1hhBTRFe4km0sNDA6jCDd7ljAtud/Xi2b+RiCDorHcX5Xir jKe/ZdhTxpql7RI91eTpPar0wG08+OuKgl1Up7XQ4/KoRm4OTWFbZHbMBePFfYnA/oZy FKSA2k4CnA/kkQrUgLZU6mr6r8su/cxMnnrPPl80WI2BPITKoVnss65K6Rzs/qXYqW2j 8dJX0TI3fX2Nmi+6SI902eM1z1qXqm7nxwK9y3952ibtgfWjSVrrRrAVe12KaLSfH872 YQr4ySnvR02RCdEiSQmfmTnoeGtSCIRfwqc42EeO3ARBPs7TrEkLkRlslyXOGdDGB4iN UQeA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gSDhS1YO; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-66975-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66975-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id n14-20020a05620a222e00b007871fa654c3si1425947qkh.654.2024.02.15.05.25.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 05:25:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66975-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gSDhS1YO; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-66975-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66975-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 270CD1C21DE0 for ; Thu, 15 Feb 2024 13:25:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A26DF12FF9C; Thu, 15 Feb 2024 13:24:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gSDhS1YO" Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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 1CE2112BF06; Thu, 15 Feb 2024 13:24:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708003497; cv=none; b=uLpW4XhDjfV68xXMvVFpol8MkDGSCL/GIkvir3xDrFvEfQ8JDrYmhq4Ot+Yh4zBrGHAsE50HMNUtZWioYx4Kqa/0ikLuZ+GiXeczUy8i1qTwVBZxK+UAKZdnRXKCmLmMjhsxKA6lM2WvhoDgDgu2xfT7v2XZPLc/EUmSyafv/Ao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708003497; c=relaxed/simple; bh=dVWZ7XC8Bsa4pc+c3+j3S7F3I3R6y7tOlISgXML4etM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=p2wgaca03yT7FZYAt519fDCrCQfhTPiGsGWa3wCmMndoXrPzsRNq6B0Je+L6F/KTzIWkIu6g2gJQjWL6lZpWn7gImNNU3sxaEpunOc+WWrM1hMQ4tDlWxAY+KTKhmV9JGccQVJ+ClealpD1E/y7GQyAiQAcbMHInx7kApXJp6RY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gSDhS1YO; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2d109e82bd0so10162541fa.3; Thu, 15 Feb 2024 05:24:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708003494; x=1708608294; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=kBFzk9n9e8hP3AO0PW5gELJtQWfG/R8SgLTxadaovn0=; b=gSDhS1YOU67Yfk0E4Tj/dSj0goL/XfJdk8R0dDu2ggErxleFlhdJC5zOFfiJe9gPD5 7jiW/2BXcIH1cG4TFlPPYEHzLdM3oP/D6t26CC0frnxWmGltRLZf5RmyVECk44dGHuhc /nBdNMCG9V9NQ0gqCzpcqlzGiNB3mNKif+mpcl6zWkY4fOdga6D+HZzLJPuUiBWBl/8Y wjbW1P5/5lcd9934bZrqrG9weCeoJ/V+5t0SdewWV3pLmRA6IlmEUtrXljmuqq2T7PHp 8RzzNLDiNklrsx0SqiCm6iioyKmw3vD6l/i+4iWkGcq7RbveLcK6ZlOT+VlnAj2XoKWI /NAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708003494; x=1708608294; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kBFzk9n9e8hP3AO0PW5gELJtQWfG/R8SgLTxadaovn0=; b=AzUdItp1q47dyPu8oCqZOBhoBHLGdhjG8ummGkW/BGPgDvcTlqli90s6KQtW0z54Ge 4oVRMSBV9cHZaImFm992+KYAJpfldnHhJw6ciEaIxudNq1N9y4TXBTtLm57/T8cYsh/V clFlOxh9P6s+sEbysyAGzemSIjQyN293HRPpXeIaF48K4MjVdp4CwT04mnjJnfAVPDg9 R7R0rlwhwy7OjFeUilhZgkaVb6vjko0LHhPMoEvplczaZrvcxJXiURXbY/oQy8mjJryD Y+zi7aMsjXOrTc+8M4NQNxFV1xq35s/jUV1gmGEbxCU//9yP8lKU1uQutZGwdmCdMdcw wE1g== X-Forwarded-Encrypted: i=1; AJvYcCXGHP6NM7CGhQOPFLj8XGheY6TkgSIQFqGygsjRNPoiRwib6SkfkKgl+n4Wd6vz7mU+Dke6vJfPMez88KN9Bb2C26NBr6PJRRgMFeXdP8eyiOnesWKoW4tZPBzf4tTxu02DFC78dhzc5A== X-Gm-Message-State: AOJu0YycR8jxUcdEhBhXgZLXNeeVAnS9yROh3ZDrN9NaRtCbe9vgiU6A VOBBvIxkHCSvwjjjWY4clpvhahthukE7f9HOGCF2YI8ndg1mwYZg X-Received: by 2002:a05:6512:3e16:b0:511:79ac:2d78 with SMTP id i22-20020a0565123e1600b0051179ac2d78mr1711649lfv.39.1708003493896; Thu, 15 Feb 2024 05:24:53 -0800 (PST) Received: from mobilestation ([178.176.56.174]) by smtp.gmail.com with ESMTPSA id t20-20020ac243b4000000b0051197ffb6easm236919lfl.122.2024.02.15.05.24.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 05:24:53 -0800 (PST) Date: Thu, 15 Feb 2024 16:24:50 +0300 From: Serge Semin To: "Ricardo B. Marliere" Cc: Thomas Bogendoerfer , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: Re: [PATCH] mips: bus: make mips_cdmm_bustype const Message-ID: References: <20240213-bus_cleanup-mips2-v1-1-9c0e3d4a1852@marliere.net> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240213-bus_cleanup-mips2-v1-1-9c0e3d4a1852@marliere.net> Hi Ricardo On Tue, Feb 13, 2024 at 11:49:24AM -0300, Ricardo B. Marliere wrote: > Now that the driver core can properly handle constant struct bus_type, > move the mips_cdmm_bustype variable to be a constant structure as well, > placing it into read-only memory which can not be modified at runtime. Thanks for the patch. Tested-by: Serge Semin Acked-by: Serge Semin -Serge(y) > > Cc: Greg Kroah-Hartman > Suggested-by: Greg Kroah-Hartman > Signed-off-by: Ricardo B. Marliere > --- > arch/mips/include/asm/cdmm.h | 2 +- > drivers/bus/mips_cdmm.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/mips/include/asm/cdmm.h b/arch/mips/include/asm/cdmm.h > index c06dbf8ba937..81fa99084178 100644 > --- a/arch/mips/include/asm/cdmm.h > +++ b/arch/mips/include/asm/cdmm.h > @@ -63,7 +63,7 @@ struct mips_cdmm_driver { > */ > phys_addr_t mips_cdmm_phys_base(void); > > -extern struct bus_type mips_cdmm_bustype; > +extern const struct bus_type mips_cdmm_bustype; > void __iomem *mips_cdmm_early_probe(unsigned int dev_type); > > #define to_mips_cdmm_device(d) container_of(d, struct mips_cdmm_device, dev) > diff --git a/drivers/bus/mips_cdmm.c b/drivers/bus/mips_cdmm.c > index 554e1992edd4..8baf14bd5eff 100644 > --- a/drivers/bus/mips_cdmm.c > +++ b/drivers/bus/mips_cdmm.c > @@ -118,7 +118,7 @@ static struct attribute *mips_cdmm_dev_attrs[] = { > }; > ATTRIBUTE_GROUPS(mips_cdmm_dev); > > -struct bus_type mips_cdmm_bustype = { > +const struct bus_type mips_cdmm_bustype = { > .name = "cdmm", > .dev_groups = mips_cdmm_dev_groups, > .match = mips_cdmm_match, > > --- > base-commit: 841c35169323cd833294798e58b9bf63fa4fa1de > change-id: 20240213-bus_cleanup-mips2-434cc6d8f7bd > > Best regards, > -- > Ricardo B. Marliere >