Received: by 10.223.164.202 with SMTP id h10csp1567321wrb; Wed, 8 Nov 2017 06:19:13 -0800 (PST) X-Google-Smtp-Source: ABhQp+SbnK+QEvLZGCws/jnQCzABQhOu5NGct2IkGZZHst0bIW22AsARFxxVwQxYKi+2mO35Dw4U X-Received: by 10.98.11.83 with SMTP id t80mr684997pfi.79.1510150752993; Wed, 08 Nov 2017 06:19:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510150752; cv=none; d=google.com; s=arc-20160816; b=jATFQibZik835ps6qmks6NQPthLv3/LQC9kJC7BOfFwXo6WGcOEXRQTzfNW49AeKVT 5W6obTT8SOQGvgTr01tPTMny8hhbQIMQCAVwaSSFEBoZ0xFwPzHx7/aiulg0nMRGjYLg xGA/Ljb0hyu1D537/J1e7H9PKO3+NXt/kq+DwAdx484cSpX1TRF9Xv8Vs20tg2ACMz5C vYYDiH/ddnmOyuumL6zmOTEWcxiVEZy0aLANti/R4626XP5EJPF+ISII9+LLzNDRDTTF 3egVFAqXxQS0Tw8wD/geK9RTBZNWYADAyJX8lq1GNwUUrvdWwOCLagyHjsxvktsJzmsR Icew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=BKjFnXTOMq+RmdppbvCQpalR6omZybkAw/s89ajdOuU=; b=oT/12jYo9WbOlr1DYLmc+MHHbI/qZ8b0GNtqVZQfyH/vWa+1GqM7xF0cGpR4fJxwD+ Jc43Oqu6P/zuxi/NW+yDcKcTIRcgq1GAem6cdUuLj1+d2uFUHVtPDKSLlajl8lLgknxw 94o+4wCcxrbZEoL3AQhT283EmKTQ2lS3Bp7+P/yVup+8n/A4tAuRS+vBHshyNFtB3NaE 3mz2jTY68JCr63TbmhAs2tZqDz40n2kuezlPeGxgEXt4tf/ZBWfgTkuFQl8ZQus+xHNB TOGZtRZBLA8nxNd7OuL0UyvqYsbyzphhqIiiYyCqxcvcN4sh7ulEW4kFkA0v4pen6dR3 oFzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si3938591plz.113.2017.11.08.06.19.01; Wed, 08 Nov 2017 06:19:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752729AbdKHOSL (ORCPT + 82 others); Wed, 8 Nov 2017 09:18:11 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41712 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752716AbdKHOSJ (ORCPT ); Wed, 8 Nov 2017 09:18:09 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vA8EFWZk035748 for ; Wed, 8 Nov 2017 09:18:09 -0500 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2e437r1h5s-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 08 Nov 2017 09:18:09 -0500 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 8 Nov 2017 14:18:07 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 8 Nov 2017 14:18:04 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vA8EI4YH40697954; Wed, 8 Nov 2017 14:18:04 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0102B52045; Wed, 8 Nov 2017 13:11:55 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 9AD1D52041; Wed, 8 Nov 2017 13:11:54 +0000 (GMT) From: Steffen Maier To: "James E . J . Bottomley" , "Martin K . Petersen" , Kees Cook Cc: linux-scsi@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Schwidefsky , Heiko Carstens , Steffen Maier Subject: [PATCH 3/3] zfcp: drop open coded assignments of timer_list.function Date: Wed, 8 Nov 2017 15:17:09 +0100 X-Mailer: git-send-email 2.13.5 In-Reply-To: <20171108141709.79074-1-maier@linux.vnet.ibm.com> References: <20171108141709.79074-1-maier@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17110814-0016-0000-0000-000004FEF6F3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110814-0017-0000-0000-0000283A9B6A Message-Id: <20171108141709.79074-4-maier@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-08_03:,, 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 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711080191 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The majority of requests is regular SCSI I/O on the hot path. Since these use a timeout owned by the block layer, zfcp does not use zfcp_fsf_req.timer. Hence, the very early unconditional and even incomplete (handler function yet unknown) timer initialization in zfcp_fsf_req_create() is not necessary. Instead defer the timer initialization to when we know zfcp needs to use its own request timeout in zfcp_fsf_start_timer() and zfcp_fsf_start_erp_timer(). At that point in time we also know the handler function. So drop open coded assignments of timer_list.function and instead use the new timer API wrapper function timer_setup(). This way, we don't have to touch zfcp again, when the cast macro TIMER_FUNC_TYPE gets removed again after the global conversion to timer_setup() is complete. Depends-on: v4.14-rc3 commit 686fef928bba ("timer: Prepare to change timer callback argument type") Signed-off-by: Steffen Maier Reviewed-by: Jens Remus --- drivers/s390/scsi/zfcp_fsf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 51b81c0a0652..c8e368f0f299 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -34,7 +34,7 @@ static void zfcp_fsf_request_timeout_handler(struct timer_list *t) static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, unsigned long timeout) { - fsf_req->timer.function = (TIMER_FUNC_TYPE)zfcp_fsf_request_timeout_handler; + timer_setup(&fsf_req->timer, zfcp_fsf_request_timeout_handler, 0); fsf_req->timer.expires = jiffies + timeout; add_timer(&fsf_req->timer); } @@ -42,7 +42,7 @@ static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, static void zfcp_fsf_start_erp_timer(struct zfcp_fsf_req *fsf_req) { BUG_ON(!fsf_req->erp_action); - fsf_req->timer.function = (TIMER_FUNC_TYPE)zfcp_erp_timeout_handler; + timer_setup(&fsf_req->timer, zfcp_erp_timeout_handler, 0); fsf_req->timer.expires = jiffies + 30 * HZ; add_timer(&fsf_req->timer); } @@ -692,7 +692,6 @@ static struct zfcp_fsf_req *zfcp_fsf_req_create(struct zfcp_qdio *qdio, adapter->req_no++; INIT_LIST_HEAD(&req->list); - timer_setup(&req->timer, NULL, 0); init_completion(&req->completion); req->adapter = adapter; -- 2.13.5 From 1584317347673008193@xxx Fri Nov 17 12:46:03 +0000 2017 X-GM-THRID: 1584317347673008193 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread