Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2838173rwi; Fri, 28 Oct 2022 11:57:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Qw6bF8WyTbLGrcbWmk2bajD2i5i6rMU/uiNjc8T6g42zNx5iP1CCiT2rQ4hIC2CJnG6Sm X-Received: by 2002:a65:628f:0:b0:43c:dac:646a with SMTP id f15-20020a65628f000000b0043c0dac646amr798292pgv.397.1666983429800; Fri, 28 Oct 2022 11:57:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666983429; cv=none; d=google.com; s=arc-20160816; b=ya5Pd9h/8mWLpo2UHXMf3O+JTcff7JmEbwWX+GyHXmp3EQ+nCAzxqpFi3wUCXYSu80 Aq48Q4hQ0wJK1iqxPFcPLjcZiZZpeefWaP1Gk3WRTJdt79+gSOD/iYlIAMpf92pdgOsi WaHTqSohLZ4sR149ktZr2P/rjmu/sXEyGygIfrEbv/zUM1F8wtwDPEpiQc8IyNx2WNYK h7w2vm88IG/y8njoNDIiITX+3nxIhcxBG6e6RRsgxSnROps8PPpx7PUQIY4ikBlK8KqN ssrz9Wd/HF/ZhP9lQcBg87u+RqgazJzoZgc8HUtBZuCPqpskRRRS9KumwXUiR3OIHYBr 4CEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=SO4VW/8VmydBmQcvcXcbIveGkrMLYL3hskWB6VxXLow=; b=nfoBeLimM0cY/BSrmu54ykTFu34f8ToR95Obph/2weYbUmbvJSFG4+zL4kzWAaVksB MmIuBSv16bsG6EX2PlTiK3HKrmv8rNssSpikA532XQEHNYQXcjkFHOaVLROuNq30AKfF DFnIC7ZGTMoGDtIpnt2UbeybY2Z0TyxSQjYcY+cjgEOE3eedcRS4WJweSCFA7Bm3ulR5 dovJEXE2bqccYg2C/F807+Mr0Vpcnmdn1SD/9h90/z4BY8Jbf/HyqJng2jtIONYFU7iC S+a6MhMD5F8r1zo+QZa7mBfRBLfE3wPjQHV5Bus0VT0JwHmCrq893g/eJ/faNfbDal7r NkYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=dbydvazL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w18-20020a627b12000000b00561741403adsi5684353pfc.182.2022.10.28.11.56.58; Fri, 28 Oct 2022 11:57:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=dbydvazL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230140AbiJ1Sny (ORCPT + 99 others); Fri, 28 Oct 2022 14:43:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230151AbiJ1Snv (ORCPT ); Fri, 28 Oct 2022 14:43:51 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32EFC244730; Fri, 28 Oct 2022 11:43:49 -0700 (PDT) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29SHnXR2028950; Fri, 28 Oct 2022 18:43:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=SO4VW/8VmydBmQcvcXcbIveGkrMLYL3hskWB6VxXLow=; b=dbydvazLhzgAOT26kQOJg6tpJTihp8Se8b5SXRDODD3NMnc4a1YqfA3Eee+BzzHGyMB6 859awMpUfWW0MJyzadb6IIsGWWtR6+E45CjzOjwUBlr4Gx8k7ozsJsSdO/QzVzIulR9N cxEc48630QAbOyrCOLy0esXdNP/wYsPkIaRz+FvTfaswhkrfVcIGTBlGJWAgV5M/QZ+z dsHSbDhwirVkcKQfsU3L8bZObRlYO8OqKf+iAB4S+oIK3Lm9JzA4nsBeJ3vbOe7WUXy2 TPgufyFdeAv6EVq5wTT4418Iem7yD+SpNgZdshnFdFwhNjd4OFR4pTmlJ8/mk0Oq31Ho ig== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kgktthru0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Oct 2022 18:43:11 +0000 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 29SHoHcs030205; Fri, 28 Oct 2022 18:43:09 GMT Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kgktthrr2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Oct 2022 18:43:08 +0000 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 29SIaB7c020594; Fri, 28 Oct 2022 18:43:07 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma03wdc.us.ibm.com with ESMTP id 3kfahenqpj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Oct 2022 18:43:07 +0000 Received: from smtpav03.wdc07v.mail.ibm.com ([9.208.128.112]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 29SIh6vL6881864 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Oct 2022 18:43:06 GMT Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F0FD15805A; Fri, 28 Oct 2022 18:43:05 +0000 (GMT) Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 60CCA58058; Fri, 28 Oct 2022 18:43:02 +0000 (GMT) Received: from [9.160.93.208] (unknown [9.160.93.208]) by smtpav03.wdc07v.mail.ibm.com (Postfix) with ESMTP; Fri, 28 Oct 2022 18:43:02 +0000 (GMT) Message-ID: <6ab3ceb4-37fa-a879-2db0-a59acacbdabd@linux.ibm.com> Date: Fri, 28 Oct 2022 14:43:01 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v1 2/7] vfio/ccw: remove private->sch Content-Language: en-US To: Eric Farman , Alex Williamson , Cornelia Huck , Jason Gunthorpe , Kevin Tian , Yi Liu Cc: Zhenyu Wang , Zhi Wang , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Halil Pasic , Vineeth Vijayan , Peter Oberparleiter , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Tony Krowiak , Jason Herne , Harald Freudenberger , Diana Craciun , Eric Auger , Kirti Wankhede , Abhishek Sahu , Yishai Hadas , intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org References: <20221019162135.798901-1-farman@linux.ibm.com> <20221019162135.798901-3-farman@linux.ibm.com> From: Matthew Rosato In-Reply-To: <20221019162135.798901-3-farman@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: QpgekcK-lB5oIfRTGRyS05JBVjDSEnMY X-Proofpoint-ORIG-GUID: JrmbtmFXU58Hkg5rBVXRqcrAbi_RHRSb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-28_07,2022-10-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 malwarescore=0 clxscore=1015 suspectscore=0 spamscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210280113 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/19/22 12:21 PM, Eric Farman wrote: > These places all rely on the ability to jump from a private > struct back to the subchannel struct. Rather than keeping a > copy in our back pocket, let's use the relationship provided > by the vfio_device embedded within the private. > > Signed-off-by: Eric Farman > --- > drivers/s390/cio/vfio_ccw_chp.c | 5 +++-- > drivers/s390/cio/vfio_ccw_drv.c | 3 +-- > drivers/s390/cio/vfio_ccw_fsm.c | 27 ++++++++++++--------------- > drivers/s390/cio/vfio_ccw_ops.c | 12 ++++++------ > drivers/s390/cio/vfio_ccw_private.h | 7 ++++--- > 5 files changed, 26 insertions(+), 28 deletions(-) > > diff --git a/drivers/s390/cio/vfio_ccw_chp.c b/drivers/s390/cio/vfio_ccw_chp.c > index 13b26a1c7988..d3f3a611f95b 100644 > --- a/drivers/s390/cio/vfio_ccw_chp.c > +++ b/drivers/s390/cio/vfio_ccw_chp.c > @@ -16,6 +16,7 @@ static ssize_t vfio_ccw_schib_region_read(struct vfio_ccw_private *private, > char __user *buf, size_t count, > loff_t *ppos) > { > + struct subchannel *sch = to_subchannel(private->vdev.dev->parent); I'm not a big fan of the amount of indirection there, but I prefer this over back-pocketing the subchannel in vfio_ccw_private anyway Reviewed-by: Matthew Rosato