linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ALSA: struct bus_type cleanup
@ 2024-02-14 19:28 Ricardo B. Marliere
  2024-02-14 19:28 ` [PATCH 1/2] ALSA: aoa: make soundbus_bus_type const Ricardo B. Marliere
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ricardo B. Marliere @ 2024-02-14 19:28 UTC (permalink / raw)
  To: Johannes Berg, Jaroslav Kysela, Takashi Iwai
  Cc: alsa-devel, Greg Kroah-Hartman, linux-kernel, linux-sound,
	Ricardo B. Marliere, linuxppc-dev

This series is part of an effort to cleanup the users of the driver
core, as can be seen in many recent patches authored by Greg across the
tree (e.g. [1]).

---
[1]: https://lore.kernel.org/lkml/?q=f%3Agregkh%40linuxfoundation.org+s%3A%22make%22+and+s%3A%22const%22

To: Johannes Berg <johannes@sipsolutions.net>
To: Jaroslav Kysela <perex@perex.cz>
To: Takashi Iwai <tiwai@suse.com>
Cc:  <linuxppc-dev@lists.ozlabs.org>
Cc:  <alsa-devel@alsa-project.org>
Cc:  <linux-sound@vger.kernel.org>
Cc:  <linux-kernel@vger.kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>

---
Ricardo B. Marliere (2):
      ALSA: aoa: make soundbus_bus_type const
      ALSA: seq: make snd_seq_bus_type const

 sound/aoa/soundbus/core.c | 2 +-
 sound/core/seq_device.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
base-commit: d7bf73809849463f76de42aad62c850305dd6c5d
change-id: 20240214-bus_cleanup-alsa-1d05ffc6507b

Best regards,
-- 
Ricardo B. Marliere <ricardo@marliere.net>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] ALSA: aoa: make soundbus_bus_type const
  2024-02-14 19:28 [PATCH 0/2] ALSA: struct bus_type cleanup Ricardo B. Marliere
@ 2024-02-14 19:28 ` Ricardo B. Marliere
  2024-02-14 19:28 ` [PATCH 2/2] ALSA: seq: make snd_seq_bus_type const Ricardo B. Marliere
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ricardo B. Marliere @ 2024-02-14 19:28 UTC (permalink / raw)
  To: Johannes Berg, Jaroslav Kysela, Takashi Iwai
  Cc: alsa-devel, Greg Kroah-Hartman, linux-kernel, linux-sound,
	Ricardo B. Marliere, linuxppc-dev

Since commit d492cc2573a0 ("driver core: device.h: make struct
bus_type a const *"), the driver core can properly handle constant
struct bus_type, move the soundbus_bus_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 <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
 sound/aoa/soundbus/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/aoa/soundbus/core.c b/sound/aoa/soundbus/core.c
index 8f24a3eea16b..2a295f610594 100644
--- a/sound/aoa/soundbus/core.c
+++ b/sound/aoa/soundbus/core.c
@@ -127,7 +127,7 @@ static void soundbus_device_shutdown(struct device *dev)
 
 /* soundbus_dev_attrs is declared in sysfs.c */
 ATTRIBUTE_GROUPS(soundbus_dev);
-static struct bus_type soundbus_bus_type = {
+static const struct bus_type soundbus_bus_type = {
 	.name		= "aoa-soundbus",
 	.probe		= soundbus_probe,
 	.uevent		= soundbus_uevent,

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] ALSA: seq: make snd_seq_bus_type const
  2024-02-14 19:28 [PATCH 0/2] ALSA: struct bus_type cleanup Ricardo B. Marliere
  2024-02-14 19:28 ` [PATCH 1/2] ALSA: aoa: make soundbus_bus_type const Ricardo B. Marliere
