mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
Merge branch 'net--dsa-mv88e6xxx-warn'
Andrew Lunn says: ==================== net: dsa: mv88e6xxx: Fixup C=1 W=1 warnings Make the mv88e6xxx driver build cleanly with C=1 W=1. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
6c67b03b85
4 changed files with 11 additions and 9 deletions
|
@ -1751,7 +1751,7 @@ static int mv88e6xxx_policy_insert(struct mv88e6xxx_chip *chip, int port,
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((fs->flow_type & FLOW_EXT) && fs->m_ext.vlan_tci) {
|
if ((fs->flow_type & FLOW_EXT) && fs->m_ext.vlan_tci) {
|
||||||
if (fs->m_ext.vlan_tci != 0xffff)
|
if (fs->m_ext.vlan_tci != htons(0xffff))
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
vid = be16_to_cpu(fs->h_ext.vlan_tci) & VLAN_VID_MASK;
|
vid = be16_to_cpu(fs->h_ext.vlan_tci) & VLAN_VID_MASK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,7 +167,7 @@ struct mv88e6xxx_irq {
|
||||||
u16 masked;
|
u16 masked;
|
||||||
struct irq_chip chip;
|
struct irq_chip chip;
|
||||||
struct irq_domain *domain;
|
struct irq_domain *domain;
|
||||||
unsigned int nirqs;
|
int nirqs;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* state flags for mv88e6xxx_port_hwtstamp::state */
|
/* state flags for mv88e6xxx_port_hwtstamp::state */
|
||||||
|
@ -654,7 +654,7 @@ static inline unsigned int mv88e6xxx_num_ports(struct mv88e6xxx_chip *chip)
|
||||||
|
|
||||||
static inline u16 mv88e6xxx_port_mask(struct mv88e6xxx_chip *chip)
|
static inline u16 mv88e6xxx_port_mask(struct mv88e6xxx_chip *chip)
|
||||||
{
|
{
|
||||||
return GENMASK(mv88e6xxx_num_ports(chip) - 1, 0);
|
return GENMASK((s32)mv88e6xxx_num_ports(chip) - 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned int mv88e6xxx_num_gpio(struct mv88e6xxx_chip *chip)
|
static inline unsigned int mv88e6xxx_num_gpio(struct mv88e6xxx_chip *chip)
|
||||||
|
|
|
@ -876,19 +876,18 @@ static int mv88e6390_watchdog_setup(struct mv88e6xxx_chip *chip)
|
||||||
|
|
||||||
static int mv88e6390_watchdog_action(struct mv88e6xxx_chip *chip, int irq)
|
static int mv88e6390_watchdog_action(struct mv88e6xxx_chip *chip, int irq)
|
||||||
{
|
{
|
||||||
int err;
|
|
||||||
u16 reg;
|
u16 reg;
|
||||||
|
|
||||||
mv88e6xxx_g2_write(chip, MV88E6390_G2_WDOG_CTL,
|
mv88e6xxx_g2_write(chip, MV88E6390_G2_WDOG_CTL,
|
||||||
MV88E6390_G2_WDOG_CTL_PTR_EVENT);
|
MV88E6390_G2_WDOG_CTL_PTR_EVENT);
|
||||||
err = mv88e6xxx_g2_read(chip, MV88E6390_G2_WDOG_CTL, ®);
|
mv88e6xxx_g2_read(chip, MV88E6390_G2_WDOG_CTL, ®);
|
||||||
|
|
||||||
dev_info(chip->dev, "Watchdog event: 0x%04x",
|
dev_info(chip->dev, "Watchdog event: 0x%04x",
|
||||||
reg & MV88E6390_G2_WDOG_CTL_DATA_MASK);
|
reg & MV88E6390_G2_WDOG_CTL_DATA_MASK);
|
||||||
|
|
||||||
mv88e6xxx_g2_write(chip, MV88E6390_G2_WDOG_CTL,
|
mv88e6xxx_g2_write(chip, MV88E6390_G2_WDOG_CTL,
|
||||||
MV88E6390_G2_WDOG_CTL_PTR_HISTORY);
|
MV88E6390_G2_WDOG_CTL_PTR_HISTORY);
|
||||||
err = mv88e6xxx_g2_read(chip, MV88E6390_G2_WDOG_CTL, ®);
|
mv88e6xxx_g2_read(chip, MV88E6390_G2_WDOG_CTL, ®);
|
||||||
|
|
||||||
dev_info(chip->dev, "Watchdog history: 0x%04x",
|
dev_info(chip->dev, "Watchdog history: 0x%04x",
|
||||||
reg & MV88E6390_G2_WDOG_CTL_DATA_MASK);
|
reg & MV88E6390_G2_WDOG_CTL_DATA_MASK);
|
||||||
|
|
|
@ -44,7 +44,8 @@ static int mv88e6xxx_g2_scratch_write(struct mv88e6xxx_chip *chip, int reg,
|
||||||
/**
|
/**
|
||||||
* mv88e6xxx_g2_scratch_gpio_get_bit - get a bit
|
* mv88e6xxx_g2_scratch_gpio_get_bit - get a bit
|
||||||
* @chip: chip private data
|
* @chip: chip private data
|
||||||
* @nr: bit index
|
* @base_reg: base of scratch bits
|
||||||
|
* @offset: index of bit within the register
|
||||||
* @set: is bit set?
|
* @set: is bit set?
|
||||||
*/
|
*/
|
||||||
static int mv88e6xxx_g2_scratch_get_bit(struct mv88e6xxx_chip *chip,
|
static int mv88e6xxx_g2_scratch_get_bit(struct mv88e6xxx_chip *chip,
|
||||||
|
@ -68,8 +69,9 @@ static int mv88e6xxx_g2_scratch_get_bit(struct mv88e6xxx_chip *chip,
|
||||||
/**
|
/**
|
||||||
* mv88e6xxx_g2_scratch_gpio_set_bit - set (or clear) a bit
|
* mv88e6xxx_g2_scratch_gpio_set_bit - set (or clear) a bit
|
||||||
* @chip: chip private data
|
* @chip: chip private data
|
||||||
* @nr: bit index
|
* @base_reg: base of scratch bits
|
||||||
* @set: set if true, clear if false
|
* @offset: index of bit within the register
|
||||||
|
* @set: should this bit be set?
|
||||||
*
|
*
|
||||||
* Helper function for dealing with the direction and data registers.
|
* Helper function for dealing with the direction and data registers.
|
||||||
*/
|
*/
|
||||||
|
@ -165,6 +167,7 @@ static int mv88e6352_g2_scratch_gpio_get_dir(struct mv88e6xxx_chip *chip,
|
||||||
* mv88e6352_g2_scratch_gpio_set_dir - set direction of gpio pin
|
* mv88e6352_g2_scratch_gpio_set_dir - set direction of gpio pin
|
||||||
* @chip: chip private data
|
* @chip: chip private data
|
||||||
* @pin: gpio index
|
* @pin: gpio index
|
||||||
|
* @input: should the gpio be an input, or an output?
|
||||||
*/
|
*/
|
||||||
static int mv88e6352_g2_scratch_gpio_set_dir(struct mv88e6xxx_chip *chip,
|
static int mv88e6352_g2_scratch_gpio_set_dir(struct mv88e6xxx_chip *chip,
|
||||||
unsigned int pin, bool input)
|
unsigned int pin, bool input)
|
||||||
|
|
Loading…
Reference in a new issue