Re: [PATCH] IB/rxe: Convert pr_info to pr_warn

Leon Romanovsky
2017-07-19T06:09:08Z

[-- Attachment #1: Type: text/plain, Size: 1543 bytes --]

On Tue, Jul 18, 2017 at 11:35:39PM +0300, Yuval Shaia wrote:
> These messages are warning so let's print them accordingly.
>
> Signed-off-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
> drivers/infiniband/sw/rxe/rxe_av.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c
> index 5bddf469361b..272db3792c50 100644
> --- a/drivers/infiniband/sw/rxe/rxe_av.c
> +++ b/drivers/infiniband/sw/rxe/rxe_av.c
> @@ -39,7 +39,7 @@ int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr)
> struct rxe_port *port;
>
> if (rdma_ah_get_port_num(attr) != 1) {
> - pr_info("invalid port_num = %d\n", rdma_ah_get_port_num(attr));
> + pr_warn("invalid port_num = %d\n", rdma_ah_get_port_num(attr));
> return -EINVAL;
> }

How this code can be executed? IB/core ensures that port_num is in range.
You can remove this check.

>
> @@ -49,7 +49,7 @@ int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr)
> u8 sgid_index = rdma_ah_read_grh(attr)->sgid_index;
>
> if (sgid_index > port->attr.gid_tbl_len) {
> - pr_info("invalid sgid index = %d\n", sgid_index);
> + pr_warn("invalid sgid index = %d\n", sgid_index);
> return -EINVAL;
> }
> }
> --
> 2.13.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]