[dpdk-stable] [PATCH 1/2] net/bnx2x: cleanup info logs
Mody, Rasesh
Rasesh.Mody at cavium.com
Sat Nov 17 10:38:38 CET 2018
>From: Ferruh Yigit <ferruh.yigit at intel.com>
>Sent: Friday, November 16, 2018 3:26 AM
>
>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);
Updated patch is sent to avoid multi line dereference.
Thanks!
-Rasesh
More information about the stable
mailing list