From patchwork Fri Jun 22 21:52:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10483095 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0261D6023A for ; Fri, 22 Jun 2018 21:53:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E47992903B for ; Fri, 22 Jun 2018 21:53:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8CF029043; Fri, 22 Jun 2018 21:53:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7ED232903B for ; Fri, 22 Jun 2018 21:53:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754482AbeFVVxJ (ORCPT ); Fri, 22 Jun 2018 17:53:09 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:27587 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754240AbeFVVxJ (ORCPT ); Fri, 22 Jun 2018 17:53:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1529704413; x=1561240413; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Q+qutHa9GPw7PKd+Df+2gbnnKOpxKLFwTci8USJUaeo=; b=QHJ735aKIz013yYBWlYTp6v0C7OoXx2U6dFlApq7ONELnw6bxpY+NqnN Sz4CfWmrvaV+kTyBtrSl5zTQ4k6LK0oLyQN2qN3vJznEYASoccJ5A5n8d V5jO0Kh52scNchy9w1xCEOzwUNxFvBkqGHMywnqC4yZPhDW6O2hNLwRmG 6IJkugFAHLAJsEDlbAqFphoPtoeX+FFUSpFCSBkaaHQovpdO10rD7saGv LAnEKaeB3WkDxbHxrrR1be6nqGxz3HXvVmWz/7hj8DGRj85v4Ci+weYRa KsEt8qWSsGJoiEF2qeCmv3f+H65LYOSF7MOU6HtjiPFm+5s7MN004xPS0 A==; X-IronPort-AV: E=Sophos;i="5.51,259,1526313600"; d="scan'208";a="178350986" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 23 Jun 2018 05:53:32 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 22 Jun 2018 14:42:55 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip01.wdc.com with ESMTP; 22 Jun 2018 14:53:09 -0700 From: Bart Van Assche To: "Martin K . Petersen" Cc: Christoph Hellwig , target-devel@vger.kernel.org, Bart Van Assche , Hannes Reinecke Subject: [PATCH 01/20] target: Use config_item_name() instead of open-coding it Date: Fri, 22 Jun 2018 14:52:48 -0700 Message-Id: <20180622215307.8758-2-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180622215307.8758-1-bart.vanassche@wdc.com> References: <20180622215307.8758-1-bart.vanassche@wdc.com> Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some target code uses config_item_name() while other code accesses .ci_name directly. Make the target code consistent by switching to config_item_name(). Signed-off-by: Bart Van Assche Reviewed-by: Mike Christie Cc: Hannes Reinecke Cc: Christoph Hellwig --- drivers/target/target_core_configfs.c | 4 ++-- drivers/target/target_core_sbc.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 5ccef7d597fa..93d3ff34b614 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -263,8 +263,8 @@ static struct config_group *target_core_register_fabric( &tf->tf_discovery_cit); configfs_add_default_group(&tf->tf_disc_group, &tf->tf_group); - pr_debug("Target_Core_ConfigFS: REGISTER -> Allocated Fabric:" - " %s\n", tf->tf_group.cg_item.ci_name); + pr_debug("Target_Core_ConfigFS: REGISTER -> Allocated Fabric: %s\n", + config_item_name(&tf->tf_group.cg_item)); return &tf->tf_group; } diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c index b054682e974f..ebac2b49b9c6 100644 --- a/drivers/target/target_core_sbc.c +++ b/drivers/target/target_core_sbc.c @@ -978,9 +978,10 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops) } case COMPARE_AND_WRITE: if (!dev->dev_attrib.emulate_caw) { - pr_err_ratelimited("se_device %s/%s (vpd_unit_serial %s) reject" - " COMPARE_AND_WRITE\n", dev->se_hba->backend->ops->name, - dev->dev_group.cg_item.ci_name, dev->t10_wwn.unit_serial); + pr_err_ratelimited("se_device %s/%s (vpd_unit_serial %s) reject COMPARE_AND_WRITE\n", + dev->se_hba->backend->ops->name, + config_item_name(&dev->dev_group.cg_item), + dev->t10_wwn.unit_serial); return TCM_UNSUPPORTED_SCSI_OPCODE; } sectors = cdb[13];