lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <VI1PR0402MB3600514884A873B15ADA4539FF150@VI1PR0402MB3600.eurprd04.prod.outlook.com>
Date:   Tue, 4 Jun 2019 02:51:18 +0000
From:   Andy Duan <fugang.duan@....com>
To:     Fabio Estevam <festevam@...il.com>,
        "davem@...emloft.net" <davem@...emloft.net>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [EXT] [PATCH net-next] net: fec: Use netdev_err() instead of
 pr_err()

From: Fabio Estevam [mailto:festevam@...il.com]
> netdev_err() is more appropriate for printing error messages inside network
> drivers, so switch to netdev_err().
> 
> Signed-off-by: Fabio Estevam <festevam@...il.com>
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 8 ++++----
> drivers/net/ethernet/freescale/fec_ptp.c  | 2 +-
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c
> b/drivers/net/ethernet/freescale/fec_main.c
> index 848defa33d3a..887c6cde1b88 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -2452,24 +2452,24 @@ fec_enet_set_coalesce(struct net_device *ndev,
> struct ethtool_coalesce *ec)
>                 return -EOPNOTSUPP;
> 
>         if (ec->rx_max_coalesced_frames > 255) {
> -               pr_err("Rx coalesced frames exceed hardware
> limitation\n");
> +               netdev_err(ndev, "Rx coalesced frames exceed hardware
> + limitation\n");
>                 return -EINVAL;
>         }
> 
>         if (ec->tx_max_coalesced_frames > 255) {
> -               pr_err("Tx coalesced frame exceed hardware
> limitation\n");
> +               netdev_err(ndev, "Tx coalesced frame exceed hardware
> + limitation\n");
>                 return -EINVAL;
>         }
> 
>         cycle = fec_enet_us_to_itr_clock(ndev, fep->rx_time_itr);
>         if (cycle > 0xFFFF) {
> -               pr_err("Rx coalesced usec exceed hardware
> limitation\n");
> +               netdev_err(ndev, "Rx coalesced usec exceed hardware
> + limitation\n");
>                 return -EINVAL;
>         }
> 
>         cycle = fec_enet_us_to_itr_clock(ndev, fep->tx_time_itr);
>         if (cycle > 0xFFFF) {
> -               pr_err("Rx coalesced usec exceed hardware
> limitation\n");
> +               netdev_err(ndev, "Rx coalesced usec exceed hardware
> + limitation\n");
>                 return -EINVAL;
>         }
> 
> diff --git a/drivers/net/ethernet/freescale/fec_ptp.c
> b/drivers/net/ethernet/freescale/fec_ptp.c
> index 7e892b1cbd3d..1d7ea4604b83 100644
> --- a/drivers/net/ethernet/freescale/fec_ptp.c
> +++ b/drivers/net/ethernet/freescale/fec_ptp.c
> @@ -617,7 +617,7 @@ void fec_ptp_init(struct platform_device *pdev, int
> irq_idx)
>         fep->ptp_clock = ptp_clock_register(&fep->ptp_caps, &pdev->dev);
>         if (IS_ERR(fep->ptp_clock)) {
>                 fep->ptp_clock = NULL;
> -               pr_err("ptp_clock_register failed\n");
> +               netdev_err(ndev, "ptp_clock_register failed\n");
Here, I suggest to use dev_err() since ndev still is not registered.
>         }
> 
>         schedule_delayed_work(&fep->time_keep, HZ);
> --
> 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