Skip to content

Commit 6baca76

Browse files
ddissmartinkpetersen
authored andcommitted
scsi: target: drop unused pi_prot_format attribute storage
On write, the pi_prot_format configfs attribute invokes the device format_prot() callback if present. Read dumps the contents of se_dev_attrib.pi_prot_format which is always zero. Make the configfs attribute write-only, and drop the always zero se_dev_attrib.pi_prot_format storage. Signed-off-by: David Disseldorp <ddiss@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 359d0ac commit 6baca76

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

drivers/target/target_core_configfs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,6 @@ DEF_CONFIGFS_ATTRIB_SHOW(emulate_3pc);
535535
DEF_CONFIGFS_ATTRIB_SHOW(emulate_pr);
536536
DEF_CONFIGFS_ATTRIB_SHOW(pi_prot_type);
537537
DEF_CONFIGFS_ATTRIB_SHOW(hw_pi_prot_type);
538-
DEF_CONFIGFS_ATTRIB_SHOW(pi_prot_format);
539538
DEF_CONFIGFS_ATTRIB_SHOW(pi_prot_verify);
540539
DEF_CONFIGFS_ATTRIB_SHOW(enforce_pr_isids);
541540
DEF_CONFIGFS_ATTRIB_SHOW(is_nonrot);
@@ -1121,7 +1120,7 @@ CONFIGFS_ATTR(, emulate_3pc);
11211120
CONFIGFS_ATTR(, emulate_pr);
11221121
CONFIGFS_ATTR(, pi_prot_type);
11231122
CONFIGFS_ATTR_RO(, hw_pi_prot_type);
1124-
CONFIGFS_ATTR(, pi_prot_format);
1123+
CONFIGFS_ATTR_WO(, pi_prot_format);
11251124
CONFIGFS_ATTR(, pi_prot_verify);
11261125
CONFIGFS_ATTR(, enforce_pr_isids);
11271126
CONFIGFS_ATTR(, is_nonrot);

include/target/target_core_base.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,6 @@ struct se_dev_attrib {
667667
int emulate_caw;
668668
int emulate_3pc;
669669
int emulate_pr;
670-
int pi_prot_format;
671670
enum target_prot_type pi_prot_type;
672671
enum target_prot_type hw_pi_prot_type;
673672
int pi_prot_verify;

0 commit comments

Comments
 (0)