From patchwork Tue Apr 9 16:50:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Block X-Patchwork-Id: 10891761 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 48B8F17E1 for ; Tue, 9 Apr 2019 16:51:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34C8E26242 for ; Tue, 9 Apr 2019 16:51:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28738287B5; Tue, 9 Apr 2019 16:51:27 +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=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 B358A26242 for ; Tue, 9 Apr 2019 16:51:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726668AbfDIQv0 (ORCPT ); Tue, 9 Apr 2019 12:51:26 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59648 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726532AbfDIQv0 (ORCPT ); Tue, 9 Apr 2019 12:51:26 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x39GpGIU035474 for ; Tue, 9 Apr 2019 12:51:25 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2rrwshmpn4-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 09 Apr 2019 12:51:21 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 9 Apr 2019 17:50:59 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 9 Apr 2019 17:50:56 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x39GosDS55050482 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 9 Apr 2019 16:50:54 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 67A774C058; Tue, 9 Apr 2019 16:50:54 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 53EB24C04A; Tue, 9 Apr 2019 16:50:54 +0000 (GMT) Received: from t480-pf1aa2c2 (unknown [9.152.212.30]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 9 Apr 2019 16:50:54 +0000 (GMT) Received: from bblock by t480-pf1aa2c2 with local (Exim 4.92) (envelope-from ) id 1hDtxW-0006G8-2G; Tue, 09 Apr 2019 18:50:54 +0200 From: Benjamin Block To: "James E . J . Bottomley" , "Martin K . Petersen" Cc: Benjamin Block , Steffen Maier , Martin Schwidefsky , Heiko Carstens , Fedor Loshakov , Jens Remus , linux-scsi@vger.kernel.org, linux-s390@vger.kernel.org Subject: [PATCH 02/10] zfcp: remove option to pass NULL to sync exchange config/port data Date: Tue, 9 Apr 2019 18:50:45 +0200 X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19040916-0028-0000-0000-0000035EFEE6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19040916-0029-0000-0000-0000241E1E29 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-09_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904090107 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 When the FSF functions for Exchange Config/Port Data were separated into a async- and synchronous variation - where the synchronous variation is and was only used by userspace-interfaces, and the asynchronous variation by ERP - it was designed such that the synchronous variation could optionally take a buffer to store the QTCB Bottom received with Exchange Config/Port Data. In practice this buffer was always used and no caller ever used these functions and not pass the buffer. It is unclear what use these functions would have for a userspace-interfaces without handling any of the data received with the commands. Hence to cleanup and simplify the code a bit, remove the optional part and make it mandatory. Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_fsf.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index c6a448586127..808e3f6200ae 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -1256,8 +1256,7 @@ int zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action) /** * zfcp_fsf_exchange_config_data_sync() - Request information about FCP channel. * @qdio: pointer to the QDIO-Queue to use for sending the command. - * @data: pointer to the QTCB-Bottom for storing the result of the command, - * might be %NULL. + * @data: pointer to the QTCB-Bottom for storing the result of the command. * * Returns: * * 0 - Exchange Config Data was successful, @data is complete @@ -1290,8 +1289,7 @@ int zfcp_fsf_exchange_config_data_sync(struct zfcp_qdio *qdio, FSF_FEATURE_NOTIFICATION_LOST | FSF_FEATURE_UPDATE_ALERT; - if (data) - req->data = data; + req->data = data; zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT); retval = zfcp_fsf_req_send(req); @@ -1363,8 +1361,7 @@ int zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action) /** * zfcp_fsf_exchange_port_data_sync() - Request information about local port. * @qdio: pointer to the QDIO-Queue to use for sending the command. - * @data: pointer to the QTCB-Bottom for storing the result of the command, - * might be %NULL. + * @data: pointer to the QTCB-Bottom for storing the result of the command. * * Returns: * * 0 - Exchange Port Data was successful, @data is complete @@ -1394,12 +1391,11 @@ int zfcp_fsf_exchange_port_data_sync(struct zfcp_qdio *qdio, goto out_unlock; } - if (data) - req->data = data; - zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); - req->handler = zfcp_fsf_exchange_port_data_handler; + + req->data = data; + zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT); retval = zfcp_fsf_req_send(req); spin_unlock_irq(&qdio->req_q_lock);