@ 2024-02-14 19:28 ` Ricardo B. Marliere
  2024-02-15  7:48 ` [PATCH 0/2] ALSA: struct bus_type cleanup Greg Kroah-Hartman
  2024-02-15 12:48 ` Takashi Iwai
  3 siblings, 0 replies; 5+ messages in thread
From: Ricardo B. Marliere @ 2024-02-14 19:28 UTC (permalink / raw)
  To: Johannes Berg, Jaroslav Kysela, Takashi Iwai
  Cc: alsa-devel, Greg Kroah-Hartman, linux-kernel, linux-sound,
	Ricardo B. Marliere, linuxppc-dev

Since commit d492cc2573a0 ("driver core: device.h: make struct
bus_type a const *"), the driver core can properly handle constant
struct bus_type, move the snd_seq_bus_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 <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
 sound/core/seq_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/core/seq_device.c b/sound/core/seq_device.c
index 7f3fd8eb016f..654d620d0199 100644
--- a/sound/core/seq_device.c
+++ b/sound/core/seq_device.c
@@ -49,7 +49,7 @@ static int snd_seq_bus_match(struct device *dev, struct device_driver *drv)
 		sdrv->argsize == sdev->argsize;
 }
 
-static struct bus_type snd_seq_bus_type = {
+static const struct bus_type snd_seq_bus_type = {
 	.name = "snd_seq",
 	.match = snd_seq_bus_match,
 };

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] ALSA: struct bus_type cleanup
  2024-02-14 19:28 [PATCH 0/2] ALSA: struct bus_type cleanup Ricardo B. Marliere
  2024-02-14 19:28 ` [PATCH 1/2] ALSA: aoa: make soundbus_bus_type const Ricardo B. Marliere
  2024-02-14 19:28 ` [PATCH 2/2] ALSA: seq: make snd_seq_bus_type const Ricardo B. Marliere
@ 2024-02-15  7:48 ` Greg Kroah-Hartman
  2024-02-15 12:48 ` Takashi Iwai
  3 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2024-02-15  7:48 UTC (permalink / raw)
  To: Ricardo B. Marliere
  Cc: alsa-devel, linux-kernel, Takashi Iwai, linux-sound,
	Jaroslav Kysela, Johannes Berg, linuxppc-dev

On Wed, Feb 14, 2024 at 04:28:27PM -0300, Ricardo B. Marliere wrote:
> This series is part of an effort to cleanup the users of the driver
> core, as can be seen in many recent patches authored by Greg across the
> tree (e.g. [1]).
> 
> ---
> [1]: https://lore.kernel.org/lkml/?q=f%3Agregkh%40linuxfoundation.org+s%3A%22make%22+and+s%3A%22const%22
> 
> To: Johannes Berg <johannes@sipsolutions.net>
> To: Jaroslav Kysela <perex@perex.cz>
> To: Takashi Iwai <tiwai@suse.com>
> Cc:  <linuxppc-dev@lists.ozlabs.org>
> Cc:  <alsa-devel@alsa-project.org>
> Cc:  <linux-sound@vger.kernel.org>
> Cc:  <linux-kernel@vger.kernel.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] ALSA: struct bus_type cleanup
  2024-02-14 19:28 [PATCH 0/2] ALSA: struct bus_type cleanup Ricardo B. Marliere
                   ` (2 preceding siblings ...)
  2024-02-15  7:48 ` [PATCH 0/2] ALSA: struct bus_type cleanup Greg Kroah-Hartman
@ 2024-02-15 12:48 ` Takashi Iwai
  3 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2024-02-15 12:48 UTC (permalink / raw)
  To: Ricardo B. Marliere
  Cc: alsa-devel, linux-kernel, Takashi Iwai, linux-sound,
	Jaroslav Kysela, Greg Kroah-Hartman, Johannes Berg, linuxppc-dev

On Wed, 14 Feb 2024 20:28:27 +0100,
Ricardo B. Marliere wrote:
> 
> This series is part of an effort to cleanup the users of the driver
> core, as can be seen in many recent patches authored by Greg across the
> tree (e.g. [1]).
> 
> ---
> [1]: https://lore.kernel.org/lkml/?q=f%3Agregkh%40linuxfoundation.org+s%3A%22make%22+and+s%3A%22const%22
> 
> To: Johannes Berg <johannes@sipsolutions.net>
> To: Jaroslav Kysela <perex@perex.cz>
> To: Takashi Iwai <tiwai@suse.com>
> Cc:  <linuxppc-dev@lists.ozlabs.org>
> Cc:  <alsa-devel@alsa-project.org>
> Cc:  <linux-sound@vger.kernel.org>
> Cc:  <linux-kernel@vger.kernel.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
> 
> ---
> Ricardo B. Marliere (2):
>       ALSA: aoa: make soundbus_bus_type const
>       ALSA: seq: make snd_seq_bus_type const

Applied both patches now.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-15 12:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-14 19:28 [PATCH 0/2] ALSA: struct bus_type cleanup Ricardo B. Marliere
2024-02-14 19:28 ` [PATCH 1/2] ALSA: aoa: make soundbus_bus_type const Ricardo B. Marliere
2024-02-14 19:28 ` [PATCH 2/2] ALSA: seq: make snd_seq_bus_type const Ricardo B. Marliere
2024-02-15  7:48 ` [PATCH 0/2] ALSA: struct bus_type cleanup Greg Kroah-Hartman
2024-02-15 12:48 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).