Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1B78C64EC4 for ; Tue, 7 Feb 2023 12:19:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231683AbjBGMTq (ORCPT ); Tue, 7 Feb 2023 07:19:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231171AbjBGMTo (ORCPT ); Tue, 7 Feb 2023 07:19:44 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ADE219680; Tue, 7 Feb 2023 04:19:43 -0800 (PST) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 317CFosu028678; Tue, 7 Feb 2023 12:19:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=date : from : to : cc : subject : message-id : reply-to : references : mime-version : content-type : in-reply-to; s=qcppdkim1; bh=08pdHCf7P+mWHAuX1oSIS3ZoUpqc9D23ReOoKSnLbJM=; b=O69c/Qjt1c1S6YT6HOJwh+e4yvhIv221kugPfjhSvnMgI/CfuUsO4br28vbtmu2NDtmg RwCKPa2O/ZFyI4QI/t2BtiGxqZYco8AWNkHbEpYuMDJi4KHKUoZ+/fIYsvVc9FN1VnjV nKcMLE2fgclFWo0y5LK3t+izSEeaExoN0y+LRwEPHCohD5/nFtfcTuEPP9AkesaisuL5 t/MTgmH3DjPKZy8CTJhFL//Gcgeaxz4g3gXjHqHcurJcU7x+wqINGXi5qtBVfkiJLJn7 4zV+QzufDUcTwRf8IHZokI1wQP0At0BbvrRg6+0FpF26PHNxMRcAo4MUwhsicN2G48E3 WQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nkk2d0g07-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Feb 2023 12:19:24 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 317CJNS1005421 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 7 Feb 2023 12:19:23 GMT Received: from quicinc.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 7 Feb 2023 04:19:15 -0800 Date: Tue, 7 Feb 2023 17:49:11 +0530 From: Srivatsa Vaddagiri To: Elliot Berman CC: Bjorn Andersson , Alex Elder , Murali Nalajala , Trilok Soni , Carl van Schaik , Prakruthi Deepak Heragu , Dmitry Baryshkov , Arnd Bergmann , "Greg Kroah-Hartman" , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet , Bagas Sanjaya , Catalin Marinas , Will Deacon , Marc Zyngier , Jassi Brar , Sudeep Holla , , , , , Subject: Re: [PATCH v9 23/27] virt: gunyah: Add IO handlers Message-ID: <20230207121911.GH332@quicinc.com> Reply-To: Srivatsa Vaddagiri References: <20230120224627.4053418-1-quic_eberman@quicinc.com> <20230120224627.4053418-24-quic_eberman@quicinc.com> <20230206104637.GG332@quicinc.com> <5b4b0c3b-0d1f-5f6c-d541-744c9a7173f8@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline In-Reply-To: <5b4b0c3b-0d1f-5f6c-d541-744c9a7173f8@quicinc.com> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: OYGe71EgD72nDZ8wuP3kIdX3x3K9VFZH X-Proofpoint-ORIG-GUID: OYGe71EgD72nDZ8wuP3kIdX3x3K9VFZH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-07_03,2023-02-06_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 impostorscore=0 phishscore=0 lowpriorityscore=0 suspectscore=0 mlxlogscore=522 clxscore=1015 mlxscore=0 adultscore=0 priorityscore=1501 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302070109 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Elliot Berman [2023-02-06 19:59:30]: > > > +int gh_vm_mgr_add_io_handler(struct gunyah_vm *ghvm, struct gunyah_vm_io_handler *io_hdlr) > > > +{ > > > + struct rb_node **root, *parent = NULL; > > > + > > > + if (io_hdlr->datamatch && > > > + (!io_hdlr->len || io_hdlr->len > (sizeof(io_hdlr->data) * BITS_PER_BYTE))) io_hdlr->len represents length in bytes AFAICS so the above test should be: (!io_hdlr->len || io_hdlr->len > (sizeof(io_hdlr->data) ))) ?