public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: himanshu.madhani@qlogic.com
Cc: linux-scsi@vger.kernel.org
Subject: re: qla2xxx: Add FDMI-2 functionality.
Date: Fri, 26 Sep 2014 18:08:19 +0300	[thread overview]
Message-ID: <20140926150819.GB11817@mwanda> (raw)

Hello Himanshu Madhani,

The patch df57cabac41f: "qla2xxx: Add FDMI-2 functionality." from Sep
25, 2014, leads to the following static checker warnings:

drivers/scsi/qla2xxx/qla_gs.c:1339 qla2x00_fdmi_rhba() error: snprintf() chops off the last chars of 'ha->model_number': 17 vs 16
drivers/scsi/qla2xxx/qla_gs.c:1628 qla2x00_fdmi_rpa() error: snprintf() chops off the last chars of 'p_sysid->nodename': 65 vs 32
drivers/scsi/qla2xxx/qla_gs.c:1631 qla2x00_fdmi_rpa() error: snprintf() chops off the last chars of '(((vha->host)->shost_data)->system_hostname)': 256 vs 32
drivers/scsi/qla2xxx/qla_gs.c:1763 qla2x00_fdmiv2_rhba() error: snprintf() chops off the last chars of 'ha->model_number': 17 vs 16
drivers/scsi/qla2xxx/qla_gs.c:2195 qla2x00_fdmiv2_rpa() error: snprintf() chops off the last chars of 'p_sysid->nodename': 65 vs 32
drivers/scsi/qla2xxx/qla_gs.c:2198 qla2x00_fdmiv2_rpa() error: snprintf() chops off the last chars of '(((vha->host)->shost_data)->system_hostname)': 256 vs 32

drivers/scsi/qla2xxx/qla_gs.c
  2194          if (p_sysid) {
  2195                  snprintf(eiter->a.host_name, sizeof(eiter->a.host_name),
  2196                      "%s", p_sysid->nodename);

We're chopping most of the hostname off.  That seems bad.

  2197          } else {
  2198                  snprintf(eiter->a.host_name, sizeof(eiter->a.host_name),
  2199                      "%s", fc_host_system_hostname(vha->host));
  2200          }

regards,
dan carpenter

             reply	other threads:[~2014-09-26 15:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 15:08 Dan Carpenter [this message]
2014-09-26 19:50 ` qla2xxx: Add FDMI-2 functionality Himanshu Madhani

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=20140926150819.GB11817@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=himanshu.madhani@qlogic.com \
    --cc=linux-scsi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox