Commit d5db84a8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'scsi-target-for-v4.10' of...

Merge branch 'scsi-target-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/bvanassche/linux

Pull scsi target cleanups from Bart Van Assche:
 "The changes here are:

   - a few small bug fixes for the iSCSI and user space target drivers.

   - minimize the target build time by about 30% by rearranging #include
     directives

   - fix the second argument passed to percpu_ida_alloc()

   - reduce the number of false positive warnings reported by sparse

  These patches pass Wu Fengguang's build bot tests and also the
  linux-next tests"

* 'scsi-target-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/bvanassche/linux:
  iscsi-target: Return error if unable to add network portal
  target: Fix spelling mistake and unwrap multi-line text
  target/iscsi: Fix double free in lio_target_tiqn_addtpg()
  target/user: Fix use-after-free of tcmu_cmds if they are expired
  target: Minimize #include directives
  target/user: Add an #include directive
  cxgbit: Add an #include directive
  ibmvscsi_tgt: Add two #include directives
  sbp-target: Add an #include directive
  qla2xxx: Add an #include directive
  configfs: Minimize #include directives
  usb: gadget: Fix second argument of percpu_ida_alloc()
  sbp-target: Fix second argument of percpu_ida_alloc()
  target/user: Fix a data type in tcmu_queue_cmd()
  target: Use NULL instead of 0 to represent a pointer
