lkml.org 
[lkml]   [2009]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5/8] staging: agnx, fix bssid compiler warnings
    Date
    conf->bssid is const. Propagate const to not get compiler warnings:
    agnx/pci.c: In function ‘agnx_config_interface’:
    agnx/pci.c:319: warning: passing argument 2 of ‘agnx_set_bssid’ discards qualifiers from pointer target type
    agnx/pci.c:321: warning: passing argument 2 of ‘hash_write’ discards qualifiers from pointer target type

    Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
    ---
    drivers/staging/agnx/phy.c | 4 ++--
    drivers/staging/agnx/phy.h | 2 +-
    drivers/staging/agnx/sta.c | 2 +-
    drivers/staging/agnx/sta.h | 2 +-
    4 files changed, 5 insertions(+), 5 deletions(-)

    diff --git a/drivers/staging/agnx/phy.c b/drivers/staging/agnx/phy.c
    index 2be6331..ec1ca86 100644
    --- a/drivers/staging/agnx/phy.c
    +++ b/drivers/staging/agnx/phy.c
    @@ -118,7 +118,7 @@ static void mac_address_set(struct agnx_priv *priv)
    iowrite32(reg, ctl + AGNX_RXM_MACLO);
    }

    -static void receiver_bssid_set(struct agnx_priv *priv, u8 *bssid)
    +static void receiver_bssid_set(struct agnx_priv *priv, const u8 *bssid)
    {
    void __iomem *ctl = priv->ctl;
    u32 reg;
    @@ -954,7 +954,7 @@ int agnx_set_ssid(struct agnx_priv *priv, u8 *ssid, size_t ssid_len)
    return 0;
    }

    -void agnx_set_bssid(struct agnx_priv *priv, u8 *bssid)
    +void agnx_set_bssid(struct agnx_priv *priv, const u8 *bssid)
    {
    receiver_bssid_set(priv, bssid);
    }
    diff --git a/drivers/staging/agnx/phy.h b/drivers/staging/agnx/phy.h
    index 55e1e22..a955f05 100644
    --- a/drivers/staging/agnx/phy.h
    +++ b/drivers/staging/agnx/phy.h
    @@ -401,7 +401,7 @@ u8 read_from_eeprom(struct agnx_priv *priv, u16 address);
    void agnx_hw_init(struct agnx_priv *priv);
    int agnx_hw_reset(struct agnx_priv *priv);
    int agnx_set_ssid(struct agnx_priv *priv, u8 *ssid, size_t ssid_len);
    -void agnx_set_bssid(struct agnx_priv *priv, u8 *bssid);
    +void agnx_set_bssid(struct agnx_priv *priv, const u8 *bssid);
    void enable_power_saving(struct agnx_priv *priv);
    void disable_power_saving(struct agnx_priv *priv);
    void calibrate_antenna_period(unsigned long data);
    diff --git a/drivers/staging/agnx/sta.c b/drivers/staging/agnx/sta.c
    index 5b2d54a..3e7db5e 100644
    --- a/drivers/staging/agnx/sta.c
    +++ b/drivers/staging/agnx/sta.c
    @@ -22,7 +22,7 @@ void hash_read(struct agnx_priv *priv, u32 reghi, u32 reglo, u8 sta_id)
    printk(PFX "RX hash cmd are : %.8x%.8x\n", reghi, reglo);
    }

    -void hash_write(struct agnx_priv *priv, u8 *mac_addr, u8 sta_id)
    +void hash_write(struct agnx_priv *priv, const u8 *mac_addr, u8 sta_id)
    {
    void __iomem *ctl = priv->ctl;
    u32 reghi, reglo;
    diff --git a/drivers/staging/agnx/sta.h b/drivers/staging/agnx/sta.h
    index 94e2cf1..fd504e3 100644
    --- a/drivers/staging/agnx/sta.h
    +++ b/drivers/staging/agnx/sta.h
    @@ -201,7 +201,7 @@ struct agnx_beacon_hdr {
    /* 802.11(abg) beacon */
    } __attribute__((__packed__));

    -void hash_write(struct agnx_priv *priv, u8 *mac_addr, u8 sta_id);
    +void hash_write(struct agnx_priv *priv, const u8 *mac_addr, u8 sta_id);
    void hash_dump(struct agnx_priv *priv, u8 sta_id);
    void hash_read(struct agnx_priv *priv, u32 reghi, u32 reglo, u8 sta_id);
    void hash_delete(struct agnx_priv *priv, u32 reghi, u32 reglo, u8 sta_id);
    --
    1.6.2
    --
    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/

    \
     
     \ /
      Last update: 2009-03-26 09:39    [W:0.026 / U:66.996 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site