From patchwork Thu Feb 6 21:38:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Farman X-Patchwork-Id: 11369251 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE867109A for ; Thu, 6 Feb 2020 21:38:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6D61217BA for ; Thu, 6 Feb 2020 21:38:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727550AbgBFVid (ORCPT ); Thu, 6 Feb 2020 16:38:33 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58472 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727456AbgBFVic (ORCPT ); Thu, 6 Feb 2020 16:38:32 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 016LbnEH163232 for ; Thu, 6 Feb 2020 16:38:31 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2y0mdx6f17-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 06 Feb 2020 16:38:31 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 6 Feb 2020 21:38:29 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 6 Feb 2020 21:38:28 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 016LcQKo47644832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 6 Feb 2020 21:38:26 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9E77A11C054; Thu, 6 Feb 2020 21:38:26 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8B16011C04A; Thu, 6 Feb 2020 21:38:26 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 6 Feb 2020 21:38:26 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 4958) id BBCA9E029F; Thu, 6 Feb 2020 22:38:25 +0100 (CET) From: Eric Farman To: Cornelia Huck Cc: Halil Pasic , Jason Herne , Jared Rossi , Eric Farman , linux-s390@vger.kernel.org, kvm@vger.kernel.org Subject: [RFC PATCH v2 9/9] vfio-ccw: Remove inline get_schid() routine Date: Thu, 6 Feb 2020 22:38:25 +0100 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200206213825.11444-1-farman@linux.ibm.com> References: <20200206213825.11444-1-farman@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 20020621-0020-0000-0000-000003A7B506 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20020621-0021-0000-0000-000021FF85F8 Message-Id: <20200206213825.11444-10-farman@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-06_04:2020-02-06,2020-02-06 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 adultscore=0 mlxscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 phishscore=0 suspectscore=0 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002060157 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This seems misplaced in the middle of FSM, returning the schid field from inside the private struct. We could move this macro into vfio_ccw_private.h, but this doesn't seem to simplify things that much. Let's just remove it, and use the field directly. Signed-off-by: Eric Farman --- drivers/s390/cio/vfio_ccw_fsm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/s390/cio/vfio_ccw_fsm.c b/drivers/s390/cio/vfio_ccw_fsm.c index 23e61aa638e4..c4c303645d7d 100644 --- a/drivers/s390/cio/vfio_ccw_fsm.c +++ b/drivers/s390/cio/vfio_ccw_fsm.c @@ -228,10 +228,6 @@ static void fsm_disabled_irq(struct vfio_ccw_private *private, */ cio_disable_subchannel(sch); } -inline struct subchannel_id get_schid(struct vfio_ccw_private *p) -{ - return p->sch->schid; -} /* * Deal with the ccw command request from the userspace. @@ -244,7 +240,7 @@ static void fsm_io_request(struct vfio_ccw_private *private, struct ccw_io_region *io_region = private->io_region; struct mdev_device *mdev = private->mdev; char *errstr = "request"; - struct subchannel_id schid = get_schid(private); + struct subchannel_id schid = private->sch->schid; private->state = VFIO_CCW_STATE_CP_PROCESSING; memcpy(scsw, io_region->scsw_area, sizeof(*scsw)); @@ -342,7 +338,7 @@ static void fsm_async_request(struct vfio_ccw_private *private, cmd_region->ret_code = -EINVAL; } - trace_vfio_ccw_fsm_async_request(get_schid(private), + trace_vfio_ccw_fsm_async_request(private->sch->schid, cmd_region->command, cmd_region->ret_code); }