parents f8114f85 83337e54
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/delay.h>
#include <target/target_core_base.h> #include <target/target_core_base.h>
#include <target/target_core_fabric.h> #include <target/target_core_fabric.h>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#ifndef __H_IBMVSCSI_TGT #ifndef __H_IBMVSCSI_TGT
#define __H_IBMVSCSI_TGT #define __H_IBMVSCSI_TGT
#include <linux/interrupt.h>
#include "libsrp.h" #include "libsrp.h"
#define SYS_ID_NAME_LEN 64 #define SYS_ID_NAME_LEN 64
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/t10-pi.h>
#include <scsi/scsi_tcq.h> #include <scsi/scsi_tcq.h>
#include <scsi/scsi_bsg_fc.h> #include <scsi/scsi_bsg_fc.h>
#include <scsi/scsi_eh.h> #include <scsi/scsi_eh.h>
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/kthread.h> #include <linux/kthread.h>
#include <asm/unaligned.h> #include <asm/unaligned.h>
#include <net/tcp.h>
#include <target/target_core_base.h> #include <target/target_core_base.h>
#include <target/target_core_fabric.h> #include <target/target_core_fabric.h>
#include "cxgbit.h" #include "cxgbit.h"
......
...@@ -23,7 +23,9 @@ ...@@ -23,7 +23,9 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/idr.h> #include <linux/idr.h>
#include <linux/delay.h>
#include <asm/unaligned.h> #include <asm/unaligned.h>
#include <net/ipv6.h>
#include <scsi/scsi_proto.h> #include <scsi/scsi_proto.h>
#include <scsi/iscsi_proto.h> #include <scsi/iscsi_proto.h>
#include <scsi/scsi_tcq.h> #include <scsi/scsi_tcq.h>
......
#ifndef ISCSI_TARGET_H #ifndef ISCSI_TARGET_H
#define ISCSI_TARGET_H #define ISCSI_TARGET_H
#include <linux/types.h>
#include <linux/spinlock.h>
struct iscsi_cmd;
struct iscsi_conn;
struct iscsi_np;
struct iscsi_portal_group;
struct iscsi_session;
struct iscsi_tpg_np;
struct kref;
struct sockaddr_storage;
extern struct iscsi_tiqn *iscsit_get_tiqn_for_login(unsigned char *); extern struct iscsi_tiqn *iscsit_get_tiqn_for_login(unsigned char *);
extern struct iscsi_tiqn *iscsit_get_tiqn(unsigned char *, int); extern struct iscsi_tiqn *iscsit_get_tiqn(unsigned char *, int);
extern void iscsit_put_tiqn_for_login(struct iscsi_tiqn *); extern void iscsit_put_tiqn_for_login(struct iscsi_tiqn *);
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/random.h>
#include <linux/scatterlist.h> #include <linux/scatterlist.h>
#include <target/iscsi/iscsi_target_core.h> #include <target/iscsi/iscsi_target_core.h>
#include "iscsi_target_nego.h" #include "iscsi_target_nego.h"
#include "iscsi_target_auth.h" #include "iscsi_target_auth.h"
......
#ifndef _ISCSI_CHAP_H_ #ifndef _ISCSI_CHAP_H_
#define _ISCSI_CHAP_H_ #define _ISCSI_CHAP_H_
#include <linux/types.h>
#define CHAP_DIGEST_UNKNOWN 0 #define CHAP_DIGEST_UNKNOWN 0
#define CHAP_DIGEST_MD5 5 #define CHAP_DIGEST_MD5 5
#define CHAP_DIGEST_SHA 6 #define CHAP_DIGEST_SHA 6
...@@ -18,6 +20,9 @@ ...@@ -18,6 +20,9 @@
#define CHAP_STAGE_CLIENT_NRIC 4 #define CHAP_STAGE_CLIENT_NRIC 4
#define CHAP_STAGE_SERVER_NR 5 #define CHAP_STAGE_SERVER_NR 5
struct iscsi_node_auth;
struct iscsi_conn;
extern u32 chap_main_loop(struct iscsi_conn *, struct iscsi_node_auth *, char *, char *, extern u32 chap_main_loop(struct iscsi_conn *, struct iscsi_node_auth *, char *, char *,
int *, int *); int *, int *);
......
...@@ -21,10 +21,11 @@ ...@@ -21,10 +21,11 @@
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/inet.h> #include <linux/inet.h>
#include <linux/module.h>
#include <net/ipv6.h>
#include <target/target_core_base.h> #include <target/target_core_base.h>
#include <target/target_core_fabric.h> #include <target/target_core_fabric.h>
#include <target/iscsi/iscsi_transport.h> #include <target/iscsi/iscsi_transport.h>
#include <target/iscsi/iscsi_target_core.h> #include <target/iscsi/iscsi_target_core.h>
#include "iscsi_target_parameters.h" #include "iscsi_target_parameters.h"
#include "iscsi_target_device.h" #include "iscsi_target_device.h"
...@@ -100,8 +101,10 @@ static ssize_t lio_target_np_driver_store(struct config_item *item, ...@@ -100,8 +101,10 @@ static ssize_t lio_target_np_driver_store(struct config_item *item,
tpg_np_new = iscsit_tpg_add_network_portal(tpg, tpg_np_new = iscsit_tpg_add_network_portal(tpg,
&np->np_sockaddr, tpg_np, type); &np->np_sockaddr, tpg_np, type);
if (IS_ERR(tpg_np_new)) if (IS_ERR(tpg_np_new)) {
rc = PTR_ERR(tpg_np_new);
goto out; goto out;
}
} else { } else {
tpg_np_new = iscsit_tpg_locate_child_np(tpg_np, type); tpg_np_new = iscsit_tpg_locate_child_np(tpg_np, type);
if (tpg_np_new) { if (tpg_np_new) {
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
* GNU General Public License for more details. * GNU General Public License for more details.
******************************************************************************/ ******************************************************************************/
#include <linux/slab.h>
#include <scsi/iscsi_proto.h> #include <scsi/iscsi_proto.h>
#include <target/iscsi/iscsi_target_core.h> #include <target/iscsi/iscsi_target_core.h>
#include "iscsi_target_seq_pdu_list.h" #include "iscsi_target_seq_pdu_list.h"
#include "iscsi_target_erl1.h" #include "iscsi_target_erl1.h"
......
#ifndef ISCSI_TARGET_DATAIN_VALUES_H #ifndef ISCSI_TARGET_DATAIN_VALUES_H
#define ISCSI_TARGET_DATAIN_VALUES_H #define ISCSI_TARGET_DATAIN_VALUES_H
struct iscsi_cmd;
struct iscsi_datain;
extern struct iscsi_datain_req *iscsit_allocate_datain_req(void); extern struct iscsi_datain_req *iscsit_allocate_datain_req(void);
extern void iscsit_attach_datain_req(struct iscsi_cmd *, struct iscsi_datain_req *); extern void iscsit_attach_datain_req(struct iscsi_cmd *, struct iscsi_datain_req *);
extern void iscsit_free_datain_req(struct iscsi_cmd *, struct iscsi_datain_req *); extern void iscsit_free_datain_req(struct iscsi_cmd *, struct iscsi_datain_req *);
......
#ifndef ISCSI_TARGET_DEVICE_H #ifndef ISCSI_TARGET_DEVICE_H
#define ISCSI_TARGET_DEVICE_H #define ISCSI_TARGET_DEVICE_H
struct iscsi_cmd;
struct iscsi_session;
extern void iscsit_determine_maxcmdsn(struct iscsi_session *); extern void iscsit_determine_maxcmdsn(struct iscsi_session *);
extern void iscsit_increment_maxcmdsn(struct iscsi_cmd *, struct iscsi_session *); extern void iscsit_increment_maxcmdsn(struct iscsi_cmd *, struct iscsi_session *);
......
#ifndef ISCSI_TARGET_ERL0_H #ifndef ISCSI_TARGET_ERL0_H
#define ISCSI_TARGET_ERL0_H #define ISCSI_TARGET_ERL0_H
#include <linux/types.h>
struct iscsi_cmd;
struct iscsi_conn;
struct iscsi_session;
extern void iscsit_set_dataout_sequence_values(struct iscsi_cmd *); extern void iscsit_set_dataout_sequence_values(struct iscsi_cmd *);
extern int iscsit_check_pre_dataout(struct iscsi_cmd *, unsigned char *); extern int iscsit_check_pre_dataout(struct iscsi_cmd *, unsigned char *);
extern int iscsit_check_post_dataout(struct iscsi_cmd *, unsigned char *, u8); extern int iscsit_check_post_dataout(struct iscsi_cmd *, unsigned char *, u8);
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
******************************************************************************/ ******************************************************************************/
#include <linux/list.h> #include <linux/list.h>
#include <linux/slab.h>
#include <scsi/iscsi_proto.h> #include <scsi/iscsi_proto.h>
#include <target/target_core_base.h> #include <target/target_core_base.h>
#include <target/target_core_fabric.h> #include <target/target_core_fabric.h>
......
#ifndef ISCSI_TARGET_ERL1_H #ifndef ISCSI_TARGET_ERL1_H
#define ISCSI_TARGET_ERL1_H #define ISCSI_TARGET_ERL1_H
#include <linux/types.h>
#include <scsi/iscsi_proto.h> /* itt_t */
struct iscsi_cmd;
struct iscsi_conn;
struct iscsi_datain_req;
struct iscsi_ooo_cmdsn;
struct iscsi_pdu;
struct iscsi_session;
extern int iscsit_dump_data_payload(struct iscsi_conn *, u32, int); extern int iscsit_dump_data_payload(struct iscsi_conn *, u32, int);
extern int iscsit_create_recovery_datain_values_datasequenceinorder_yes( extern int iscsit_create_recovery_datain_values_datasequenceinorder_yes(
struct iscsi_cmd *, struct iscsi_datain_req *); struct iscsi_cmd *, struct iscsi_datain_req *);
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
******************************************************************************/ ******************************************************************************/
#include <linux/slab.h>
#include <scsi/iscsi_proto.h> #include <scsi/iscsi_proto.h>
#include <target/target_core_base.h> #include <target/target_core_base.h>
#include <target/target_core_fabric.h> #include <target/target_core_fabric.h>
......
#ifndef ISCSI_TARGET_ERL2_H #ifndef ISCSI_TARGET_ERL2_H
#define ISCSI_TARGET_ERL2_H #define ISCSI_TARGET_ERL2_H
#include <linux/types.h>
struct iscsi_cmd;
struct iscsi_conn;
struct iscsi_conn_recovery;
struct iscsi_session;
extern void iscsit_create_conn_recovery_datain_values(struct iscsi_cmd *, __be32); extern void iscsit_create_conn_recovery_datain_values(struct iscsi_cmd *, __be32);
extern void iscsit_create_conn_recovery_dataout_values(struct iscsi_cmd *); extern void iscsit_create_conn_recovery_dataout_values(struct iscsi_cmd *);
extern struct iscsi_conn_recovery *iscsit_get_inactive_connection_recovery_entry( extern struct iscsi_conn_recovery *iscsit_get_inactive_connection_recovery_entry(
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include <linux/string.h> #include <linux/string.h>
#include <linux/kthread.h> #include <linux/kthread.h>
#include <linux/idr.h> #include <linux/idr.h>
#include <linux/tcp.h> /* TCP_NODELAY */
#include <net/ipv6.h> /* ipv6_addr_v4mapped() */
#include <scsi/iscsi_proto.h> #include <scsi/iscsi_proto.h>
#include <target/target_core_base.h> #include <target/target_core_base.h>
#include <target/target_core_fabric.h> #include <target/target_core_fabric.h>
......
#ifndef ISCSI_TARGET_LOGIN_H #ifndef ISCSI_TARGET_LOGIN_H
#define ISCSI_TARGET_LOGIN_H #define ISCSI_TARGET_LOGIN_H
#include <linux/types.h>
struct iscsi_conn;
struct iscsi_login;
struct iscsi_np;
struct sockaddr_storage;
extern int iscsi_login_setup_crypto(struct iscsi_conn *); extern int iscsi_login_setup_crypto(struct iscsi_conn *);
extern int iscsi_check_for_session_reinstatement(struct iscsi_conn *); extern int iscsi_check_for_session_reinstatement(struct iscsi_conn *);
extern int iscsi_login_post_auth_non_zero_tsih(struct iscsi_conn *, u16, u32); extern int iscsi_login_post_auth_non_zero_tsih(struct iscsi_conn *, u16, u32);
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/kthread.h> #include <linux/kthread.h>
#include <linux/slab.h>
#include <net/sock.h>
#include <scsi/iscsi_proto.h> #include <scsi/iscsi_proto.h>
#include <target/target_core_base.h> #include <target/target_core_base.h>
#include <target/target_core_fabric.h> #include <target/target_core_fabric.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment