Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7745088ybi; Mon, 22 Jul 2019 19:52:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxO01mZFS9KWQqL0pfguhLqKYO4eK1d6d5rwZ05mjxeKqQLdfEHQ7uY0uFRy6uG93d2PtI3 X-Received: by 2002:a63:2b84:: with SMTP id r126mr30057966pgr.308.1563850376161; Mon, 22 Jul 2019 19:52:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563850376; cv=none; d=google.com; s=arc-20160816; b=ejl4VOTBxtxM/Vf7AELD0OJoFz1AJ/+79+J4qnXFJwBMZaOLkIs4fSmW1G4OUzja5/ Paeyurzcqy8vDHO3TzceczcuzLmaPqd9FtbXQoaeLXKuDDPyc726cy0/nsvosPWeFEo6 sPOAm7Nb+U4fP2F3ZcG2yauLD0/KN8hcogKqZnHCnUzhOr6FuwM/2tMbTyi5oNfyOcPY ujWnJy2V9/xI0BAkbj6dn3egFLIrVf0cvMI4UUZe52wmo+fmEBIGfO4blzdGVX6w2G3I oEyfE/p1yHVtAqd4HEnoagMTzwiCbYqerJTsqQFqLDTWBJn/iXSWbxcWXh2TXkgTDOHl au/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=yDcZGwhuKZu3iHdLJjjZrDjT2mDiJYa3/PCuflSwhmE=; b=YCQM9VuIvPz8lqFY/YOWPw9j3Z1wqTZyc8ecPtTicAcpCoaTJa2LIgold0ij5RqJ/Z 9b17Nju3YzErgrYR70WcuEA0R6heHPgt0y9oUsghUVXh8V5Oe8bALKYUez1qfrnFsL+w if8Nte9rbEKVZBJyEkcEuIFe81nQtgpstqtdxlTDO0zWEF/o16jIdgMNAvoPzN0Ufp78 0Hk5d64FxDZ9ynkauDS38yrbz93SbHFGvIoo8lPkb2tItmfkVQOWrtC6HZUZW0CPb2K3 6DEyer7ABf6Qkbmv4XF3/uEYLHLxnMaO+VYax24jsLOHFHEcEkk5x3UOfGw0Bl3ciyfT PPdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dev-mellanox-co-il.20150623.gappssmtp.com header.s=20150623 header.b=JH+WTPvG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.co.il Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b15si10115944pgm.230.2019.07.22.19.52.39; Mon, 22 Jul 2019 19:52:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@dev-mellanox-co-il.20150623.gappssmtp.com header.s=20150623 header.b=JH+WTPvG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.co.il Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729712AbfGVTnI (ORCPT + 99 others); Mon, 22 Jul 2019 15:43:08 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:43499 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727905AbfGVTnI (ORCPT ); Mon, 22 Jul 2019 15:43:08 -0400 Received: by mail-lj1-f196.google.com with SMTP id y17so14181406ljk.10 for ; Mon, 22 Jul 2019 12:43:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev-mellanox-co-il.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yDcZGwhuKZu3iHdLJjjZrDjT2mDiJYa3/PCuflSwhmE=; b=JH+WTPvGR1uJXOfkLig+2OnrW2RKgN80CBOlHfHzmzd4O+bmVrzCRVv79MtxWactpN 5AQJgh8/hKUCP0JLKzw9h/Ia3Zucxwt24sq0z1NWzgC9D7F9JM39IuPnlfeD8HuVZjgZ df1gbXNdbJqX60F6+Y/PKNW/1fE0l4GJwD+5qqqbYRcIBhraAj8DB6QvLVW+D4BcwoSy XbY47a81+I07ouFEfhrSnksjfYHY98ImOhSJYDBYtWMQ1Mjelr3fU9T1Oy9gC9xOVFkv 9z7hQlZHI374PYI2T6OQwIYP1EKvSEMpTqTekwepqb6IjDkwfgi3/YVva8PPoL2m8Qmh Yl4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yDcZGwhuKZu3iHdLJjjZrDjT2mDiJYa3/PCuflSwhmE=; b=sblPfUvAa/MT6jMvR7WUZNV4axxyXbS5ggkxOKloJ7LuKt08FZMsY3tyTMV55ms1IH y4SDonN3j1iVE+ib4dC+uYKKX2gfkGXW0WCjc9+akLrQA7JvgY7xXzexx6dazb9MhfEm Wft6r7Yi7146TS9ZIm0LZSEsfV1VGIPcBSyr5fBaxvYNWM3fS/v9EqNbLuv9jbt+KGJ/ jNFggXbYVrKr1r3LTgPE9yCsJM7Mv08Fb3uBSA+UlHrdX/7nwB25/vdVLvAScI/LjBzC /39Hn/iP7LeWviu1uctB05KNpc0Fy9hewp/5SpHthRjKvwKUOVslFa7LEaWHAtUHeWoi ylEA== X-Gm-Message-State: APjAAAXhLlQHGuKmTWzF8u2B230lkRYfKYouICi+FPXnsCU3u5B0KyNF p//lQn+G7CWFOE6Ygsi1BnA7tcuLeWfhy8vbQTs= X-Received: by 2002:a2e:3604:: with SMTP id d4mr36892450lja.85.1563824585693; Mon, 22 Jul 2019 12:43:05 -0700 (PDT) MIME-Version: 1.0 References: <1563820482-10302-1-git-send-email-cai@lca.pw> <20190722.120901.1770656295609872438.davem@davemloft.net> In-Reply-To: <20190722.120901.1770656295609872438.davem@davemloft.net> From: Saeed Mahameed Date: Mon, 22 Jul 2019 12:42:54 -0700 Message-ID: Subject: Re: [PATCH] net/mlx5: fix -Wtype-limits compilation warnings To: David Miller Cc: Qian Cai , Saeed Mahameed , Leon Romanovsky , Yishai Hadas , Linux Netdev List , RDMA mailing list , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 22, 2019 at 12:09 PM David Miller wrote: > > From: Qian Cai > Date: Mon, 22 Jul 2019 14:34:42 -0400 > > > The commit b9a7ba556207 ("net/mlx5: Use event mask based on device > > capabilities") introduced a few compilation warnings due to it bumps > > MLX5_EVENT_TYPE_MAX from 0x27 to 0x100 which is always greater than > > an "struct {mlx5_eqe|mlx5_nb}.type" that is an "u8". > > > > drivers/net/ethernet/mellanox/mlx5/core/eq.c: In function > > 'mlx5_eq_notifier_register': > > drivers/net/ethernet/mellanox/mlx5/core/eq.c:948:21: warning: comparison > > is always false due to limited range of data type [-Wtype-limits] > > if (nb->event_type >= MLX5_EVENT_TYPE_MAX) > > ^~ > > drivers/net/ethernet/mellanox/mlx5/core/eq.c: In function > > 'mlx5_eq_notifier_unregister': > > drivers/net/ethernet/mellanox/mlx5/core/eq.c:959:21: warning: comparison > > is always false due to limited range of data type [-Wtype-limits] > > if (nb->event_type >= MLX5_EVENT_TYPE_MAX) > > > > Fix them by removing unnecessary checkings. > > > > Fixes: b9a7ba556207 ("net/mlx5: Use event mask based on device capabilities") > > Signed-off-by: Qian Cai > > Saeed, I am assuming that you will take this. Yes, will take it. The patch LGTM, though not applying it yet so others get the chance to review it. will apply it in a couple of days. Thanks, Saeed.