Commit e31ac898 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Martin K. Petersen
Browse files

scsi: libfc: Move scsi/fc_encode.h to libfc

Most of this file is only used inside of libfc, so move it to where it is
actually used, with only fc_fill_fc_hdr() left inside of the header.

Link: https://lore.kernel.org/r/20201026160705.3706396-1-arnd@kernel.org


Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent ae6b4e69
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@
#include <scsi/scsi_tcq.h>
#include <scsi/libfc.h>
#include <scsi/libfcoe.h>
#include <scsi/fc_encode.h>
#include <scsi/scsi_transport.h>
#include <scsi/scsi_transport_fc.h>
#include <scsi/fc/fc_fip.h>
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
#include <scsi/fc/fc_ns.h>
#include <scsi/fc/fc_els.h>
#include <scsi/libfc.h>
#include <scsi/fc_encode.h>
#include "fc_encode.h"
#include "fc_libfc.h"

/**
+1 −29
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
#define _FC_ENCODE_H_
#include <asm/unaligned.h>
#include <linux/utsname.h>
#include <scsi/fc/fc_ms.h>

/*
 * F_CTL values for simple requests and responses.
@@ -39,35 +40,6 @@ struct fc_ct_req {
	} payload;
};

static inline void __fc_fill_fc_hdr(struct fc_frame_header *fh,
				    enum fc_rctl r_ctl,
				    u32 did, u32 sid, enum fc_fh_type type,
				    u32 f_ctl, u32 parm_offset)
{
	WARN_ON(r_ctl == 0);
	fh->fh_r_ctl = r_ctl;
	hton24(fh->fh_d_id, did);
	hton24(fh->fh_s_id, sid);
	fh->fh_type = type;
	hton24(fh->fh_f_ctl, f_ctl);
	fh->fh_cs_ctl = 0;
	fh->fh_df_ctl = 0;
	fh->fh_parm_offset = htonl(parm_offset);
}

/**
 * fill FC header fields in specified fc_frame
 */
static inline void fc_fill_fc_hdr(struct fc_frame *fp, enum fc_rctl r_ctl,
				  u32 did, u32 sid, enum fc_fh_type type,
				  u32 f_ctl, u32 parm_offset)
{
	struct fc_frame_header *fh;

	fh = fc_frame_header_get(fp);
	__fc_fill_fc_hdr(fh, r_ctl, did, sid, type, f_ctl, parm_offset);
}

/**
 * fc_adisc_fill() - Fill in adisc request frame
 * @lport: local port.
+0 −1
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@
#include <scsi/fc/fc_fc2.h>

#include <scsi/libfc.h>
#include <scsi/fc_encode.h>

#include "fc_libfc.h"

+1 −1
Original line number Diff line number Diff line
@@ -26,8 +26,8 @@
#include <scsi/fc/fc_fc2.h>

#include <scsi/libfc.h>
#include <scsi/fc_encode.h>

#include "fc_encode.h"
#include "fc_libfc.h"

static struct kmem_cache *scsi_pkt_cachep;
Loading