Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp950197pxb; Sat, 17 Apr 2021 01:46:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxB32ByqkPW45LtOuCbR1Ibq4VJNmC9rCuV5iXiaFdvvkQsasMiRpWR3/Xal3SnHW1ciFND X-Received: by 2002:a17:902:b483:b029:e9:eef4:4f16 with SMTP id y3-20020a170902b483b02900e9eef44f16mr13689062plr.38.1618649166253; Sat, 17 Apr 2021 01:46:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618649166; cv=none; d=google.com; s=arc-20160816; b=H1lABZdlJw+U0/EkGTlBizUv0lJ9/2U9KJpyz0i5IprG4QGWULtz7BOzTrNwPcHxIi +gparNYZMe8XlCSsKKuXlRlF7p0eDWPB0QFTVtnZMTx1PS6KjHstUjwKywIisRiXKO/7 dAK6UAwiVriZFxOQYeTZaymd6Xng0D8X+Ixi94Ojg7JgRPBqrYPOu5+WtrSiGg6oEANL sNG5ygjnBOIsb2zP4EwGc0LV7JhLaqwK9VEnJuNxgNIlyxKMcnu/T/w0koEc5apQn1jE eWrmp1kVv588Wzr1I8g1Koa2J+aFuxiYdoFD9Zc6y4f+/wHsUa02EBBmQR0x6PYQ+5pn 70cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=+1Q4Y4OsTe/+q4BHmy+PNB5kI04zWg8onQ1sGOoIIjU=; b=Kll3J2OR0PcPCIOn/Oi4E82ZAMXdedL1b+9G7lbxH8k9L8VM0ulfUrShEKlZpUYhah 5DY8XN6517UJdUJ9ZzUX1pMJOTFPdGnwi7MYM3DebN7ZZ1+LHjcsLenlNBAz4+CcA2H3 JW92+UBm4F+a8MZ1qwHXO0yKcNuf0kHjokUIN0bRXliQbKtjuegAFsUocx8IhnSTJD/k b3wT8bC7m5ZB+rAt0E2BM4UVrmW4Joa7AMtRQDcUQZ1SnSGKsVEqH+tH8Md9MclU5eCv zXRmF/kyrzVHDBKbKkBPTCYBy5UoaxkO6YUmqfxa2KY1qcnWGJTZCpxdK8vXZJMyin5t Sq0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x6si8747104pfm.286.2021.04.17.01.45.53; Sat, 17 Apr 2021 01:46:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235685AbhDQInR (ORCPT + 99 others); Sat, 17 Apr 2021 04:43:17 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:17368 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229631AbhDQInQ (ORCPT ); Sat, 17 Apr 2021 04:43:16 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FMmkb0bKTzlYKg; Sat, 17 Apr 2021 16:40:55 +0800 (CST) Received: from [10.174.185.179] (10.174.185.179) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.498.0; Sat, 17 Apr 2021 16:42:39 +0800 Subject: Re: [PATCH v19 7/7] ptp: arm/arm64: Enable ptp_kvm for arm/arm64 To: Marc Zyngier CC: , , , , , , , , , , , , , , , , , , , References: <20210330145430.996981-1-maz@kernel.org> <20210330145430.996981-8-maz@kernel.org> From: Zenghui Yu Message-ID: Date: Sat, 17 Apr 2021 16:42:37 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20210330145430.996981-8-maz@kernel.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.185.179] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/3/30 22:54, Marc Zyngier wrote: > +int kvm_arch_ptp_init(void) > +{ > + int ret; > + > + ret = kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_PTP); > + if (ret <= 0) kvm_arm_hyp_service_available() returns boolean. Maybe write as ? bool ret; ret = kvm_arm_hyp_service_available(); if (!ret) return -ENODEV; > + return -EOPNOTSUPP; > + > + return 0; > +}