* re: qla2xxx: Add FDMI-2 functionality.
@ 2014-09-26 15:08 Dan Carpenter
2014-09-26 19:50 ` Himanshu Madhani
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-09-26 15:08 UTC (permalink / raw)
To: himanshu.madhani; +Cc: linux-scsi
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
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: qla2xxx: Add FDMI-2 functionality.
2014-09-26 15:08 qla2xxx: Add FDMI-2 functionality Dan Carpenter
@ 2014-09-26 19:50 ` Himanshu Madhani
0 siblings, 0 replies; 2+ messages in thread
From: Himanshu Madhani @ 2014-09-26 19:50 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-scsi
[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]
On 9/26/14, 8:08 AM, "Dan Carpenter" <dan.carpenter@oracle.com> wrote:
>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 }
Thanks for the update Dan, Will send a fix soon.
>
>regards,
>dan carpenter
[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 4335 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-26 19:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-26 15:08 qla2xxx: Add FDMI-2 functionality Dan Carpenter
2014-09-26 19:50 ` Himanshu Madhani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox