All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "Ulf Hansson" <ulf.hansson@linaro.org>,
	"Marcel Holtmann" <marcel@holtmann.org>,
	"Luiz Augusto von Dentz" <luiz.dentz@gmail.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Kalle Valo" <kvalo@kernel.org>,
	"Jeff Johnson" <jjohnson@kernel.org>,
	"Arend van Spriel" <arend.vanspriel@broadcom.com>,
	"Brian Norris" <briannorris@chromium.org>,
	"Francesco Dolcini" <francesco@dolcini.it>,
	"Jérôme Pouiller" <jerome.pouiller@silabs.com>
Cc: linux-mmc@vger.kernel.org, linux-bluetooth@vger.kernel.org,
	 linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-mediatek@lists.infradead.org,
	linux-wireless@vger.kernel.org,  ath10k@lists.infradead.org,
	brcm80211@lists.linux.dev,  brcm80211-dev-list.pdl@broadcom.com,
	 Jeff Johnson <quic_jjohnson@quicinc.com>,
	 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH v2 3/7] wifi: ath10k: sdio: simplify module initialization
Date: Wed, 03 Apr 2024 16:16:52 +0200	[thread overview]
Message-ID: <20240403-module-owner-sdio-v2-3-ae46d6b955eb@linaro.org> (raw)
In-Reply-To: <20240403-module-owner-sdio-v2-0-ae46d6b955eb@linaro.org>

This driver's initialization functions do not perform any custom code,
except printing messages.  Printing messages on modules
loading/unloading is discouraged because it pollutes the dmesg
regardless whether user actually has this device.  Core kernel code
already gives tools to investigate whether module was loaded or not.

Drop the printing messages which allows to replace open-coded
module_sdio_driver().

Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Acked-by: Kalle Valo <kvalo@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---

Changes in v2 moved from other patchset to avoid conflicts.
---
 drivers/net/wireless/ath/ath10k/sdio.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c
index 0ab5433f6cf6..1acb9fba9a8e 100644
--- a/drivers/net/wireless/ath/ath10k/sdio.c
+++ b/drivers/net/wireless/ath/ath10k/sdio.c
@@ -2671,25 +2671,7 @@ static struct sdio_driver ath10k_sdio_driver = {
 		.pm = ATH10K_SDIO_PM_OPS,
 	},
 };
-
-static int __init ath10k_sdio_init(void)
-{
-	int ret;
-
-	ret = sdio_register_driver(&ath10k_sdio_driver);
-	if (ret)
-		pr_err("sdio driver registration failed: %d\n", ret);
-
-	return ret;
-}
-
-static void __exit ath10k_sdio_exit(void)
-{
-	sdio_unregister_driver(&ath10k_sdio_driver);
-}
-
-module_init(ath10k_sdio_init);
-module_exit(ath10k_sdio_exit);
+module_sdio_driver(ath10k_sdio_driver);
 
 MODULE_AUTHOR("Qualcomm Atheros");
 MODULE_DESCRIPTION("Driver support for Qualcomm Atheros 802.11ac WLAN SDIO devices");

-- 
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "Ulf Hansson" <ulf.hansson@linaro.org>,
	"Marcel Holtmann" <marcel@holtmann.org>,
	"Luiz Augusto von Dentz" <luiz.dentz@gmail.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Kalle Valo" <kvalo@kernel.org>,
	"Jeff Johnson" <jjohnson@kernel.org>,
	"Arend van Spriel" <arend.vanspriel@broadcom.com>,
	"Brian Norris" <briannorris@chromium.org>,
	"Francesco Dolcini" <francesco@dolcini.it>,
	"Jérôme Pouiller" <jerome.pouiller@silabs.com>
Cc: linux-mmc@vger.kernel.org, linux-bluetooth@vger.kernel.org,
	 linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-mediatek@lists.infradead.org,
	linux-wireless@vger.kernel.org,  ath10k@lists.infradead.org,
	brcm80211@lists.linux.dev,  brcm80211-dev-list.pdl@broadcom.com,
	 Jeff Johnson <quic_jjohnson@quicinc.com>,
	 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH v2 3/7] wifi: ath10k: sdio: simplify module initialization
