summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_netlink.c
diff options
context:
space:
mode:
authorHong zhi guo <honkiko@gmail.com>2013-03-27 06:53:15 +0000
committerDavid S. Miller <davem@davemloft.net>2013-03-28 14:27:24 -0400
commite07ebea0ccfaf627464460eb57d7f2fdbcccf8ec (patch)
treec8f9ba3c8699cafd8d3c490e62f692d4967b9878 /drivers/scsi/scsi_netlink.c
parentb96dc464994cb6d839c3b307b20061b440dc3edb (diff)
scsi: replace obsolete NLMSG_* with type safe nlmsg_*
Signed-off-by: Hong Zhiguo <honkiko@gmail.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi/scsi_netlink.c')
-rw-r--r--drivers/scsi/scsi_netlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_netlink.c b/drivers/scsi/scsi_netlink.c
index 65123a21b97..fe30ea94ffe 100644
--- a/drivers/scsi/scsi_netlink.c
+++ b/drivers/scsi/scsi_netlink.c
@@ -50,7 +50,7 @@ scsi_nl_rcv_msg(struct sk_buff *skb)
u32 rlen;
int err, tport;
- while (skb->len >= NLMSG_SPACE(0)) {
+ while (skb->len >= NLMSG_HDRLEN) {
err = 0;
nlh = nlmsg_hdr(skb);
@@ -70,7 +70,7 @@ scsi_nl_rcv_msg(struct sk_buff *skb)
goto next_msg;
}
- hdr = NLMSG_DATA(nlh);
+ hdr = nlmsg_data(nlh);
if ((hdr->version != SCSI_NL_VERSION) ||
(hdr->magic != SCSI_NL_MAGIC)) {
err = -EPROTOTYPE;