* [PATCH net-next] r8152: Add identifier names for function pointers
@ 2019-10-02 21:09 Prashant Malani
2019-10-03 2:03 ` Hayes Wang
2019-10-03 15:51 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Prashant Malani @ 2019-10-02 21:09 UTC (permalink / raw)
To: hayeswang; +Cc: grundler, netdev, nic_swsd, Prashant Malani
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>
---
drivers/net/usb/r8152.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 08726090570e1..d2688c80968a5 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -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;
@@ -5634,7 +5634,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);
}
--
2.23.0.581.g78d2f28ef7-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH net-next] r8152: Add identifier names for function pointers
2019-10-02 21:09 [PATCH net-next] r8152: Add identifier names for function pointers Prashant Malani
@ 2019-10-03 2:03 ` Hayes Wang
2019-10-03 15:51 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Hayes Wang @ 2019-10-03 2:03 UTC (permalink / raw)
To: Prashant Malani; +Cc: grundler, netdev, nic_swsd
Prashant Malani [mailto:pmalani@chromium.org]
> Sent: Thursday, October 03, 2019 5:10 AM
> To: Hayes Wang
> Cc: grundler@chromium.org; netdev@vger.kernel.org; nic_swsd; Prashant
> Malani
> Subject: [PATCH net-next] r8152: Add identifier names for function pointers
>
> 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>
Best Regards,
Hayes
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] r8152: Add identifier names for function pointers
2019-10-02 21:09 [PATCH net-next] r8152: Add identifier names for function pointers Prashant Malani
2019-10-03 2:03 ` Hayes Wang
@ 2019-10-03 15:51 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-10-03 15:51 UTC (permalink / raw)
To: pmalani; +Cc: hayeswang, grundler, netdev, nic_swsd
From: Prashant Malani <pmalani@chromium.org>
Date: Wed, 2 Oct 2019 14:09:33 -0700
> 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>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-03 15:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 21:09 [PATCH net-next] r8152: Add identifier names for function pointers Prashant Malani
2019-10-03 2:03 ` Hayes Wang
2019-10-03 15:51 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).