Date: Wed, 03 Apr 2024 16:16:52 +0200	[thread overview]
Message-ID: <20240403-module-owner-sdio-v2-3-ae46d6b955eb@linaro.org> (raw)
In-Reply-To: <20240403-module-owner-sdio-v2-0-ae46d6b955eb@linaro.org>

This driver's initialization functions do not perform any custom code,
except printing messages.  Printing messages on modules
loading/unloading is discouraged because it pollutes the dmesg
regardless whether user actually has this device.  Core kernel code
already gives tools to investigate whether module was loaded or not.

Drop the printing messages which allows to replace open-coded
module_sdio_driver().

Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Acked-by: Kalle Valo <kvalo@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---

Changes in v2 moved from other patchset to avoid conflicts.
---
 drivers/net/wireless/ath/ath10k/sdio.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c
index 0ab5433f6cf6..1acb9fba9a8e 100644
--- a/drivers/net/wireless/ath/ath10k/sdio.c
+++ b/drivers/net/wireless/ath/ath10k/sdio.c
@@ -2671,25 +2671,7 @@ static struct sdio_driver ath10k_sdio_driver = {
 		.pm = ATH10K_SDIO_PM_OPS,
 	},
 };
-
-static int __init ath10k_sdio_init(void)
-{
-	int ret;
-
-	ret = sdio_register_driver(&ath10k_sdio_driver);
-	if (ret)
-		pr_err("sdio driver registration failed: %d\n", ret);
-
-	return ret;
-}
-
-static void __exit ath10k_sdio_exit(void)
-{
-	sdio_unregister_driver(&ath10k_sdio_driver);
-}
-
-module_init(ath10k_sdio_init);
-module_exit(ath10k_sdio_exit);
+module_sdio_driver(ath10k_sdio_driver);
 
 MODULE_AUTHOR("Qualcomm Atheros");
 MODULE_DESCRIPTION("Driver support for Qualcomm Atheros 802.11ac WLAN SDIO devices");

-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2024-04-03 14:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 14:16 [PATCH v2 0/7] mmc/wifi/bluetooth: store owner from modules with sdio_register_driver() Krzysztof Kozlowski
2024-04-03 14:16 ` Krzysztof Kozlowski
2024-04-03 14:16 ` [PATCH v2 1/7] Bluetooth: btmrvl_sdio: drop driver owner initialization Krzysztof Kozlowski
2024-04-03 14:16   ` Krzysztof Kozlowski
2024-04-03 14:56   ` mmc/wifi/bluetooth: store owner from modules with sdio_register_driver() bluez.test.bot
2024-04-03 14:16 ` [PATCH v2 2/7] Bluetooth: btmtksdio: drop driver owner initialization Krzysztof Kozlowski
2024-04-03 14:16   ` Krzysztof Kozlowski
2024-04-03 14:16 ` Krzysztof Kozlowski [this message]
2024-04-03 14:16   ` [PATCH v2 3/7] wifi: ath10k: sdio: simplify module initialization Krzysztof Kozlowski
2024-04-03 14:16 ` [PATCH v2 4/7] wifi: ath10k: sdio: drop driver owner initialization Krzysztof Kozlowski
2024-04-03 14:16   ` Krzysztof Kozlowski
2024-04-03 14:16 ` [PATCH v2 5/7] wifi: brcm80211: " Krzysztof Kozlowski
2024-04-03 14:16   ` Krzysztof Kozlowski
2024-04-03 14:16 ` [PATCH v2 6/7] wifi: mwifiex: " Krzysztof Kozlowski
2024-04-03 14:16   ` Krzysztof Kozlowski
2024-04-03 14:16 ` [PATCH v2 7/7] wifi: wfx: " Krzysztof Kozlowski
2024-04-03 14:16   ` Krzysztof Kozlowski
2024-04-04  9:30 ` [PATCH v2 0/7] mmc/wifi/bluetooth: store owner from modules with sdio_register_driver() Ulf Hansson
2024-04-04  9:30   ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240403-module-owner-sdio-v2-3-ae46d6b955eb@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=arend.vanspriel@broadcom.com \
    --cc=ath10k@lists.infradead.org \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=brcm80211@lists.linux.dev \
    --cc=briannorris@chromium.org \
    --cc=francesco@dolcini.it \
    --cc=jerome.pouiller@silabs.com \
    --cc=jjohnson@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=matthias.bgg@gmail.com \
    --cc=quic_jjohnson@quicinc.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.