summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qib/qib_eeprom.c
diff options
context:
space:
mode:
authorMike Marciniszyn <mike.marciniszyn@intel.com>2015-01-16 10:50:32 -0500
committerRoland Dreier <roland@purestorage.com>2015-02-17 10:26:19 -0800
commit041af0bb765a5fd3a9206352ed9ec510a554f886 (patch)
tree5ffd7f382490fc41370c89498a2dadf607637d71 /drivers/infiniband/hw/qib/qib_eeprom.c
parent590c3fec2dbfc07f1dbdb992f9f213a9f71d7719 (diff)
downloadlinux-041af0bb765a5fd3a9206352ed9ec510a554f886.tar.gz
linux-041af0bb765a5fd3a9206352ed9ec510a554f886.tar.bz2
linux-041af0bb765a5fd3a9206352ed9ec510a554f886.zip
IB/qib: Fix sizeof checkpatch warnings
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_eeprom.c')
-rw-r--r--drivers/infiniband/hw/qib/qib_eeprom.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/qib/qib_eeprom.c b/drivers/infiniband/hw/qib/qib_eeprom.c
index e2280b07df02..c1a8f448d2a7 100644
--- a/drivers/infiniband/hw/qib/qib_eeprom.c
+++ b/drivers/infiniband/hw/qib/qib_eeprom.c
@@ -251,17 +251,17 @@ void qib_get_eeprom_info(struct qib_devdata *dd)
* This board has a Serial-prefix, which is stored
* elsewhere for backward-compatibility.
*/
- memcpy(snp, ifp->if_sprefix, sizeof ifp->if_sprefix);
- snp[sizeof ifp->if_sprefix] = '\0';
+ memcpy(snp, ifp->if_sprefix, sizeof(ifp->if_sprefix));
+ snp[sizeof(ifp->if_sprefix)] = '\0';
len = strlen(snp);
snp += len;
- len = (sizeof dd->serial) - len;
- if (len > sizeof ifp->if_serial)
- len = sizeof ifp->if_serial;
+ len = sizeof(dd->serial) - len;
+ if (len > sizeof(ifp->if_serial))
+ len = sizeof(ifp->if_serial);
memcpy(snp, ifp->if_serial, len);
} else
memcpy(dd->serial, ifp->if_serial,
- sizeof ifp->if_serial);
+ sizeof(ifp->if_serial));
if (!strstr(ifp->if_comment, "Tested successfully"))
qib_dev_err(dd,
"Board SN %s did not pass functional test: %s\n",