Skip to content

Commit 05fee64

Browse files
john fastabendJames Bottomley
authored andcommitted
[SCSI] libfc: remove tgt_flags from fc_fcp_pkt struct
We can easily remove the tgt_flags from fc_fcp_pkt struct and use rpriv->tgt_flags directly where needed. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
1 parent e0883a3 commit 05fee64

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

‎drivers/scsi/libfc/fc_fcp.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,8 +1150,9 @@ static int fc_fcp_cmd_send(struct fc_lport *lport, struct fc_fcp_pkt *fsp,
11501150

11511151
setup_timer(&fsp->timer, fc_fcp_timeout, (unsigned long)fsp);
11521152

1153-
if (fsp->tgt_flags & FC_RP_FLAGS_REC_SUPPORTED)
1153+
if (rpriv->flags & FC_RP_FLAGS_REC_SUPPORTED)
11541154
fc_fcp_timer_set(fsp, rec_tov);
1155+
11551156
unlock:
11561157
fc_fcp_unlock_pkt(fsp);
11571158
return rc;
@@ -1867,8 +1868,6 @@ static int fc_queuecommand_lck(struct scsi_cmnd *sc_cmd, void (*done)(struct scs
18671868
}
18681869
put_cpu();
18691870

1870-
fsp->tgt_flags = rpriv->flags;
1871-
18721871
init_timer(&fsp->timer);
18731872
fsp->timer.data = (unsigned long)fsp;
18741873

‎include/scsi/libfc.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ struct fc_seq_els_data {
263263
* struct fc_fcp_pkt - FCP request structure (one for each scsi_cmnd request)
264264
* @lp: The associated local port
265265
* @state: The state of the I/O
266-
* @tgt_flags: Target's flags
267266
* @ref_cnt: Reference count
268267
* @scsi_pkt_lock: Lock to protect the SCSI packet (must be taken before the
269268
* host_lock if both are to be held at the same time)
@@ -298,7 +297,6 @@ struct fc_fcp_pkt {
298297
/* Housekeeping information */
299298
struct fc_lport *lp;
300299
u16 state;
301-
u16 tgt_flags;
302300
atomic_t ref_cnt;
303301
spinlock_t scsi_pkt_lock;
304302

0 commit comments

Comments
 (0)