netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net-next] net: qcom/emac: fix a sizeof() typo
@ 2017-02-13 11:00 Dan Carpenter
  2017-02-13 11:55 ` walter harms
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Dan Carpenter @ 2017-02-13 11:00 UTC (permalink / raw)
  To: Timur Tabi; +Cc: netdev, linux-kernel, kernel-janitors

We had intended to say "sizeof(u32)" but the "u" is missing.
Fortunately, sizeof(32) is also 4, so the original code still works.

Fixes: c4e7beea2192 ("net: qcom/emac: add ethtool support for reading hardware registers")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/ethernet/qualcomm/emac/emac-ethtool.c b/drivers/net/ethernet/qualcomm/emac/emac-ethtool.c
index 0d9945fb79be..bbe24639aa5a 100644
--- a/drivers/net/ethernet/qualcomm/emac/emac-ethtool.c
+++ b/drivers/net/ethernet/qualcomm/emac/emac-ethtool.c
@@ -227,7 +227,7 @@ static void emac_get_regs(struct net_device *netdev,
 
 static int emac_get_regs_len(struct net_device *netdev)
 {
-	return EMAC_MAX_REG_SIZE * sizeof(32);
+	return EMAC_MAX_REG_SIZE * sizeof(u32);
 }
 
 static const struct ethtool_ops emac_ethtool_ops = {

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-02-14  3:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-13 11:00 [patch net-next] net: qcom/emac: fix a sizeof() typo Dan Carpenter
2017-02-13 11:55 ` walter harms
2017-02-13 13:03   ` Timur Tabi
2017-02-13 13:28     ` walter harms
2017-02-13 15:43       ` Timur Tabi
2017-02-13 14:00   ` Dan Carpenter
2017-02-13 15:43 ` Timur Tabi
2017-02-14  3:21 ` 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).