public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Michael Rubin <matchstick@neverthere.org>
Cc: gregkh@linuxfoundation.org, dpenkler@gmail.com,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 01/18] staging: gpib: struct typing for gpib_interface
Date: Wed, 9 Apr 2025 11:26:41 +0300	[thread overview]
Message-ID: <804eaa0e-e1ce-4ee2-8ad4-f56bedd6d14f@stanley.mountain> (raw)
In-Reply-To: <20250408222504.186992-2-matchstick@neverthere.org>

On Tue, Apr 08, 2025 at 10:24:47PM +0000, Michael Rubin wrote:
> Using Linux code style for gpib_interface struct in .h to allow drivers to
> migrate.
> 
> Adhering to Linux code style.
> 
> In general, a pointer, or a struct that has elements that can reasonably be
> directly accessed should never be a typedef.
> 
> Reported by CheckPatch
> 
> WARNING: do not add new typedefs
> 

This commit message is quite long but it's totally unrelated to what the
patch does.

This commit message should just say "Having the word "_struct" in the
name of the struct doesn't add any information so rename struct
gpib_interface_struct to struct gpib_interface."

regards,
dan carpenter

> Signed-off-by: Michael Rubin <matchstick@neverthere.org>
> ---
>  drivers/staging/gpib/include/gpib_types.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/gpib/include/gpib_types.h b/drivers/staging/gpib/include/gpib_types.h
> index 2d9b9be683f8..10d8776ef425 100644
> --- a/drivers/staging/gpib/include/gpib_types.h
> +++ b/drivers/staging/gpib/include/gpib_types.h
> @@ -22,7 +22,7 @@
>  #include <linux/timer.h>
>  #include <linux/interrupt.h>
>  
> -typedef struct gpib_interface_struct gpib_interface_t;
> +typedef struct gpib_interface gpib_interface_t;
>  struct gpib_board;
>  
>  /* config parameters that are only used by driver attach functions */
> @@ -51,7 +51,7 @@ typedef struct {
>  	char *serial_number;
>  } gpib_board_config_t;
>  
> -struct gpib_interface_struct {
> +struct gpib_interface {
>  	/* name of board */
>  	char *name;
>  	/* attach() initializes board and allocates resources */
> -- 
> 2.43.0
> 

  reply	other threads:[~2025-04-09  8:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
2025-04-08 22:24 ` [PATCH v1 01/18] staging: gpib: struct typing for gpib_interface Michael Rubin
2025-04-09  8:26   ` Dan Carpenter [this message]
2025-04-09 17:52     ` Michael Rubin
2025-04-15 14:41       ` Greg KH
2025-04-16 20:45         ` Michael Rubin
2025-04-08 22:24 ` [PATCH v1 02/18] staging: gpib: agilent_82350b: gpib_interface Michael Rubin
2025-04-08 22:24 ` [PATCH v1 03/18] staging: gpib: agilent_82357a: gpib_interface Michael Rubin
2025-04-08 22:24 ` [PATCH v1 04/18] staging: gpib: cb7210: struct gpib_interface Michael Rubin
2025-04-08 22:24 ` [PATCH v1 05/18] staging: gpib: cec: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 06/18] staging: gpib: common: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 07/18] staging: gpib: fluke: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 08/18] staging: gpib: fmh: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 09/18] staging: gpib: gpio: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 10/18] staging: gpib: hp_82335: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 11/18] staging: gpib: hp2341: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 12/18] staging: gpib: gpibP: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 13/18] staging: gpib: ines: " Michael Rubin
2025-04-08 22:25 ` [PATCH v1 14/18] staging: gpib: lpvo_usb: " Michael Rubin
2025-04-08 22:25 ` [PATCH v1 15/18] staging: gpib: ni_usb: " Michael Rubin
2025-04-08 22:25 ` [PATCH v1 16/18] staging: gpib: pc2: " Michael Rubin
2025-04-08 22:25 ` [PATCH v1 17/18] staging: gpib: tnt4882: " Michael Rubin
2025-04-08 22:25 ` [PATCH v1 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=804eaa0e-e1ce-4ee2-8ad4-f56bedd6d14f@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=dpenkler@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=matchstick@neverthere.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox