Re: [patch net-next] net: qcom/emac: fix a sizeof() typo

2017-02-13 Thread David Miller
From: Dan Carpenter Date: Mon, 13 Feb 2017 14:00:22 +0300 > 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") > Sign

Re: [patch net-next] net: qcom/emac: fix a sizeof() typo

2017-02-13 Thread Timur Tabi
Dan Carpenter wrote: 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 Acked-by: Timur Tabi

Re: [patch net-next] net: qcom/emac: fix a sizeof() typo

2017-02-13 Thread Timur Tabi
walter harms wrote: The question is: why is a simple calculation const*const separated into a function ? This is a callback function. That's just how it's defined. It's rare, but there are drivers that use the parameter, like this one: http://git.kernel.org/cgit/linux/kernel/git/davem/net-ne

Re: [patch net-next] net: qcom/emac: fix a sizeof() typo

2017-02-13 Thread Dan Carpenter
On Mon, Feb 13, 2017 at 12:55:03PM +0100, walter harms wrote: > > > Am 13.02.2017 12:00, schrieb Dan Carpenter: > > 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:

Re: [patch net-next] net: qcom/emac: fix a sizeof() typo

2017-02-13 Thread walter harms
Am 13.02.2017 14:03, schrieb Timur Tabi: > walter harms wrote: >> We have a function where the argument is ignored and the rest is const ? >> >> emac_ethtool_get_regs_len seems the only user. So it would be fairly >> easy to >> move that into that function. >> >> @maintainer: >> Is there a deeper

Re: [patch net-next] net: qcom/emac: fix a sizeof() typo

2017-02-13 Thread Timur Tabi
walter harms wrote: We have a function where the argument is ignored and the rest is const ? emac_ethtool_get_regs_len seems the only user. So it would be fairly easy to move that into that function. @maintainer: Is there a deeper logic behind this ? I don't understand the question. The patc

Re: [patch net-next] net: qcom/emac: fix a sizeof() typo

2017-02-13 Thread walter harms
Am 13.02.2017 12:00, schrieb Dan Carpenter: > 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

[patch net-next] net: qcom/emac: fix a sizeof() typo

2017-02-13 Thread Dan Carpenter
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 diff --git a/drivers/net/ethernet/qualcomm/em