Skip to content

Commit

Permalink
r8152: Add identifier names for function pointers
Browse files Browse the repository at this point in the history
Checkpatch throws warnings for function pointer declarations which lack
identifier names.

An example of such a warning is:

WARNING: function definition argument 'struct r8152 *' should
also have an identifier name
739: FILE: drivers/net/usb/r8152.c:739:
+               void (*init)(struct r8152 *);

So, fix those warnings by adding the identifier names.

While we are at it, also fix a character limit violation which was
causing another checkpatch warning.

Change-Id: Idec857ce2dc9592caf3173188be1660052c052ce
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Acked-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Prashant Malani authored and David S. Miller committed Oct 3, 2019
1 parent fab401e commit 151ea09
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions drivers/net/usb/r8152.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,16 +736,16 @@ struct r8152 {
struct tasklet_struct tx_tl;

struct rtl_ops {
void (*init)(struct r8152 *);
int (*enable)(struct r8152 *);
void (*disable)(struct r8152 *);
void (*up)(struct r8152 *);
void (*down)(struct r8152 *);
void (*unload)(struct r8152 *);
int (*eee_get)(struct r8152 *, struct ethtool_eee *);
int (*eee_set)(struct r8152 *, struct ethtool_eee *);
bool (*in_nway)(struct r8152 *);
void (*hw_phy_cfg)(struct r8152 *);
void (*init)(struct r8152 *tp);
int (*enable)(struct r8152 *tp);
void (*disable)(struct r8152 *tp);
void (*up)(struct r8152 *tp);
void (*down)(struct r8152 *tp);
void (*unload)(struct r8152 *tp);
int (*eee_get)(struct r8152 *tp, struct ethtool_eee *eee);
int (*eee_set)(struct r8152 *tp, struct ethtool_eee *eee);
bool (*in_nway)(struct r8152 *tp);
void (*hw_phy_cfg)(struct r8152 *tp);
void (*autosuspend_en)(struct r8152 *tp, bool enable);
} rtl_ops;

Expand Down Expand Up @@ -5603,7 +5603,8 @@ static int rtl8152_probe(struct usb_interface *intf,
}

if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && udev->serial &&
(!strcmp(udev->serial, "000001000000") || !strcmp(udev->serial, "000002000000"))) {
(!strcmp(udev->serial, "000001000000") ||
!strcmp(udev->serial, "000002000000"))) {
dev_info(&udev->dev, "Dell TB16 Dock, disable RX aggregation");
set_bit(DELL_TB_RX_AGG_BUG, &tp->flags);
}
Expand Down

0 comments on commit 151ea09

Please sign in to comment.