Skip to content

Commit

Permalink
staging: gpib: make global 'usec_diff' functions static
Browse files Browse the repository at this point in the history
Trying to build both gpib_bitbang and lpvo_usb_gpib into the kernel
reveals a function that should have been static and is also duplicated:

x86_64-linux-ld: drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.o: in function `usec_diff':
lpvo_usb_gpib.c:(.text+0x23c0): multiple definition of `usec_diff'; drivers/staging/gpib/gpio/gpib_bitbang.o:gpib_bitbang.c:(.text+0x2470): first defined here

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20241212154245.1411411-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Arnd Bergmann authored and Greg Kroah-Hartman committed Dec 20, 2024
1 parent 8c41fae commit d99d65a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/gpib/gpio/gpib_bitbang.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ struct bb_priv {
enum listener_function_state listener_state;
};

inline long usec_diff(struct timespec64 *a, struct timespec64 *b);
static inline long usec_diff(struct timespec64 *a, struct timespec64 *b);
static void bb_buffer_print(unsigned char *buffer, size_t length, int cmd, int eoi);
static void set_data_lines(u8 byte);
static u8 get_data_lines(void);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static int skel_do_release(gpib_board_t *);
* (unix time in sec and NANOsec)
*/

inline int usec_diff(struct timespec64 *a, struct timespec64 *b)
static inline int usec_diff(struct timespec64 *a, struct timespec64 *b)
{
return ((a->tv_sec - b->tv_sec) * 1000000 +
(a->tv_nsec - b->tv_nsec) / 1000);
Expand Down

0 comments on commit d99d65a

Please sign in to comment.