[dpdk-dev] [PATCH 1/2] net/bnx2x: cleanup info logs
Ferruh Yigit
ferruh.yigit at intel.com
Fri Nov 16 12:26:06 CET 2018
On 11/14/2018 6:17 PM, Mody, Rasesh wrote:
> Reduced number of INFO logs in BNX2X PMD by converting some INFO
> logs to DEBUG and few NOTICE logs to INFO, removing extra new lines,
> printing banner bar once for the adapter and device specific info.
>
> Fixes: ba7eeb035a5f ("net/bnx2x: fix logging to include device name")
> Fixes: 540a211084a7 ("bnx2x: driver core")
> Cc: stable at dpdk.org
>
> Signed-off-by: Rasesh Mody <rasesh.mody at cavium.com>
<...>
> + PMD_INIT_FUNC_TRACE(sc);
> + offset = offsetof(struct shmem_region,
> + dev_info.port_hw_config[0].external_phy_config);
> + if (sc->link_vars.phy_flags & PHY_XGXS_FLAG)
> + ext_phy_type = ELINK_XGXS_EXT_PHY_TYPE(REG_RD(sc,
> + sc->
> + devinfo.
> + shmem_base
> + + offset));
> + else
> + ext_phy_type = ELINK_SERDES_EXT_PHY_TYPE(REG_RD(sc,
> + sc->
> + devinfo.
> + shmem_base
> + + offset));
This looks ugly and hard to read, to avoid multi line derefernce,
What do you think:
reg_val = REG_RD(sc, sc->devinfo.shmem_base + offset);
ext_phy_type = ELINK_SERDES_EXT_PHY_TYPE(reg_val);
More information about the dev
mailing list