[PATCH 2/7] net: marvell.c fix sparse shadowed variable warning - Kernel

This is a discussion on [PATCH 2/7] net: marvell.c fix sparse shadowed variable warning - Kernel ; The other if blocks don't redeclare temp, remove the redeclaration in the final if() block. drivers/net/phy/marvell.c:214:7: warning: symbol 'temp' shadows an earlier one drivers/net/phy/marvell.c:160:6: originally declared here Signed-off-by: Harvey Harrison --- drivers/net/phy/marvell.c | 2 -- 1 files changed, 0 insertions(+), ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: [PATCH 2/7] net: marvell.c fix sparse shadowed variable warning

  1. [PATCH 2/7] net: marvell.c fix sparse shadowed variable warning

    The other if blocks don't redeclare temp, remove the redeclaration in
    the final if() block.

    drivers/net/phy/marvell.c:214:7: warning: symbol 'temp' shadows an earlier one
    drivers/net/phy/marvell.c:160:6: originally declared here

    Signed-off-by: Harvey Harrison
    ---
    drivers/net/phy/marvell.c | 2 --
    1 files changed, 0 insertions(+), 2 deletions(-)

    diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
    index 3353991..32a8503 100644
    --- a/drivers/net/phy/marvell.c
    +++ b/drivers/net/phy/marvell.c
    @@ -211,8 +211,6 @@ static int m88e1111_config_init(struct phy_device *phydev)
    }

    if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
    - int temp;
    -
    temp = phy_read(phydev, MII_M1111_PHY_EXT_SR);
    if (temp < 0)
    return temp;
    --
    1.5.5.rc1.135.g8527


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [PATCH 2/7] net: marvell.c fix sparse shadowed variable warning

    Harvey Harrison wrote:
    > The other if blocks don't redeclare temp, remove the redeclaration in
    > the final if() block.
    >
    > drivers/net/phy/marvell.c:214:7: warning: symbol 'temp' shadows an earlier one
    > drivers/net/phy/marvell.c:160:6: originally declared here
    >
    > Signed-off-by: Harvey Harrison
    > ---
    > drivers/net/phy/marvell.c | 2 --
    > 1 files changed, 0 insertions(+), 2 deletions(-)
    >
    > diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
    > index 3353991..32a8503 100644
    > --- a/drivers/net/phy/marvell.c
    > +++ b/drivers/net/phy/marvell.c
    > @@ -211,8 +211,6 @@ static int m88e1111_config_init(struct phy_device *phydev)
    > }
    >
    > if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
    > - int temp;
    > -


    applied


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread