[37/44] USB: serial/keyspan, drop unneeded forward declarations
diff mbox series

Message ID 20210302062214.29627-37-jslaby@suse.cz
State New, archived
Headers show
Series
  • [01/44] MAINTAINERS: orphan mxser
Related show

Commit Message

Jiri Slaby March 2, 2021, 6:22 a.m. UTC
Forward declarations make the code larger, harder to follow and rewrite.
Harder as the declarations are often omitted from global changes. Remove
forward declarations which are not really needed, i.e. when the
definition of the function is before its first use.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Johan Hovold <johan@kernel.org>
---
 drivers/usb/serial/keyspan.c | 20 --------------------
 1 file changed, 20 deletions(-)

Comments

Greg KH March 3, 2021, 7:17 p.m. UTC | #1
On Tue, Mar 02, 2021 at 07:22:07AM +0100, Jiri Slaby wrote:
> Forward declarations make the code larger, harder to follow and rewrite.
> Harder as the declarations are often omitted from global changes. Remove
> forward declarations which are not really needed, i.e. when the
> definition of the function is before its first use.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Johan Hovold <johan@kernel.org>
> ---
>  drivers/usb/serial/keyspan.c | 20 --------------------
>  1 file changed, 20 deletions(-)

I'll let Johan take this through his tree:

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johan Hovold March 5, 2021, 10:10 a.m. UTC | #2
On Wed, Mar 03, 2021 at 08:17:11PM +0100, Greg Kroah-Hartman wrote:
> On Tue, Mar 02, 2021 at 07:22:07AM +0100, Jiri Slaby wrote:
> > Forward declarations make the code larger, harder to follow and rewrite.
> > Harder as the declarations are often omitted from global changes. Remove
> > forward declarations which are not really needed, i.e. when the
> > definition of the function is before its first use.
> > 
> > Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> > Cc: Johan Hovold <johan@kernel.org>
> > ---
> >  drivers/usb/serial/keyspan.c | 20 --------------------
> >  1 file changed, 20 deletions(-)
> 
> I'll let Johan take this through his tree:
> 
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Thanks, I'll pick these two up next week.

Jiri, was there ever a cover letter to this series? It took a while for
all 44 (!) patches to hit the lists (or my inbox), but I never could
figure out whether there was an overall theme to it that made you post
it all as a single series in the first place.

Johan
Johan Hovold March 15, 2021, 8:43 a.m. UTC | #3
On Wed, Mar 03, 2021 at 08:17:11PM +0100, Greg Kroah-Hartman wrote:
> On Tue, Mar 02, 2021 at 07:22:07AM +0100, Jiri Slaby wrote:
> > Forward declarations make the code larger, harder to follow and rewrite.
> > Harder as the declarations are often omitted from global changes. Remove
> > forward declarations which are not really needed, i.e. when the
> > definition of the function is before its first use.
> > 
> > Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> > Cc: Johan Hovold <johan@kernel.org>
> > ---
> >  drivers/usb/serial/keyspan.c | 20 --------------------
> >  1 file changed, 20 deletions(-)
> 
> I'll let Johan take this through his tree:
> 
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Now applied.

Johan

Patch
diff mbox series

diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index 622077dcc344..b04a029e3657 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -41,27 +41,7 @@ 
 #define DRIVER_AUTHOR "Hugh Blemings <hugh@misc.nu"
 #define DRIVER_DESC "Keyspan USB to Serial Converter Driver"
 
-/* Function prototypes for Keyspan serial converter */
-static int keyspan_open(struct tty_struct *tty, struct usb_serial_port *port);
-static void keyspan_close(struct usb_serial_port *port);
-static void keyspan_dtr_rts(struct usb_serial_port *port, int on);
-static int keyspan_startup(struct usb_serial *serial);
-static void keyspan_disconnect(struct usb_serial *serial);
-static void keyspan_release(struct usb_serial *serial);
-static int keyspan_port_probe(struct usb_serial_port *port);
-static void keyspan_port_remove(struct usb_serial_port *port);
-static int keyspan_write_room(struct tty_struct *tty);
-static int keyspan_write(struct tty_struct *tty, struct usb_serial_port *port,
-			 const unsigned char *buf, int count);
 static void keyspan_send_setup(struct usb_serial_port *port, int reset_port);
-static void keyspan_set_termios(struct tty_struct *tty,
-				struct usb_serial_port *port,
-				struct ktermios *old);
-static void keyspan_break_ctl(struct tty_struct *tty, int break_state);
-static int keyspan_tiocmget(struct tty_struct *tty);
-static int keyspan_tiocmset(struct tty_struct *tty, unsigned int set,
-			    unsigned int clear);
-static int keyspan_fake_startup(struct usb_serial *serial);
 
 static int keyspan_usa19_calc_baud(struct usb_serial_port *port,
 				   u32 baud_rate, u32 baudclk,