* [PATCH next] nfc: Drop explicit initialization of struct i2c_device_id::driver_data to 0
@ 2024-06-19 19:56 Uwe Kleine-König
2024-06-20 6:29 ` Krzysztof Kozlowski
2024-06-21 2:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2024-06-19 19:56 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Jakub Kicinski, Oliver Neukum, netdev
These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.
This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
drivers/nfc/microread/i2c.c | 2 +-
drivers/nfc/nfcmrvl/i2c.c | 2 +-
drivers/nfc/nxp-nci/i2c.c | 2 +-
drivers/nfc/pn533/i2c.c | 2 +-
drivers/nfc/pn544/i2c.c | 2 +-
drivers/nfc/s3fwrn5/i2c.c | 2 +-
drivers/nfc/st-nci/i2c.c | 2 +-
drivers/nfc/st21nfca/i2c.c | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/nfc/microread/i2c.c b/drivers/nfc/microread/i2c.c
index 642df4e0ce24..113b2e306e35 100644
--- a/drivers/nfc/microread/i2c.c
+++ b/drivers/nfc/microread/i2c.c
@@ -277,7 +277,7 @@ static void microread_i2c_remove(struct i2c_client *client)
}
static const struct i2c_device_id microread_i2c_id[] = {
- { MICROREAD_I2C_DRIVER_NAME, 0},
+ { MICROREAD_I2C_DRIVER_NAME },
{ }
};
MODULE_DEVICE_TABLE(i2c, microread_i2c_id);
diff --git a/drivers/nfc/nfcmrvl/i2c.c b/drivers/nfc/nfcmrvl/i2c.c
index 74553134c1b1..39ecf2aeda80 100644
--- a/drivers/nfc/nfcmrvl/i2c.c
+++ b/drivers/nfc/nfcmrvl/i2c.c
@@ -252,7 +252,7 @@ static const struct of_device_id of_nfcmrvl_i2c_match[] __maybe_unused = {
MODULE_DEVICE_TABLE(of, of_nfcmrvl_i2c_match);
static const struct i2c_device_id nfcmrvl_i2c_id_table[] = {
- { "nfcmrvl_i2c", 0 },
+ { "nfcmrvl_i2c" },
{}
};
MODULE_DEVICE_TABLE(i2c, nfcmrvl_i2c_id_table);
diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c
index 3ae4b41c59ac..a8aced0b8010 100644
--- a/drivers/nfc/nxp-nci/i2c.c
+++ b/drivers/nfc/nxp-nci/i2c.c
@@ -322,7 +322,7 @@ static void nxp_nci_i2c_remove(struct i2c_client *client)
}
static const struct i2c_device_id nxp_nci_i2c_id_table[] = {
- {"nxp-nci_i2c", 0},
+ { "nxp-nci_i2c" },
{}
};
MODULE_DEVICE_TABLE(i2c, nxp_nci_i2c_id_table);
diff --git a/drivers/nfc/pn533/i2c.c b/drivers/nfc/pn533/i2c.c
index 438ab9553f7a..132c050a365d 100644
--- a/drivers/nfc/pn533/i2c.c
+++ b/drivers/nfc/pn533/i2c.c
@@ -249,7 +249,7 @@ static const struct of_device_id of_pn533_i2c_match[] __maybe_unused = {
MODULE_DEVICE_TABLE(of, of_pn533_i2c_match);
static const struct i2c_device_id pn533_i2c_id_table[] = {
- { PN533_I2C_DRIVER_NAME, 0 },
+ { PN533_I2C_DRIVER_NAME },
{}
};
MODULE_DEVICE_TABLE(i2c, pn533_i2c_id_table);
diff --git a/drivers/nfc/pn544/i2c.c b/drivers/nfc/pn544/i2c.c
index 3f6d74832bac..9fe664960b38 100644
--- a/drivers/nfc/pn544/i2c.c
+++ b/drivers/nfc/pn544/i2c.c
@@ -44,7 +44,7 @@
PN544_HCI_I2C_LLC_MAX_PAYLOAD)
static const struct i2c_device_id pn544_hci_i2c_id_table[] = {
- {"pn544", 0},
+ { "pn544" },
{}
};
diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c
index 720d4a72493c..536c566e3f59 100644
--- a/drivers/nfc/s3fwrn5/i2c.c
+++ b/drivers/nfc/s3fwrn5/i2c.c
@@ -245,7 +245,7 @@ static void s3fwrn5_i2c_remove(struct i2c_client *client)
}
static const struct i2c_device_id s3fwrn5_i2c_id_table[] = {
- {S3FWRN5_I2C_DRIVER_NAME, 0},
+ { S3FWRN5_I2C_DRIVER_NAME },
{}
};
MODULE_DEVICE_TABLE(i2c, s3fwrn5_i2c_id_table);
diff --git a/drivers/nfc/st-nci/i2c.c b/drivers/nfc/st-nci/i2c.c
index d20a337e90b4..416770adbeba 100644
--- a/drivers/nfc/st-nci/i2c.c
+++ b/drivers/nfc/st-nci/i2c.c
@@ -257,7 +257,7 @@ static void st_nci_i2c_remove(struct i2c_client *client)
}
static const struct i2c_device_id st_nci_i2c_id_table[] = {
- {ST_NCI_DRIVER_NAME, 0},
+ { ST_NCI_DRIVER_NAME },
{}
};
MODULE_DEVICE_TABLE(i2c, st_nci_i2c_id_table);
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c
index 064a63db288b..02c3d11a19c4 100644
--- a/drivers/nfc/st21nfca/i2c.c
+++ b/drivers/nfc/st21nfca/i2c.c
@@ -573,7 +573,7 @@ static void st21nfca_hci_i2c_remove(struct i2c_client *client)
}
static const struct i2c_device_id st21nfca_hci_i2c_id_table[] = {
- {ST21NFCA_HCI_DRIVER_NAME, 0},
+ { ST21NFCA_HCI_DRIVER_NAME },
{}
};
MODULE_DEVICE_TABLE(i2c, st21nfca_hci_i2c_id_table);
base-commit: 2102cb0d050d34d50b9642a3a50861787527e922
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH next] nfc: Drop explicit initialization of struct i2c_device_id::driver_data to 0
2024-06-19 19:56 [PATCH next] nfc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Uwe Kleine-König
@ 2024-06-20 6:29 ` Krzysztof Kozlowski
2024-06-21 2:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-20 6:29 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: Jakub Kicinski, Oliver Neukum, netdev
On 19/06/2024 21:56, Uwe Kleine-König wrote:
> These drivers don't use the driver_data member of struct i2c_device_id,
> so don't explicitly initialize this member.
>
> This prepares putting driver_data in an anonymous union which requires
> either no initialization or named designators. But it's also a nice
> cleanup on its own.
>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH next] nfc: Drop explicit initialization of struct i2c_device_id::driver_data to 0
2024-06-19 19:56 [PATCH next] nfc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Uwe Kleine-König
2024-06-20 6:29 ` Krzysztof Kozlowski
@ 2024-06-21 2:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-06-21 2:30 UTC (permalink / raw)
To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig_=3Cu=2Ekleine-koenig=40baylibre=2Ecom=3E?=
Cc: krzk, kuba, oneukum, netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 19 Jun 2024 21:56:31 +0200 you wrote:
> These drivers don't use the driver_data member of struct i2c_device_id,
> so don't explicitly initialize this member.
>
> This prepares putting driver_data in an anonymous union which requires
> either no initialization or named designators. But it's also a nice
> cleanup on its own.
>
> [...]
Here is the summary with links:
- [next] nfc: Drop explicit initialization of struct i2c_device_id::driver_data to 0
https://git.kernel.org/netdev/net-next/c/0d6b1eb660be
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-21 2:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-19 19:56 [PATCH next] nfc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Uwe Kleine-König
2024-06-20 6:29 ` Krzysztof Kozlowski
2024-06-21 2:30 ` patchwork-bot+netdevbpf
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).