]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/scsi/lpfc/lpfc_ct.c
scsi: lpfc: Fix FDMI manufacturer attribute value
[mirror_ubuntu-bionic-kernel.git] / drivers / scsi / lpfc / lpfc_ct.c
index ebe8ac1b88e726876c30577d912209daa79d5322..efd12ce7279e96136916fd2b9ab7ae24932f68de 100644 (file)
@@ -1211,7 +1211,7 @@ lpfc_vport_symbolic_port_name(struct lpfc_vport *vport, char *symbol,
         * Name object.  NPIV is not in play so this integer
         * value is sufficient and unique per FC-ID.
         */
-       n = snprintf(symbol, size, "%d", vport->phba->brd_no);
+       n = scnprintf(symbol, size, "%d", vport->phba->brd_no);
        return n;
 }
 
@@ -1225,26 +1225,26 @@ lpfc_vport_symbolic_node_name(struct lpfc_vport *vport, char *symbol,
 
        lpfc_decode_firmware_rev(vport->phba, fwrev, 0);
 
-       n = snprintf(symbol, size, "Emulex %s", vport->phba->ModelName);
+       n = scnprintf(symbol, size, "Emulex %s", vport->phba->ModelName);
        if (size < n)
                return n;
 
-       n += snprintf(symbol + n, size - n, " FV%s", fwrev);
+       n += scnprintf(symbol + n, size - n, " FV%s", fwrev);
        if (size < n)
                return n;
 
-       n += snprintf(symbol + n, size - n, " DV%s.",
+       n += scnprintf(symbol + n, size - n, " DV%s.",
                      lpfc_release_version);
        if (size < n)
                return n;
 
-       n += snprintf(symbol + n, size - n, " HN:%s.",
+       n += scnprintf(symbol + n, size - n, " HN:%s.",
                      init_utsname()->nodename);
        if (size < n)
                return n;
 
        /* Note :- OS name is "Linux" */
-       n += snprintf(symbol + n, size - n, " OS:%s\n",
+       n += scnprintf(symbol + n, size - n, " OS:%s\n",
                      init_utsname()->sysname);
        return n;
 }
@@ -1753,6 +1753,9 @@ lpfc_fdmi_hba_attr_manufacturer(struct lpfc_vport *vport,
        ae = (struct lpfc_fdmi_attr_entry *)&ad->AttrValue;
        memset(ae, 0, 256);
 
+       /* This string MUST be consistent with other FC platforms
+        * supported by Broadcom.
+        */
        strncpy(ae->un.AttrString,
                "Emulex Corporation",
                       sizeof(ae->un.AttrString));