Merge branch 'phy_checkpatch'
Florian Fainelli says: ==================== net: phy: fix checkpatch errors This patchset fixes trivial checkpatch errors, no functional change introduced. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
cea883bb68
10 changed files with 168 additions and 168 deletions
|
@ -92,7 +92,7 @@ static int cis820x_config_intr(struct phy_device *phydev)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if(phydev->interrupts == PHY_INTERRUPT_ENABLED)
|
if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
|
||||||
err = phy_write(phydev, MII_CIS8201_IMASK,
|
err = phy_write(phydev, MII_CIS8201_IMASK,
|
||||||
MII_CIS8201_IMASK_MASK);
|
MII_CIS8201_IMASK_MASK);
|
||||||
else
|
else
|
||||||
|
|
|
@ -72,7 +72,7 @@ static int dm9161_config_intr(struct phy_device *phydev)
|
||||||
if (temp < 0)
|
if (temp < 0)
|
||||||
return temp;
|
return temp;
|
||||||
|
|
||||||
if(PHY_INTERRUPT_ENABLED == phydev->interrupts )
|
if (PHY_INTERRUPT_ENABLED == phydev->interrupts)
|
||||||
temp &= ~(MII_DM9161_INTR_STOP);
|
temp &= ~(MII_DM9161_INTR_STOP);
|
||||||
else
|
else
|
||||||
temp |= MII_DM9161_INTR_STOP;
|
temp |= MII_DM9161_INTR_STOP;
|
||||||
|
|
|
@ -851,8 +851,8 @@ static int match(struct sk_buff *skb, unsigned int type, struct rxts *rxts)
|
||||||
|
|
||||||
seqid = (u16 *)(data + offset + OFF_PTP_SEQUENCE_ID);
|
seqid = (u16 *)(data + offset + OFF_PTP_SEQUENCE_ID);
|
||||||
|
|
||||||
return (rxts->msgtype == (*msgtype & 0xf) &&
|
return rxts->msgtype == (*msgtype & 0xf) &&
|
||||||
rxts->seqid == ntohs(*seqid));
|
rxts->seqid == ntohs(*seqid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dp83640_free_clocks(void)
|
static void dp83640_free_clocks(void)
|
||||||
|
|
|
@ -48,7 +48,7 @@ MODULE_LICENSE("GPL");
|
||||||
static int ip175c_config_init(struct phy_device *phydev)
|
static int ip175c_config_init(struct phy_device *phydev)
|
||||||
{
|
{
|
||||||
int err, i;
|
int err, i;
|
||||||
static int full_reset_performed = 0;
|
static int full_reset_performed;
|
||||||
|
|
||||||
if (full_reset_performed == 0) {
|
if (full_reset_performed == 0) {
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ static int lxt970_config_intr(struct phy_device *phydev)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if(phydev->interrupts == PHY_INTERRUPT_ENABLED)
|
if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
|
||||||
err = phy_write(phydev, MII_LXT970_IER, MII_LXT970_IER_IEN);
|
err = phy_write(phydev, MII_LXT970_IER, MII_LXT970_IER_IEN);
|
||||||
else
|
else
|
||||||
err = phy_write(phydev, MII_LXT970_IER, 0);
|
err = phy_write(phydev, MII_LXT970_IER, 0);
|
||||||
|
@ -114,7 +114,7 @@ static int lxt971_config_intr(struct phy_device *phydev)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if(phydev->interrupts == PHY_INTERRUPT_ENABLED)
|
if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
|
||||||
err = phy_write(phydev, MII_LXT971_IER, MII_LXT971_IER_IEN);
|
err = phy_write(phydev, MII_LXT971_IER, MII_LXT971_IER_IEN);
|
||||||
else
|
else
|
||||||
err = phy_write(phydev, MII_LXT971_IER, 0);
|
err = phy_write(phydev, MII_LXT971_IER, 0);
|
||||||
|
|
|
@ -316,8 +316,8 @@ static int mdio_bus_match(struct device *dev, struct device_driver *drv)
|
||||||
if (phydrv->match_phy_device)
|
if (phydrv->match_phy_device)
|
||||||
return phydrv->match_phy_device(phydev);
|
return phydrv->match_phy_device(phydev);
|
||||||
|
|
||||||
return ((phydrv->phy_id & phydrv->phy_id_mask) ==
|
return (phydrv->phy_id & phydrv->phy_id_mask) ==
|
||||||
(phydev->phy_id & phydrv->phy_id_mask));
|
(phydev->phy_id & phydrv->phy_id_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
|
|
|
@ -332,7 +332,7 @@ int phy_mii_ioctl(struct phy_device *phydev,
|
||||||
|
|
||||||
case SIOCSMIIREG:
|
case SIOCSMIIREG:
|
||||||
if (mii_data->phy_id == phydev->addr) {
|
if (mii_data->phy_id == phydev->addr) {
|
||||||
switch(mii_data->reg_num) {
|
switch (mii_data->reg_num) {
|
||||||
case MII_BMCR:
|
case MII_BMCR:
|
||||||
if ((val & (BMCR_RESET|BMCR_ANENABLE)) == 0)
|
if ((val & (BMCR_RESET|BMCR_ANENABLE)) == 0)
|
||||||
phydev->autoneg = AUTONEG_DISABLE;
|
phydev->autoneg = AUTONEG_DISABLE;
|
||||||
|
@ -747,7 +747,7 @@ void phy_state_machine(struct work_struct *work)
|
||||||
if (phydev->adjust_state)
|
if (phydev->adjust_state)
|
||||||
phydev->adjust_state(phydev->attached_dev);
|
phydev->adjust_state(phydev->attached_dev);
|
||||||
|
|
||||||
switch(phydev->state) {
|
switch (phydev->state) {
|
||||||
case PHY_DOWN:
|
case PHY_DOWN:
|
||||||
case PHY_STARTING:
|
case PHY_STARTING:
|
||||||
case PHY_READY:
|
case PHY_READY:
|
||||||
|
|
|
@ -162,7 +162,7 @@ struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id,
|
||||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||||
|
|
||||||
if (NULL == dev)
|
if (NULL == dev)
|
||||||
return (struct phy_device*) PTR_ERR((void*)-ENOMEM);
|
return (struct phy_device *)PTR_ERR((void *)-ENOMEM);
|
||||||
|
|
||||||
dev->dev.release = phy_device_release;
|
dev->dev.release = phy_device_release;
|
||||||
|
|
||||||
|
@ -459,7 +459,7 @@ EXPORT_SYMBOL(phy_connect_direct);
|
||||||
* choose to call only the subset of functions which provide
|
* choose to call only the subset of functions which provide
|
||||||
* the desired functionality.
|
* the desired functionality.
|
||||||
*/
|
*/
|
||||||
struct phy_device * phy_connect(struct net_device *dev, const char *bus_id,
|
struct phy_device *phy_connect(struct net_device *dev, const char *bus_id,
|
||||||
void (*handler)(struct net_device *),
|
void (*handler)(struct net_device *),
|
||||||
phy_interface_t interface)
|
phy_interface_t interface)
|
||||||
{
|
{
|
||||||
|
@ -972,7 +972,7 @@ int genphy_read_status(struct phy_device *phydev)
|
||||||
if (lpa & LPA_10FULL)
|
if (lpa & LPA_10FULL)
|
||||||
phydev->duplex = DUPLEX_FULL;
|
phydev->duplex = DUPLEX_FULL;
|
||||||
|
|
||||||
if (phydev->duplex == DUPLEX_FULL){
|
if (phydev->duplex == DUPLEX_FULL) {
|
||||||
phydev->pause = lpa & LPA_PAUSE_CAP ? 1 : 0;
|
phydev->pause = lpa & LPA_PAUSE_CAP ? 1 : 0;
|
||||||
phydev->asym_pause = lpa & LPA_PAUSE_ASYM ? 1 : 0;
|
phydev->asym_pause = lpa & LPA_PAUSE_ASYM ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
@ -1213,7 +1213,7 @@ static struct phy_driver genphy_driver = {
|
||||||
.read_status = genphy_read_status,
|
.read_status = genphy_read_status,
|
||||||
.suspend = genphy_suspend,
|
.suspend = genphy_suspend,
|
||||||
.resume = genphy_resume,
|
.resume = genphy_resume,
|
||||||
.driver = {.owner= THIS_MODULE, },
|
.driver = { .owner = THIS_MODULE, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init phy_init(void)
|
static int __init phy_init(void)
|
||||||
|
|
|
@ -171,14 +171,14 @@ static int ks8995_write(struct ks8995_switch *ks, char *buf,
|
||||||
|
|
||||||
static inline int ks8995_read_reg(struct ks8995_switch *ks, u8 addr, u8 *buf)
|
static inline int ks8995_read_reg(struct ks8995_switch *ks, u8 addr, u8 *buf)
|
||||||
{
|
{
|
||||||
return (ks8995_read(ks, buf, addr, 1) != 1);
|
return ks8995_read(ks, buf, addr, 1) != 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int ks8995_write_reg(struct ks8995_switch *ks, u8 addr, u8 val)
|
static inline int ks8995_write_reg(struct ks8995_switch *ks, u8 addr, u8 val)
|
||||||
{
|
{
|
||||||
char buf = val;
|
char buf = val;
|
||||||
|
|
||||||
return (ks8995_write(ks, &buf, addr, 1) != 1);
|
return ks8995_write(ks, &buf, addr, 1) != 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------------ */
|
||||||
|
|
Loading…
Add table
Reference in a new issue