From: Michael Rubin <matchstick@neverthere.org>
To: gregkh@linuxfoundation.org, dpenkler@gmail.com
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Michael Rubin <matchstick@neverthere.org>
Subject: [PATCH v2 17/18] staging: gpib: tnt4882: struct gpib_interface
Date: Wed, 16 Apr 2025 20:42:03 +0000 [thread overview]
Message-ID: <20250416204204.8009-18-matchstick@neverthere.org> (raw)
In-Reply-To: <20250416204204.8009-1-matchstick@neverthere.org>
Using Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be
directly accessed should never be a typedef.
Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 24 ++++++++++-----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
index da13d11c20bd..d26a388912c9 100644
--- a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
+++ b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
@@ -1122,7 +1122,7 @@ static int tnt4882_pci_probe(struct pci_dev *dev, const struct pci_device_id *id
return 0;
}
-static gpib_interface_t ni_pci_interface = {
+static struct gpib_interface ni_pci_interface = {
.name = "ni_pci",
.attach = ni_pci_attach,
.detach = ni_pci_detach,
@@ -1150,7 +1150,7 @@ static gpib_interface_t ni_pci_interface = {
.return_to_local = tnt4882_return_to_local,
};
-static gpib_interface_t ni_pci_accel_interface = {
+static struct gpib_interface ni_pci_accel_interface = {
.name = "ni_pci_accel",
.attach = ni_pci_attach,
.detach = ni_pci_detach,
@@ -1178,7 +1178,7 @@ static gpib_interface_t ni_pci_accel_interface = {
.return_to_local = tnt4882_return_to_local,
};
-static gpib_interface_t ni_isa_interface = {
+static struct gpib_interface ni_isa_interface = {
.name = "ni_isa",
.attach = ni_tnt_isa_attach,
.detach = ni_isa_detach,
@@ -1206,7 +1206,7 @@ static gpib_interface_t ni_isa_interface = {
.return_to_local = tnt4882_return_to_local,
};
-static gpib_interface_t ni_nat4882_isa_interface = {
+static struct gpib_interface ni_nat4882_isa_interface = {
.name = "ni_nat4882_isa",
.attach = ni_nat4882_isa_attach,
.detach = ni_isa_detach,
@@ -1234,7 +1234,7 @@ static gpib_interface_t ni_nat4882_isa_interface = {
.return_to_local = tnt4882_return_to_local,
};
-static gpib_interface_t ni_nec_isa_interface = {
+static struct gpib_interface ni_nec_isa_interface = {
.name = "ni_nec_isa",
.attach = ni_nec_isa_attach,
.detach = ni_isa_detach,
@@ -1262,7 +1262,7 @@ static gpib_interface_t ni_nec_isa_interface = {
.return_to_local = tnt4882_return_to_local,
};
-static gpib_interface_t ni_isa_accel_interface = {
+static struct gpib_interface ni_isa_accel_interface = {
.name = "ni_isa_accel",
.attach = ni_tnt_isa_attach,
.detach = ni_isa_detach,
@@ -1290,7 +1290,7 @@ static gpib_interface_t ni_isa_accel_interface = {
.return_to_local = tnt4882_return_to_local,
};
-static gpib_interface_t ni_nat4882_isa_accel_interface = {
+static struct gpib_interface ni_nat4882_isa_accel_interface = {
.name = "ni_nat4882_isa_accel",
.attach = ni_nat4882_isa_attach,
.detach = ni_isa_detach,
@@ -1318,7 +1318,7 @@ static gpib_interface_t ni_nat4882_isa_accel_interface = {
.return_to_local = tnt4882_return_to_local,
};
-static gpib_interface_t ni_nec_isa_accel_interface = {
+static struct gpib_interface ni_nec_isa_accel_interface = {
.name = "ni_nec_isa_accel",
.attach = ni_nec_isa_attach,
.detach = ni_isa_detach,
@@ -1377,8 +1377,8 @@ MODULE_DEVICE_TABLE(pnp, tnt4882_pnp_table);
#endif
#ifdef CONFIG_GPIB_PCMCIA
-static gpib_interface_t ni_pcmcia_interface;
-static gpib_interface_t ni_pcmcia_accel_interface;
+static struct gpib_interface ni_pcmcia_interface;
+static struct gpib_interface ni_pcmcia_accel_interface;
static int __init init_ni_gpib_cs(void);
static void __exit exit_ni_gpib_cs(void);
#endif
@@ -1775,7 +1775,7 @@ static void ni_pcmcia_detach(struct gpib_board *board)
tnt4882_free_private(board);
}
-static gpib_interface_t ni_pcmcia_interface = {
+static struct gpib_interface ni_pcmcia_interface = {
.name = "ni_pcmcia",
.attach = ni_pcmcia_attach,
.detach = ni_pcmcia_detach,
@@ -1803,7 +1803,7 @@ static gpib_interface_t ni_pcmcia_interface = {
.return_to_local = tnt4882_return_to_local,
};
-static gpib_interface_t ni_pcmcia_accel_interface = {
+static struct gpib_interface ni_pcmcia_accel_interface = {
.name = "ni_pcmcia_accel",
.attach = ni_pcmcia_attach,
.detach = ni_pcmcia_detach,
--
2.43.0
next prev parent reply other threads:[~2025-04-16 20:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-16 20:41 [PATCH v2 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
2025-04-16 20:41 ` [PATCH v2 01/18] staging: gpib: struct typing for gpib_interface Michael Rubin
2025-04-16 20:41 ` [PATCH v2 02/18] staging: gpib: agilent_82350b: gpib_interface Michael Rubin
2025-04-16 20:41 ` [PATCH v2 03/18] staging: gpib: agilent_82357a: gpib_interface Michael Rubin
2025-04-16 20:41 ` [PATCH v2 04/18] staging: gpib: cb7210: struct gpib_interface Michael Rubin
2025-04-16 20:41 ` [PATCH v2 05/18] staging: gpib: cec: " Michael Rubin
2025-04-16 20:41 ` [PATCH v2 06/18] staging: gpib: common: " Michael Rubin
2025-04-16 20:41 ` [PATCH v2 07/18] staging: gpib: fluke: " Michael Rubin
2025-04-16 20:41 ` [PATCH v2 08/18] staging: gpib: fmh: " Michael Rubin
2025-04-16 20:41 ` [PATCH v2 09/18] staging: gpib: gpio: " Michael Rubin
2025-04-16 20:41 ` [PATCH v2 10/18] staging: gpib: hp_82335: " Michael Rubin
2025-04-16 20:41 ` [PATCH v2 11/18] staging: gpib: hp2341: " Michael Rubin
2025-04-16 20:41 ` [PATCH v2 12/18] staging: gpib: gpibP: " Michael Rubin
2025-04-16 20:41 ` [PATCH v2 13/18] staging: gpib: ines: " Michael Rubin
2025-04-16 20:42 ` [PATCH v2 14/18] staging: gpib: lpvo_usb: " Michael Rubin
2025-04-16 20:42 ` [PATCH v2 15/18] staging: gpib: ni_usb: " Michael Rubin
2025-04-16 20:42 ` [PATCH v2 16/18] staging: gpib: pc2: " Michael Rubin
2025-04-16 20:42 ` Michael Rubin [this message]
2025-04-16 20:42 ` [PATCH v2 18/18] staging: gpib: Removing typedef gpib_interface_t Michael Rubin
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=20250416204204.8009-18-matchstick@neverthere.org \
--to=matchstick@neverthere.org \
--cc=dpenkler@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox