aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/target/tcm_mod_builder.py
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-11-13 23:04:17 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-13 23:04:17 -0500
commit9aa3d651a9199103eb6451aeb0ac1b66a6d770a6 (patch)
tree42cc631c54e1fcbdeedee8e955c4797634a91af7 /Documentation/target/tcm_mod_builder.py
parent5d2eb548b309be34ecf3b91f0b7300a2b9d09b8c (diff)
parent517982229f78b2aebf00a8a337e84e8eeea70b8e (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target updates from Nicholas Bellinger: "This series contains HCH's changes to absorb configfs attribute ->show() + ->store() function pointer usage from it's original tree-wide consumers, into common configfs code. It includes usb-gadget, target w/ drivers, netconsole and ocfs2 changes to realize the improved simplicity, that now renders the original include/target/configfs_macros.h CPP magic for fabric drivers and others, unnecessary and obsolete. And with common code in place, new configfs attributes can be added easier than ever before. Note, there are further improvements in-flight from other folks for v4.5 code in configfs land, plus number of target fixes for post -rc1 code" In the meantime, a new user of the now-removed old configfs API came in through the char/misc tree in commit 7bd1d4093c2f ("stm class: Introduce an abstraction for System Trace Module devices"). This merge resolution comes from Alexander Shishkin, who updated his stm class tracing abstraction to account for the removal of the old show_attribute and store_attribute methods in commit 517982229f78 ("configfs: remove old API") from this pull. As Alexander says about that patch: "There's no need to keep an extra wrapper structure per item and the awkward show_attribute/store_attribute item ops are no longer needed. This patch converts policy code to the new api, all the while making the code quite a bit smaller and easier on the eyes. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>" That patch was folded into the merge so that the tree should be fully bisectable. * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (23 commits) configfs: remove old API ocfs2/cluster: use per-attribute show and store methods ocfs2/cluster: move locking into attribute store methods netconsole: use per-attribute show and store methods target: use per-attribute show and store methods spear13xx_pcie_gadget: use per-attribute show and store methods dlm: use per-attribute show and store methods usb-gadget/f_serial: use per-attribute show and store methods usb-gadget/f_phonet: use per-attribute show and store methods usb-gadget/f_obex: use per-attribute show and store methods usb-gadget/f_uac2: use per-attribute show and store methods usb-gadget/f_uac1: use per-attribute show and store methods usb-gadget/f_mass_storage: use per-attribute show and store methods usb-gadget/f_sourcesink: use per-attribute show and store methods usb-gadget/f_printer: use per-attribute show and store methods usb-gadget/f_midi: use per-attribute show and store methods usb-gadget/f_loopback: use per-attribute show and store methods usb-gadget/ether: use per-attribute show and store methods usb-gadget/f_acm: use per-attribute show and store methods usb-gadget/f_hid: use per-attribute show and store methods ...
Diffstat (limited to 'Documentation/target/tcm_mod_builder.py')
-rwxr-xr-xDocumentation/target/tcm_mod_builder.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py
index cda56df9b8a7..7d370c9b1450 100755
--- a/Documentation/target/tcm_mod_builder.py
+++ b/Documentation/target/tcm_mod_builder.py
@@ -203,8 +203,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
203 buf += "#include <scsi/scsi_proto.h>\n\n" 203 buf += "#include <scsi/scsi_proto.h>\n\n"
204 buf += "#include <target/target_core_base.h>\n" 204 buf += "#include <target/target_core_base.h>\n"
205 buf += "#include <target/target_core_fabric.h>\n" 205 buf += "#include <target/target_core_fabric.h>\n"
206 buf += "#include <target/target_core_fabric_configfs.h>\n"
207 buf += "#include <target/configfs_macros.h>\n\n"
208 buf += "#include \"" + fabric_mod_name + "_base.h\"\n" 206 buf += "#include \"" + fabric_mod_name + "_base.h\"\n"
209 buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n" 207 buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n"
210 208
@@ -283,19 +281,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
283 buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + ", " + fabric_mod_port + "_wwn);\n" 281 buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + ", " + fabric_mod_port + "_wwn);\n"
284 buf += " kfree(" + fabric_mod_port + ");\n" 282 buf += " kfree(" + fabric_mod_port + ");\n"
285 buf += "}\n\n" 283 buf += "}\n\n"
286 buf += "static ssize_t " + fabric_mod_name + "_wwn_show_attr_version(\n"
287 buf += " struct target_fabric_configfs *tf,\n"
288 buf += " char *page)\n"
289 buf += "{\n"
290 buf += " return sprintf(page, \"" + fabric_mod_name.upper() + " fabric module %s on %s/%s\"\n"
291 buf += " \"on \"UTS_RELEASE\"\\n\", " + fabric_mod_name.upper() + "_VERSION, utsname()->sysname,\n"
292 buf += " utsname()->machine);\n"
293 buf += "}\n\n"
294 buf += "TF_WWN_ATTR_RO(" + fabric_mod_name + ", version);\n\n"
295 buf += "static struct configfs_attribute *" + fabric_mod_name + "_wwn_attrs[] = {\n"
296 buf += " &" + fabric_mod_name + "_wwn_version.attr,\n"
297 buf += " NULL,\n"
298 buf += "};\n\n"
299 284
300 buf += "static const struct target_core_fabric_ops " + fabric_mod_name + "_ops = {\n" 285 buf += "static const struct target_core_fabric_ops " + fabric_mod_name + "_ops = {\n"
301 buf += " .module = THIS_MODULE,\n" 286 buf += " .module = THIS_MODULE,\n"
@@ -328,8 +313,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
328 buf += " .fabric_drop_wwn = " + fabric_mod_name + "_drop_" + fabric_mod_port + ",\n" 313 buf += " .fabric_drop_wwn = " + fabric_mod_name + "_drop_" + fabric_mod_port + ",\n"
329 buf += " .fabric_make_tpg = " + fabric_mod_name + "_make_tpg,\n" 314 buf += " .fabric_make_tpg = " + fabric_mod_name + "_make_tpg,\n"
330 buf += " .fabric_drop_tpg = " + fabric_mod_name + "_drop_tpg,\n" 315 buf += " .fabric_drop_tpg = " + fabric_mod_name + "_drop_tpg,\n"
331 buf += "\n"
332 buf += " .tfc_wwn_attrs = " + fabric_mod_name + "_wwn_attrs,\n"
333 buf += "};\n\n" 316 buf += "};\n\n"
334 317
335 buf += "static int __init " + fabric_mod_name + "_init(void)\n" 318 buf += "static int __init " + fabric_mod_name + "_init(void)\n"