diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/be2iscsi/be_iscsi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/be2iscsi/be_iscsi.h | 2 | ||||
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.c | 12 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfad_debugfs.c | 2 | ||||
-rw-r--r-- | drivers/scsi/bnx2i/bnx2i_iscsi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/cxgbi/libcxgbi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/cxgbi/libcxgbi.h | 2 | ||||
-rw-r--r-- | drivers/scsi/iscsi_boot_sysfs.c | 14 | ||||
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 10 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_iscsi.c | 8 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_spi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsicam.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sg.c | 7 |
14 files changed, 33 insertions, 35 deletions
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c index 8b002f6db6ca..33c8f09c7ac1 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.c +++ b/drivers/scsi/be2iscsi/be_iscsi.c | |||
@@ -733,7 +733,7 @@ void beiscsi_ep_disconnect(struct iscsi_endpoint *ep) | |||
733 | iscsi_destroy_endpoint(beiscsi_ep->openiscsi_ep); | 733 | iscsi_destroy_endpoint(beiscsi_ep->openiscsi_ep); |
734 | } | 734 | } |
735 | 735 | ||
736 | mode_t be2iscsi_attr_is_visible(int param_type, int param) | 736 | umode_t be2iscsi_attr_is_visible(int param_type, int param) |
737 | { | 737 | { |
738 | switch (param_type) { | 738 | switch (param_type) { |
739 | case ISCSI_HOST_PARAM: | 739 | case ISCSI_HOST_PARAM: |
diff --git a/drivers/scsi/be2iscsi/be_iscsi.h b/drivers/scsi/be2iscsi/be_iscsi.h index 4a1f2e393f31..5c45be134501 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.h +++ b/drivers/scsi/be2iscsi/be_iscsi.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #define BE2_IPV4 0x1 | 26 | #define BE2_IPV4 0x1 |
27 | #define BE2_IPV6 0x10 | 27 | #define BE2_IPV6 0x10 |
28 | 28 | ||
29 | mode_t be2iscsi_attr_is_visible(int param_type, int param); | 29 | umode_t be2iscsi_attr_is_visible(int param_type, int param); |
30 | 30 | ||
31 | void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn, | 31 | void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn, |
32 | struct beiscsi_offload_params *params); | 32 | struct beiscsi_offload_params *params); |
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 379c696dac19..797a43994b55 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c | |||
@@ -325,9 +325,9 @@ static ssize_t beiscsi_show_boot_eth_info(void *data, int type, char *buf) | |||
325 | } | 325 | } |
326 | 326 | ||
327 | 327 | ||
328 | static mode_t beiscsi_tgt_get_attr_visibility(void *data, int type) | 328 | static umode_t beiscsi_tgt_get_attr_visibility(void *data, int type) |
329 | { | 329 | { |
330 | int rc; | 330 | umode_t rc; |
331 | 331 | ||
332 | switch (type) { | 332 | switch (type) { |
333 | case ISCSI_BOOT_TGT_NAME: | 333 | case ISCSI_BOOT_TGT_NAME: |
@@ -348,9 +348,9 @@ static mode_t beiscsi_tgt_get_attr_visibility(void *data, int type) | |||
348 | return rc; | 348 | return rc; |
349 | } | 349 | } |
350 | 350 | ||
351 | static mode_t beiscsi_ini_get_attr_visibility(void *data, int type) | 351 | static umode_t beiscsi_ini_get_attr_visibility(void *data, int type) |
352 | { | 352 | { |
353 | int rc; | 353 | umode_t rc; |
354 | 354 | ||
355 | switch (type) { | 355 | switch (type) { |
356 | case ISCSI_BOOT_INI_INITIATOR_NAME: | 356 | case ISCSI_BOOT_INI_INITIATOR_NAME: |
@@ -364,9 +364,9 @@ static mode_t beiscsi_ini_get_attr_visibility(void *data, int type) | |||
364 | } | 364 | } |
365 | 365 | ||
366 | 366 | ||
367 | static mode_t beiscsi_eth_get_attr_visibility(void *data, int type) | 367 | static umode_t beiscsi_eth_get_attr_visibility(void *data, int type) |
368 | { | 368 | { |
369 | int rc; | 369 | umode_t rc; |
370 | 370 | ||
371 | switch (type) { | 371 | switch (type) { |
372 | case ISCSI_BOOT_ETH_FLAGS: | 372 | case ISCSI_BOOT_ETH_FLAGS: |
diff --git a/drivers/scsi/bfa/bfad_debugfs.c b/drivers/scsi/bfa/bfad_debugfs.c index dee1a094c2c2..caca9b7c8309 100644 --- a/drivers/scsi/bfa/bfad_debugfs.c +++ b/drivers/scsi/bfa/bfad_debugfs.c | |||
@@ -472,7 +472,7 @@ static const struct file_operations bfad_debugfs_op_regwr = { | |||
472 | 472 | ||
473 | struct bfad_debugfs_entry { | 473 | struct bfad_debugfs_entry { |
474 | const char *name; | 474 | const char *name; |
475 | mode_t mode; | 475 | umode_t mode; |
476 | const struct file_operations *fops; | 476 | const struct file_operations *fops; |
477 | }; | 477 | }; |
478 | 478 | ||
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c index d1e697190970..1a44b45e7bef 100644 --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c | |||
@@ -2177,7 +2177,7 @@ static int bnx2i_nl_set_path(struct Scsi_Host *shost, struct iscsi_path *params) | |||
2177 | return 0; | 2177 | return 0; |
2178 | } | 2178 | } |
2179 | 2179 | ||
2180 | static mode_t bnx2i_attr_is_visible(int param_type, int param) | 2180 | static umode_t bnx2i_attr_is_visible(int param_type, int param) |
2181 | { | 2181 | { |
2182 | switch (param_type) { | 2182 | switch (param_type) { |
2183 | case ISCSI_HOST_PARAM: | 2183 | case ISCSI_HOST_PARAM: |
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c index 1d25a87aa47b..c5360ffb4bed 100644 --- a/drivers/scsi/cxgbi/libcxgbi.c +++ b/drivers/scsi/cxgbi/libcxgbi.c | |||
@@ -2575,7 +2575,7 @@ void cxgbi_iscsi_cleanup(struct iscsi_transport *itp, | |||
2575 | } | 2575 | } |
2576 | EXPORT_SYMBOL_GPL(cxgbi_iscsi_cleanup); | 2576 | EXPORT_SYMBOL_GPL(cxgbi_iscsi_cleanup); |
2577 | 2577 | ||
2578 | mode_t cxgbi_attr_is_visible(int param_type, int param) | 2578 | umode_t cxgbi_attr_is_visible(int param_type, int param) |
2579 | { | 2579 | { |
2580 | switch (param_type) { | 2580 | switch (param_type) { |
2581 | case ISCSI_HOST_PARAM: | 2581 | case ISCSI_HOST_PARAM: |
diff --git a/drivers/scsi/cxgbi/libcxgbi.h b/drivers/scsi/cxgbi/libcxgbi.h index 20c88279c7a6..80fa99b3d384 100644 --- a/drivers/scsi/cxgbi/libcxgbi.h +++ b/drivers/scsi/cxgbi/libcxgbi.h | |||
@@ -709,7 +709,7 @@ int cxgbi_conn_xmit_pdu(struct iscsi_task *); | |||
709 | 709 | ||
710 | void cxgbi_cleanup_task(struct iscsi_task *task); | 710 | void cxgbi_cleanup_task(struct iscsi_task *task); |
711 | 711 | ||
712 | mode_t cxgbi_attr_is_visible(int param_type, int param); | 712 | umode_t cxgbi_attr_is_visible(int param_type, int param); |
713 | void cxgbi_get_conn_stats(struct iscsi_cls_conn *, struct iscsi_stats *); | 713 | void cxgbi_get_conn_stats(struct iscsi_cls_conn *, struct iscsi_stats *); |
714 | int cxgbi_set_conn_param(struct iscsi_cls_conn *, | 714 | int cxgbi_set_conn_param(struct iscsi_cls_conn *, |
715 | enum iscsi_param, char *, int); | 715 | enum iscsi_param, char *, int); |
diff --git a/drivers/scsi/iscsi_boot_sysfs.c b/drivers/scsi/iscsi_boot_sysfs.c index 89700cbca16e..14c1c8f6a95e 100644 --- a/drivers/scsi/iscsi_boot_sysfs.c +++ b/drivers/scsi/iscsi_boot_sysfs.c | |||
@@ -112,7 +112,7 @@ static struct attribute *target_attrs[] = { | |||
112 | NULL | 112 | NULL |
113 | }; | 113 | }; |
114 | 114 | ||
115 | static mode_t iscsi_boot_tgt_attr_is_visible(struct kobject *kobj, | 115 | static umode_t iscsi_boot_tgt_attr_is_visible(struct kobject *kobj, |
116 | struct attribute *attr, int i) | 116 | struct attribute *attr, int i) |
117 | { | 117 | { |
118 | struct iscsi_boot_kobj *boot_kobj = | 118 | struct iscsi_boot_kobj *boot_kobj = |
@@ -193,7 +193,7 @@ static struct attribute *ethernet_attrs[] = { | |||
193 | NULL | 193 | NULL |
194 | }; | 194 | }; |
195 | 195 | ||
196 | static mode_t iscsi_boot_eth_attr_is_visible(struct kobject *kobj, | 196 | static umode_t iscsi_boot_eth_attr_is_visible(struct kobject *kobj, |
197 | struct attribute *attr, int i) | 197 | struct attribute *attr, int i) |
198 | { | 198 | { |
199 | struct iscsi_boot_kobj *boot_kobj = | 199 | struct iscsi_boot_kobj *boot_kobj = |
@@ -265,7 +265,7 @@ static struct attribute *initiator_attrs[] = { | |||
265 | NULL | 265 | NULL |
266 | }; | 266 | }; |
267 | 267 | ||
268 | static mode_t iscsi_boot_ini_attr_is_visible(struct kobject *kobj, | 268 | static umode_t iscsi_boot_ini_attr_is_visible(struct kobject *kobj, |
269 | struct attribute *attr, int i) | 269 | struct attribute *attr, int i) |
270 | { | 270 | { |
271 | struct iscsi_boot_kobj *boot_kobj = | 271 | struct iscsi_boot_kobj *boot_kobj = |
@@ -306,7 +306,7 @@ iscsi_boot_create_kobj(struct iscsi_boot_kset *boot_kset, | |||
306 | struct attribute_group *attr_group, | 306 | struct attribute_group *attr_group, |
307 | const char *name, int index, void *data, | 307 | const char *name, int index, void *data, |
308 | ssize_t (*show) (void *data, int type, char *buf), | 308 | ssize_t (*show) (void *data, int type, char *buf), |
309 | mode_t (*is_visible) (void *data, int type), | 309 | umode_t (*is_visible) (void *data, int type), |
310 | void (*release) (void *data)) | 310 | void (*release) (void *data)) |
311 | { | 311 | { |
312 | struct iscsi_boot_kobj *boot_kobj; | 312 | struct iscsi_boot_kobj *boot_kobj; |
@@ -369,7 +369,7 @@ struct iscsi_boot_kobj * | |||
369 | iscsi_boot_create_target(struct iscsi_boot_kset *boot_kset, int index, | 369 | iscsi_boot_create_target(struct iscsi_boot_kset *boot_kset, int index, |
370 | void *data, | 370 | void *data, |
371 | ssize_t (*show) (void *data, int type, char *buf), | 371 | ssize_t (*show) (void *data, int type, char *buf), |
372 | mode_t (*is_visible) (void *data, int type), | 372 | umode_t (*is_visible) (void *data, int type), |
373 | void (*release) (void *data)) | 373 | void (*release) (void *data)) |
374 | { | 374 | { |
375 | return iscsi_boot_create_kobj(boot_kset, &iscsi_boot_target_attr_group, | 375 | return iscsi_boot_create_kobj(boot_kset, &iscsi_boot_target_attr_group, |
@@ -394,7 +394,7 @@ struct iscsi_boot_kobj * | |||
394 | iscsi_boot_create_initiator(struct iscsi_boot_kset *boot_kset, int index, | 394 | iscsi_boot_create_initiator(struct iscsi_boot_kset *boot_kset, int index, |
395 | void *data, | 395 | void *data, |
396 | ssize_t (*show) (void *data, int type, char *buf), | 396 | ssize_t (*show) (void *data, int type, char *buf), |
397 | mode_t (*is_visible) (void *data, int type), | 397 | umode_t (*is_visible) (void *data, int type), |
398 | void (*release) (void *data)) | 398 | void (*release) (void *data)) |
399 | { | 399 | { |
400 | return iscsi_boot_create_kobj(boot_kset, | 400 | return iscsi_boot_create_kobj(boot_kset, |
@@ -420,7 +420,7 @@ struct iscsi_boot_kobj * | |||
420 | iscsi_boot_create_ethernet(struct iscsi_boot_kset *boot_kset, int index, | 420 | iscsi_boot_create_ethernet(struct iscsi_boot_kset *boot_kset, int index, |
421 | void *data, | 421 | void *data, |
422 | ssize_t (*show) (void *data, int type, char *buf), | 422 | ssize_t (*show) (void *data, int type, char *buf), |
423 | mode_t (*is_visible) (void *data, int type), | 423 | umode_t (*is_visible) (void *data, int type), |
424 | void (*release) (void *data)) | 424 | void (*release) (void *data)) |
425 | { | 425 | { |
426 | return iscsi_boot_create_kobj(boot_kset, | 426 | return iscsi_boot_create_kobj(boot_kset, |
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 7c34d8e7cc75..db47158e0dde 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -873,7 +873,7 @@ static void iscsi_sw_tcp_session_destroy(struct iscsi_cls_session *cls_session) | |||
873 | iscsi_host_free(shost); | 873 | iscsi_host_free(shost); |
874 | } | 874 | } |
875 | 875 | ||
876 | static mode_t iscsi_sw_tcp_attr_is_visible(int param_type, int param) | 876 | static umode_t iscsi_sw_tcp_attr_is_visible(int param_type, int param) |
877 | { | 877 | { |
878 | switch (param_type) { | 878 | switch (param_type) { |
879 | case ISCSI_HOST_PARAM: | 879 | case ISCSI_HOST_PARAM: |
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 4169c8baa112..78bf700b365f 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -128,7 +128,7 @@ static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd); | |||
128 | static int qla4xxx_slave_alloc(struct scsi_device *device); | 128 | static int qla4xxx_slave_alloc(struct scsi_device *device); |
129 | static int qla4xxx_slave_configure(struct scsi_device *device); | 129 | static int qla4xxx_slave_configure(struct scsi_device *device); |
130 | static void qla4xxx_slave_destroy(struct scsi_device *sdev); | 130 | static void qla4xxx_slave_destroy(struct scsi_device *sdev); |
131 | static mode_t ql4_attr_is_visible(int param_type, int param); | 131 | static umode_t ql4_attr_is_visible(int param_type, int param); |
132 | static int qla4xxx_host_reset(struct Scsi_Host *shost, int reset_type); | 132 | static int qla4xxx_host_reset(struct Scsi_Host *shost, int reset_type); |
133 | 133 | ||
134 | static struct qla4_8xxx_legacy_intr_set legacy_intr[] = | 134 | static struct qla4_8xxx_legacy_intr_set legacy_intr[] = |
@@ -197,7 +197,7 @@ static struct iscsi_transport qla4xxx_iscsi_transport = { | |||
197 | 197 | ||
198 | static struct scsi_transport_template *qla4xxx_scsi_transport; | 198 | static struct scsi_transport_template *qla4xxx_scsi_transport; |
199 | 199 | ||
200 | static mode_t ql4_attr_is_visible(int param_type, int param) | 200 | static umode_t ql4_attr_is_visible(int param_type, int param) |
201 | { | 201 | { |
202 | switch (param_type) { | 202 | switch (param_type) { |
203 | case ISCSI_HOST_PARAM: | 203 | case ISCSI_HOST_PARAM: |
@@ -3039,7 +3039,7 @@ static ssize_t qla4xxx_show_boot_eth_info(void *data, int type, char *buf) | |||
3039 | return rc; | 3039 | return rc; |
3040 | } | 3040 | } |
3041 | 3041 | ||
3042 | static mode_t qla4xxx_eth_get_attr_visibility(void *data, int type) | 3042 | static umode_t qla4xxx_eth_get_attr_visibility(void *data, int type) |
3043 | { | 3043 | { |
3044 | int rc; | 3044 | int rc; |
3045 | 3045 | ||
@@ -3073,7 +3073,7 @@ static ssize_t qla4xxx_show_boot_ini_info(void *data, int type, char *buf) | |||
3073 | return rc; | 3073 | return rc; |
3074 | } | 3074 | } |
3075 | 3075 | ||
3076 | static mode_t qla4xxx_ini_get_attr_visibility(void *data, int type) | 3076 | static umode_t qla4xxx_ini_get_attr_visibility(void *data, int type) |
3077 | { | 3077 | { |
3078 | int rc; | 3078 | int rc; |
3079 | 3079 | ||
@@ -3160,7 +3160,7 @@ static ssize_t qla4xxx_show_boot_tgt_sec_info(void *data, int type, char *buf) | |||
3160 | return qla4xxx_show_boot_tgt_info(boot_sess, type, buf); | 3160 | return qla4xxx_show_boot_tgt_info(boot_sess, type, buf); |
3161 | } | 3161 | } |
3162 | 3162 | ||
3163 | static mode_t qla4xxx_tgt_get_attr_visibility(void *data, int type) | 3163 | static umode_t qla4xxx_tgt_get_attr_visibility(void *data, int type) |
3164 | { | 3164 | { |
3165 | int rc; | 3165 | int rc; |
3166 | 3166 | ||
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 96029e6d027f..e8447fbc31f3 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -328,7 +328,7 @@ iscsi_iface_net_attr(iface, vlan_enabled, ISCSI_NET_PARAM_VLAN_ENABLED); | |||
328 | iscsi_iface_net_attr(iface, mtu, ISCSI_NET_PARAM_MTU); | 328 | iscsi_iface_net_attr(iface, mtu, ISCSI_NET_PARAM_MTU); |
329 | iscsi_iface_net_attr(iface, port, ISCSI_NET_PARAM_PORT); | 329 | iscsi_iface_net_attr(iface, port, ISCSI_NET_PARAM_PORT); |
330 | 330 | ||
331 | static mode_t iscsi_iface_attr_is_visible(struct kobject *kobj, | 331 | static umode_t iscsi_iface_attr_is_visible(struct kobject *kobj, |
332 | struct attribute *attr, int i) | 332 | struct attribute *attr, int i) |
333 | { | 333 | { |
334 | struct device *dev = container_of(kobj, struct device, kobj); | 334 | struct device *dev = container_of(kobj, struct device, kobj); |
@@ -2199,7 +2199,7 @@ static struct attribute *iscsi_conn_attrs[] = { | |||
2199 | NULL, | 2199 | NULL, |
2200 | }; | 2200 | }; |
2201 | 2201 | ||
2202 | static mode_t iscsi_conn_attr_is_visible(struct kobject *kobj, | 2202 | static umode_t iscsi_conn_attr_is_visible(struct kobject *kobj, |
2203 | struct attribute *attr, int i) | 2203 | struct attribute *attr, int i) |
2204 | { | 2204 | { |
2205 | struct device *cdev = container_of(kobj, struct device, kobj); | 2205 | struct device *cdev = container_of(kobj, struct device, kobj); |
@@ -2370,7 +2370,7 @@ static struct attribute *iscsi_session_attrs[] = { | |||
2370 | NULL, | 2370 | NULL, |
2371 | }; | 2371 | }; |
2372 | 2372 | ||
2373 | static mode_t iscsi_session_attr_is_visible(struct kobject *kobj, | 2373 | static umode_t iscsi_session_attr_is_visible(struct kobject *kobj, |
2374 | struct attribute *attr, int i) | 2374 | struct attribute *attr, int i) |
2375 | { | 2375 | { |
2376 | struct device *cdev = container_of(kobj, struct device, kobj); | 2376 | struct device *cdev = container_of(kobj, struct device, kobj); |
@@ -2468,7 +2468,7 @@ static struct attribute *iscsi_host_attrs[] = { | |||
2468 | NULL, | 2468 | NULL, |
2469 | }; | 2469 | }; |
2470 | 2470 | ||
2471 | static mode_t iscsi_host_attr_is_visible(struct kobject *kobj, | 2471 | static umode_t iscsi_host_attr_is_visible(struct kobject *kobj, |
2472 | struct attribute *attr, int i) | 2472 | struct attribute *attr, int i) |
2473 | { | 2473 | { |
2474 | struct device *cdev = container_of(kobj, struct device, kobj); | 2474 | struct device *cdev = container_of(kobj, struct device, kobj); |
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index 5fbeadd96819..a2715c31e754 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c | |||
@@ -1434,7 +1434,7 @@ static int spi_host_configure(struct transport_container *tc, | |||
1434 | (si->f->show_##name ? S_IRUGO : 0) | \ | 1434 | (si->f->show_##name ? S_IRUGO : 0) | \ |
1435 | (si->f->set_##name ? S_IWUSR : 0) | 1435 | (si->f->set_##name ? S_IWUSR : 0) |
1436 | 1436 | ||
1437 | static mode_t target_attribute_is_visible(struct kobject *kobj, | 1437 | static umode_t target_attribute_is_visible(struct kobject *kobj, |
1438 | struct attribute *attr, int i) | 1438 | struct attribute *attr, int i) |
1439 | { | 1439 | { |
1440 | struct device *cdev = container_of(kobj, struct device, kobj); | 1440 | struct device *cdev = container_of(kobj, struct device, kobj); |
diff --git a/drivers/scsi/scsicam.c b/drivers/scsi/scsicam.c index 6803b1e26ecc..92d24d6dcb39 100644 --- a/drivers/scsi/scsicam.c +++ b/drivers/scsi/scsicam.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/genhd.h> | 16 | #include <linux/genhd.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/blkdev.h> | 18 | #include <linux/blkdev.h> |
19 | #include <linux/buffer_head.h> | ||
20 | #include <asm/unaligned.h> | 19 | #include <asm/unaligned.h> |
21 | 20 | ||
22 | #include <scsi/scsicam.h> | 21 | #include <scsi/scsicam.h> |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 441a1c5b8974..02d99982a74d 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -2325,16 +2325,15 @@ static struct sg_proc_leaf sg_proc_leaf_arr[] = { | |||
2325 | static int | 2325 | static int |
2326 | sg_proc_init(void) | 2326 | sg_proc_init(void) |
2327 | { | 2327 | { |
2328 | int k, mask; | ||
2329 | int num_leaves = ARRAY_SIZE(sg_proc_leaf_arr); | 2328 | int num_leaves = ARRAY_SIZE(sg_proc_leaf_arr); |
2330 | struct sg_proc_leaf * leaf; | 2329 | int k; |
2331 | 2330 | ||
2332 | sg_proc_sgp = proc_mkdir(sg_proc_sg_dirname, NULL); | 2331 | sg_proc_sgp = proc_mkdir(sg_proc_sg_dirname, NULL); |
2333 | if (!sg_proc_sgp) | 2332 | if (!sg_proc_sgp) |
2334 | return 1; | 2333 | return 1; |
2335 | for (k = 0; k < num_leaves; ++k) { | 2334 | for (k = 0; k < num_leaves; ++k) { |
2336 | leaf = &sg_proc_leaf_arr[k]; | 2335 | struct sg_proc_leaf *leaf = &sg_proc_leaf_arr[k]; |
2337 | mask = leaf->fops->write ? S_IRUGO | S_IWUSR : S_IRUGO; | 2336 | umode_t mask = leaf->fops->write ? S_IRUGO | S_IWUSR : S_IRUGO; |
2338 | proc_create(leaf->name, mask, sg_proc_sgp, leaf->fops); | 2337 | proc_create(leaf->name, mask, sg_proc_sgp, leaf->fops); |
2339 | } | 2338 | } |
2340 | return 0; | 2339 | return 0; |