Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da9aec7b authored by Roland Dreier's avatar Roland Dreier
Browse files

IB/ipath: Make a few functions static



Make some functions that are only used in a single .c file static.  In
addition to being a cleanup, this shrinks the generated code.  On x86_64:

add/remove: 1/3 grow/shrink: 2/1 up/down: 4777/-4956 (-179)
function                                     old     new   delta
handle_errors                                  -    3994   +3994
__verbs_timer                                 42     710    +668
ipath_do_ruc_send                           2131    2246    +115
ipath_no_bufs_available                      136       -    -136
ipath_disarm_senderrbufs                     639       -    -639
ipath_ib_timer                               658       -    -658
ipath_intr                                  5878    2355   -3523

Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent ee49bd93
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1889,7 +1889,7 @@ void ipath_write_kreg_port(const struct ipath_devdata *dd, ipath_kreg regno,
/* Below is "non-zero" to force override, but both actual LEDs are off */
/* Below is "non-zero" to force override, but both actual LEDs are off */
#define LED_OVER_BOTH_OFF (8)
#define LED_OVER_BOTH_OFF (8)


void ipath_run_led_override(unsigned long opaque)
static void ipath_run_led_override(unsigned long opaque)
{
{
	struct ipath_devdata *dd = (struct ipath_devdata *)opaque;
	struct ipath_devdata *dd = (struct ipath_devdata *)opaque;
	int timeoff;
	int timeoff;
+2 −2
Original line number Original line Diff line number Diff line
@@ -426,7 +426,7 @@ bail:
 * @buffer: data to write
 * @buffer: data to write
 * @len: number of bytes to write
 * @len: number of bytes to write
 */
 */
int ipath_eeprom_internal_write(struct ipath_devdata *dd, u8 eeprom_offset,
static int ipath_eeprom_internal_write(struct ipath_devdata *dd, u8 eeprom_offset,
				       const void *buffer, int len)
				       const void *buffer, int len)
{
{
	u8 single_byte;
	u8 single_byte;
+1 −1
Original line number Original line Diff line number Diff line
@@ -70,7 +70,7 @@ static void ipath_clrpiobuf(struct ipath_devdata *dd, u32 pnum)
 * If rewrite is true, and bits are set in the sendbufferror registers,
 * If rewrite is true, and bits are set in the sendbufferror registers,
 * we'll write to the buffer, for error recovery on parity errors.
 * we'll write to the buffer, for error recovery on parity errors.
 */
 */
void ipath_disarm_senderrbufs(struct ipath_devdata *dd, int rewrite)
static void ipath_disarm_senderrbufs(struct ipath_devdata *dd, int rewrite)
{
{
	u32 piobcnt;
	u32 piobcnt;
	unsigned long sbuf[4];
	unsigned long sbuf[4];
+0 −1
Original line number Original line Diff line number Diff line
@@ -776,7 +776,6 @@ void ipath_get_eeprom_info(struct ipath_devdata *);
int ipath_update_eeprom_log(struct ipath_devdata *dd);
int ipath_update_eeprom_log(struct ipath_devdata *dd);
void ipath_inc_eeprom_err(struct ipath_devdata *dd, u32 eidx, u32 incr);
void ipath_inc_eeprom_err(struct ipath_devdata *dd, u32 eidx, u32 incr);
u64 ipath_snap_cntr(struct ipath_devdata *, ipath_creg);
u64 ipath_snap_cntr(struct ipath_devdata *, ipath_creg);
void ipath_disarm_senderrbufs(struct ipath_devdata *, int);


/*
/*
 * Set LED override, only the two LSBs have "public" meaning, but
 * Set LED override, only the two LSBs have "public" meaning, but
+1 −1
Original line number Original line Diff line number Diff line
@@ -507,7 +507,7 @@ static int want_buffer(struct ipath_devdata *dd)
 *
 *
 * Called when we run out of PIO buffers.
 * Called when we run out of PIO buffers.
 */
 */
void ipath_no_bufs_available(struct ipath_qp *qp, struct ipath_ibdev *dev)
static void ipath_no_bufs_available(struct ipath_qp *qp, struct ipath_ibdev *dev)
{
{
	unsigned long flags;
	unsigned long flags;


Loading