mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 v1 2/7] staging: gpib: Removing gpib_interface_list_t
Date: Tue,  8 Apr 2025 23:25:30 +0000	[thread overview]
Message-ID: <20250408232535.187528-3-matchstick@neverthere.org> (raw)
In-Reply-To: <20250408232535.187528-1-matchstick@neverthere.org>

Removing gpib_interface_list_t to adhere 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/common/gpib_os.c     | 10 +++++-----
 drivers/staging/gpib/include/gpib_types.h |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 684faa0c4547..3fb369caf17e 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -826,9 +826,9 @@ static int board_type_ioctl(gpib_file_private_t *file_priv,
 
 	for (list_ptr = registered_drivers.next; list_ptr != &registered_drivers;
 	     list_ptr = list_ptr->next) {
-		gpib_interface_list_t *entry;
+		struct gpib_interface_list *entry;
 
-		entry = list_entry(list_ptr, gpib_interface_list_t, list);
+		entry = list_entry(list_ptr, struct gpib_interface_list, list);
 		if (strcmp(entry->interface->name, cmd.name) == 0) {
 			int i;
 			int had_module = file_priv->got_module;
@@ -2026,7 +2026,7 @@ void init_gpib_descriptor(gpib_descriptor_t *desc)
 
 int gpib_register_driver(struct gpib_interface *interface, struct module *provider_module)
 {
-	struct gpib_interface_list_struct *entry;
+	struct gpib_interface_list *entry;
 
 	entry = kmalloc(sizeof(*entry), GFP_KERNEL);
 	if (!entry)
@@ -2057,9 +2057,9 @@ void gpib_unregister_driver(struct gpib_interface *interface)
 		}
 	}
 	for (list_ptr = registered_drivers.next; list_ptr != &registered_drivers;) {
-		gpib_interface_list_t *entry;
+		struct gpib_interface_list *entry;
 
-		entry = list_entry(list_ptr, gpib_interface_list_t, list);
+		entry = list_entry(list_ptr, struct gpib_interface_list, list);
 		list_ptr = list_ptr->next;
 		if (entry->interface == interface) {
 			list_del(&entry->list);
diff --git a/drivers/staging/gpib/include/gpib_types.h b/drivers/staging/gpib/include/gpib_types.h
index 66a1a1676f2b..4be7cfce539f 100644
--- a/drivers/staging/gpib/include/gpib_types.h
+++ b/drivers/staging/gpib/include/gpib_types.h
@@ -209,11 +209,11 @@ static inline void init_gpib_pseudo_irq(struct gpib_pseudo_irq *pseudo_irq)
 }
 
 /* list so we can make a linked list of drivers */
-typedef struct gpib_interface_list_struct {
+struct gpib_interface_list {
 	struct list_head list;
 	struct gpib_interface *interface;
 	struct module *module;
-} gpib_interface_list_t;
+};
 
 /* One struct gpib_board is allocated for each physical board in the computer.
  * It provides storage for variables local to each board, and interface
-- 
2.43.0


  parent reply	other threads:[~2025-04-08 23:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-08 23:25 [PATCH v1 0/7] staging: gpib: Removing typedefs Michael Rubin
2025-04-08 23:25 ` [PATCH v1 1/7] staging: gpib: Removing typedef gpib_event_queue Michael Rubin
2025-04-08 23:25 ` Michael Rubin [this message]
2025-04-08 23:25 ` [PATCH v1 3/7] staging: gpib: Removing gpib_event_t typedef Michael Rubin
2025-04-08 23:25 ` [PATCH v1 4/7] staging: gpib: Removing typedef gpib_status_queue Michael Rubin
2025-04-08 23:25 ` [PATCH v1 5/7] staging: gpib: Removing typedef of status_byte Michael Rubin
2025-04-08 23:25 ` [PATCH v1 6/7] staging: gpib: Removing typedef gpib_descriptor_t Michael Rubin
2025-04-08 23:25 ` [PATCH v1 7/7] staging: gpib: Remove typedef gpib_file_private_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=20250408232535.187528-3-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

all inboxes | Powered by JetHome®