All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: cxgb4: Update mps_tcam output to include T6 fields
Date: Wed, 06 Jan 2016 10:03:46 +0000	[thread overview]
Message-ID: <20160106100346.GF23185@mwanda> (raw)

Hello Hariprasad Shenai,

The patch 115b56af88b5: "cxgb4: Update mps_tcam output to include T6
fields" from Dec 23, 2015, leads to the following static checker
warning:

	drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c:1735 mps_tcam_show()
	warn: we tested 'lookup_type' before and it was 'true'

drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
  1725                          if (lookup_type && (lookup_type != DATALKPTYPE_M)) {
                                    ^^^^^^^^^^^
Is non-zero.

  1726                                  seq_printf(seq,
  1727                                             "%3u %02x:%02x:%02x:%02x:%02x:%02x "
  1728                                             "%012llx %06x %06x    -    -   %3c"
  1729                                             "      %3c  %4x   "
  1730                                             "%3c   %#x%4u%4d", idx, addr[0],
  1731                                             addr[1], addr[2], addr[3],
  1732                                             addr[4], addr[5],
  1733                                             (unsigned long long)mask,
  1734                                             vniy, vnix, dip_hit ? 'Y' : 'N',
  1735                                             lookup_type ? 'I' : 'O', port_num,
                                                   ^^^^^^^^^^^^^^^^^^^^^^^
No need to check.

  1736                                             (cls_lo & T6_SRAM_VLD_F) ? 'Y' : 'N',
  1737                                             PORTMAP_G(cls_hi),
  1738                                             T6_PF_G(cls_lo),
  1739                                             (cls_lo & T6_VF_VALID_F) ?
  1740                                             T6_VF_G(cls_lo) : -1);
  1741                          } else {
  1742                                  seq_printf(seq,
  1743                                             "%3u %02x:%02x:%02x:%02x:%02x:%02x "
  1744                                             "%012llx    -       -   ",
  1745                                             idx, addr[0], addr[1], addr[2],
  1746                                             addr[3], addr[4], addr[5],
  1747                                             (unsigned long long)mask);
  1748  
  1749                                  if (vlan_vld)
  1750                                          seq_printf(seq, "%4u   Y     ", ivlan);
  1751                                  else
  1752                                          seq_puts(seq, "  -    N     ");
  1753  
  1754                                  seq_printf(seq,
  1755                                             "-      %3c  %4x   %3c   %#x%4u%4d",
  1756                                             lookup_type ? 'I' : 'O', port_num,
  1757                                             (cls_lo & T6_SRAM_VLD_F) ? 'Y' : 'N',
  1758                                             PORTMAP_G(cls_hi),
  1759                                             T6_PF_G(cls_lo),
  1760                                             (cls_lo & T6_VF_VALID_F) ?
  1761                                             T6_VF_G(cls_lo) : -1);
  1762                          }

regards,
dan carpenter

                 reply	other threads:[~2016-01-06 10:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160106100346.GF23185@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.