Received: by 10.223.164.202 with SMTP id h10csp1567590wrb; Wed, 8 Nov 2017 06:19:27 -0800 (PST) X-Google-Smtp-Source: ABhQp+Rm1+x7ErMf9b29+jz7Z9jjLNWfVBZ1P9MgvKMuophXOg5VI3gj5jsKL8vB7HF85Mq6BlJ3 X-Received: by 10.98.106.5 with SMTP id f5mr302185pfc.27.1510150767385; Wed, 08 Nov 2017 06:19:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510150767; cv=none; d=google.com; s=arc-20160816; b=LNFjgDsM81SC4aDasek/gAzBBBpSbARW2EJh1da2MyU8FQb8uuIuLUcqgIX5AOH4XZ sxcK7RYUb8aEnjoDzKyzUuRqpsHzu+NbROdkmDTAKGaR/PNnA1Zw8EyAixW0i++GVDG8 HCEtiU1HJevkbmKDF6zEXKej/DYH1KDMn6MWlFtcGCfrUCWwMxCXZHiesDksDYAdyqrb TgpEcw3igzk5WinfjoHB0SHDyg6wpHN3DjSb5375JNcugjyl8fCyZX+IA3pCoU8APRHq ravP/Dyv7j800+Py8gcyks+gekyAkjQPvfp1Mf72I8h0kNWS28lli0Aw4Lw5Es0k3a6F 9Z7g== 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=yPwRW13maRKUbobsn+T24/+frn/SvrHi6qGQe93oa+w=; b=c/QIWGjFvvUY3b6KLhxr3VdR20sZYVFQqOlPPJl7kvMbSKSpr1pzXFu3uNdilLQQGN js5H1InkPfoYirPj5ho8qzDM1zsn5fEmabJElWH5UOGUK42lyCvoY4SGM8zVHFVYMWcz 6FbASHvVd2JA4tdCte4yuDFiPPPbjj7kL2NmhNywyfDr67XAf1Zl7cM/yWCNqqOba2kn GY6LfogOER0OSYzI7PbnmH0FN516W/AssfDfeyomStsXUEaYoTAaCR99HyXK6AokudaV 3CyETizpWsCxL2c3I42SQ78HCQlb7b24/fumIEGqBLhiX5SdNIsEquZ9CK0CbTFlI/Pk QvpA== 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 g8si3981893plm.149.2017.11.08.06.19.15; Wed, 08 Nov 2017 06:19:27 -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 S1752711AbdKHOSJ (ORCPT + 82 others); Wed, 8 Nov 2017 09:18:09 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:46468 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752486AbdKHOSH (ORCPT ); Wed, 8 Nov 2017 09:18:07 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vA8EGgBS018696 for ; Wed, 8 Nov 2017 09:18:07 -0500 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2e437msfnq-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 08 Nov 2017 09:18:06 -0500 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 8 Nov 2017 14:18:04 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 8 Nov 2017 14:18:01 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vA8EI1H136831456; Wed, 8 Nov 2017 14:18:01 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B1F6652043; Wed, 8 Nov 2017 13:11:51 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 5BE3C52041; Wed, 8 Nov 2017 13:11:51 +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 2/3] zfcp: purely mechanical update using timer API, plus blank lines Date: Wed, 8 Nov 2017 15:17:08 +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-0008-0000-0000-000004A8FC6E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110814-0009-0000-0000-00001E3B9951 Message-Id: <20171108141709.79074-3-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 erp_memwait only occurs in seldom memory pressure situations. The typical case never uses the associated timer and thus also does not need to initialize the timer. Also, we don't want to re-initialize the timer each time we re-use an erp_action in zfcp_erp_setup_act() [see also v4.14-rc7 commit ab31fd0ce65e ("scsi: zfcp: fix erp_action use-before-initialize in REC action trace") for erp_action life cycle]. Hence, retain the lazy inintialization of zfcp_erp_action.timer in zfcp_erp_strategy_memwait(). Add an empty line after declarations in zfcp_erp_timeout_handler() and zfcp_fsf_request_timeout_handler() even though it was also missing before the timer conversion. Fix checkpatch warning: WARNING: function definition argument 'struct timer_list *' should also have an identifier name +extern void zfcp_erp_timeout_handler(struct timer_list *); 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_erp.c | 5 ++--- drivers/s390/scsi/zfcp_ext.h | 2 +- drivers/s390/scsi/zfcp_fsf.c | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 822a852d578e..1d91a32db08e 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -56,8 +56,6 @@ enum zfcp_erp_act_result { ZFCP_ERP_NOMEM = 5, }; -static void zfcp_erp_memwait_handler(struct timer_list *t); - static void zfcp_erp_adapter_block(struct zfcp_adapter *adapter, int mask) { zfcp_erp_clear_adapter_status(adapter, @@ -239,7 +237,6 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status, erp_action->fsf_req_id = 0; erp_action->action = need; erp_action->status = act_status; - timer_setup(&erp_action->timer, zfcp_erp_memwait_handler, 0); return erp_action; } @@ -571,6 +568,7 @@ void zfcp_erp_timeout_handler(struct timer_list *t) { struct zfcp_fsf_req *fsf_req = from_timer(fsf_req, t, timer); struct zfcp_erp_action *act = fsf_req->erp_action; + zfcp_erp_notify(act, ZFCP_STATUS_ERP_TIMEDOUT); } @@ -583,6 +581,7 @@ static void zfcp_erp_memwait_handler(struct timer_list *t) static void zfcp_erp_strategy_memwait(struct zfcp_erp_action *erp_action) { + timer_setup(&erp_action->timer, zfcp_erp_memwait_handler, 0); erp_action->timer.expires = jiffies + HZ; add_timer(&erp_action->timer); } diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h index 978a0d596f68..bf8ea4df2bb8 100644 --- a/drivers/s390/scsi/zfcp_ext.h +++ b/drivers/s390/scsi/zfcp_ext.h @@ -69,7 +69,7 @@ extern int zfcp_erp_thread_setup(struct zfcp_adapter *); extern void zfcp_erp_thread_kill(struct zfcp_adapter *); extern void zfcp_erp_wait(struct zfcp_adapter *); extern void zfcp_erp_notify(struct zfcp_erp_action *, unsigned long); -extern void zfcp_erp_timeout_handler(struct timer_list *); +extern void zfcp_erp_timeout_handler(struct timer_list *t); /* zfcp_fc.c */ extern struct kmem_cache *zfcp_fc_req_cache; diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 6f437df1995f..51b81c0a0652 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -25,6 +25,7 @@ static void zfcp_fsf_request_timeout_handler(struct timer_list *t) { struct zfcp_fsf_req *fsf_req = from_timer(fsf_req, t, timer); struct zfcp_adapter *adapter = fsf_req->adapter; + zfcp_qdio_siosl(adapter); zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, "fsrth_1"); -- 2.13.5 From 1583528126599652735@xxx Wed Nov 08 19:41:43 +0000 2017 X-GM-THRID: 1583528126599652735 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread