From patchwork Fri Nov 23 17:36:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Disseldorp X-Patchwork-Id: 10696239 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E41A317FE for ; Fri, 23 Nov 2018 17:36:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D328428608 for ; Fri, 23 Nov 2018 17:36:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C74D42859E; Fri, 23 Nov 2018 17:36:19 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable 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 7507928555 for ; Fri, 23 Nov 2018 17:36:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410183AbeKXEV3 (ORCPT ); Fri, 23 Nov 2018 23:21:29 -0500 Received: from mx2.suse.de ([195.135.220.15]:45734 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732583AbeKXEV3 (ORCPT ); Fri, 23 Nov 2018 23:21:29 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D7A01AE7A; Fri, 23 Nov 2018 17:36:16 +0000 (UTC) From: David Disseldorp To: target-devel@vger.kernel.org Cc: hare@suse.com, Mike Christie , martin.petersen@oracle.com, linux-scsi@vger.kernel.org, David Disseldorp Subject: [PATCH 1/3] target: drop unused pi_prot_format attribute storage Date: Fri, 23 Nov 2018 18:36:11 +0100 Message-Id: <20181123173613.4547-2-ddiss@suse.de> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20181123173613.4547-1-ddiss@suse.de> References: <20181123173613.4547-1-ddiss@suse.de> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Christoph Hellwig --- drivers/target/target_core_configfs.c | 3 +-- include/target/target_core_base.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 70b9f6755c36..62427acdf503 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -535,7 +535,6 @@ DEF_CONFIGFS_ATTRIB_SHOW(emulate_3pc); DEF_CONFIGFS_ATTRIB_SHOW(emulate_pr); DEF_CONFIGFS_ATTRIB_SHOW(pi_prot_type); DEF_CONFIGFS_ATTRIB_SHOW(hw_pi_prot_type); -DEF_CONFIGFS_ATTRIB_SHOW(pi_prot_format); DEF_CONFIGFS_ATTRIB_SHOW(pi_prot_verify); DEF_CONFIGFS_ATTRIB_SHOW(enforce_pr_isids); DEF_CONFIGFS_ATTRIB_SHOW(is_nonrot); @@ -1121,7 +1120,7 @@ CONFIGFS_ATTR(, emulate_3pc); CONFIGFS_ATTR(, emulate_pr); CONFIGFS_ATTR(, pi_prot_type); CONFIGFS_ATTR_RO(, hw_pi_prot_type); -CONFIGFS_ATTR(, pi_prot_format); +CONFIGFS_ATTR_WO(, pi_prot_format); CONFIGFS_ATTR(, pi_prot_verify); CONFIGFS_ATTR(, enforce_pr_isids); CONFIGFS_ATTR(, is_nonrot); diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index c15054116b86..53b90cc18902 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -667,7 +667,6 @@ struct se_dev_attrib { int emulate_caw; int emulate_3pc; int emulate_pr; - int pi_prot_format; enum target_prot_type pi_prot_type; enum target_prot_type hw_pi_prot_type; int pi_prot_verify;