From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70AC0C3815B for ; Mon, 20 Apr 2020 10:44:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E5A320CC7 for ; Mon, 20 Apr 2020 10:44:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="i5j1nuRn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726138AbgDTKoN (ORCPT ); Mon, 20 Apr 2020 06:44:13 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:51840 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725773AbgDTKoM (ORCPT ); Mon, 20 Apr 2020 06:44:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587379451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T/xjJsUgF778LpNzZZV/h2y2cV6lCn7Ce6da2WhB8fs=; b=i5j1nuRn7Y1+tUYAZeOaLVPWRsEIpEbfWRLE2Ennf/kqj960j3fLARP37kUaXFQyTn4P7s dKBTFG+uehQsE5wsuEmTV0v2pTytUO0M5o1tioE/iUe8hpU7wxuaEV86uJmm/LPsL6TFoM Vs/niuqXzNjDextqwO8PPGLfrW+7aJs= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-34-G7cjnHKvN26_nQbmfDdevA-1; Mon, 20 Apr 2020 06:44:05 -0400 X-MC-Unique: G7cjnHKvN26_nQbmfDdevA-1 Received: by mail-ej1-f70.google.com with SMTP id q24so6117125ejb.3 for ; Mon, 20 Apr 2020 03:44:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=T/xjJsUgF778LpNzZZV/h2y2cV6lCn7Ce6da2WhB8fs=; b=LqDiAn/8jRFr9g/bwj2pLuSI5sjFuFNomuKJcAU7dZp6nJf8vGtE1xeL7MUQtXVyE3 S2W2NUoTYihBkmGrB152lDcsC/bYoqw07ja0RB/5pt7I1Uh7mSsVj8zMHqshoMJYIeTZ Qmc+3v9sEMgFXAgLQ9yvxQ5t8yXDujVAsvirt8plX5ewh1GwGRog9W0hSmqYgrO6QHWQ zrFnAcJALF9xBIUqoL0+jYgYriWjDtJadCAS7BfOE8AKGupWEwEJMdqTs/mQe1WbDE3P dMseMdPQzvO76QtWxPie4CRAKCLl1jS+clg4GdxrmxDewCam/zePvsdO947QOvHdfO0D UHEg== X-Gm-Message-State: AGi0PuaeDA8mR5ZIYm5qEPyh99xMmyHciOAXB4s6Yanu5roD8GMDCN1e OdSFleC1emAT1Jvt6379urUe7n0qeirGYk5dno4lt6WHPyKK0iTkU5StpzK6tz3jb2XmgqIMQZS s0woKzB5XASvh X-Received: by 2002:a17:906:298f:: with SMTP id x15mr15459768eje.380.1587379444245; Mon, 20 Apr 2020 03:44:04 -0700 (PDT) X-Google-Smtp-Source: APiQypKapnJbCH/Kuk3uuqBQKtd5dm/azVYbWC7aCH/L/nUed6lIVglsjt8ASpV3nhRhiQz38THiWA== X-Received: by 2002:a17:906:298f:: with SMTP id x15mr15459754eje.380.1587379444049; Mon, 20 Apr 2020 03:44:04 -0700 (PDT) Received: from [192.168.1.39] (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id mj1sm107969ejb.6.2020.04.20.03.44.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Apr 2020 03:44:03 -0700 (PDT) Subject: Re: [PATCH v3 01/19] target/arm: Rename KVM set_feature() as kvm_set_feature() To: Peter Maydell Cc: Richard Henderson , QEMU Developers , =?UTF-8?Q?Alex_Benn=c3=a9e?= , kvm-devel , Thomas Huth , qemu-arm , Fam Zheng , Paolo Bonzini References: <20200316160634.3386-1-philmd@redhat.com> <20200316160634.3386-2-philmd@redhat.com> <3dc0e645-05a5-938c-4277-38014e4a68a3@redhat.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Message-ID: <7f49bc68-8c40-42b9-7810-fc1f9f6ff904@redhat.com> Date: Mon, 20 Apr 2020 12:44:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On 4/19/20 9:58 PM, Peter Maydell wrote: > On Sun, 19 Apr 2020 at 17:31, Philippe Mathieu-Daudé wrote: >> >> On 3/17/20 10:09 AM, Philippe Mathieu-Daudé wrote: >>> On 3/16/20 9:16 PM, Richard Henderson wrote: >>>> On 3/16/20 9:06 AM, Philippe Mathieu-Daudé wrote: >>>>> +++ b/target/arm/kvm32.c >>>>> @@ -22,7 +22,7 @@ >>>>> #include "internals.h" >>>>> #include "qemu/log.h" >>>>> -static inline void set_feature(uint64_t *features, int feature) >>>>> +static inline void kvm_set_feature(uint64_t *features, int feature) >>>> >>>> Why, what's wrong with the existing name? >> >> Peter suggested the rename here: >> https://www.mail-archive.com/qemu-devel@nongnu.org/msg641931.html > > In that message I suggest that if you move the set_feature() > function to cpu.h (which is included in lots of places) then > that is too generic a name to use for it. The function of > the same name here in kvm32.c is fine, because it's > 'static inline' and only visible in this file, so the bar > for naming is lower. (In fact, it's a demonstration of why > you don't want a generic name like 'set_feature' in a widely > included header file.) And your suggestion is indeed obviously correct... Apparently after 19 months rebasing this work I'm not seeing clearly. Thanks again! From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A08EC3815B for ; Mon, 20 Apr 2020 10:47:53 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F31CE205C9 for ; Mon, 20 Apr 2020 10:47:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OELxCaZ/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F31CE205C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQTxw-0002tV-6P for qemu-devel@archiver.kernel.org; Mon, 20 Apr 2020 06:47:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58264 helo=eggs1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQTuS-0006fB-1R for qemu-devel@nongnu.org; Mon, 20 Apr 2020 06:44:16 -0400 Received: from Debian-exim by eggs1p.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQTuQ-0007Nz-8t for qemu-devel@nongnu.org; Mon, 20 Apr 2020 06:44:15 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:22836 helo=us-smtp-1.mimecast.com) by eggs1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jQTuP-0007Ll-RS for qemu-devel@nongnu.org; Mon, 20 Apr 2020 06:44:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587379449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Bc6eIxxy3ZCmKxtQ46FNChc6DV2SqQpWx9zlOiSS+j0=; b=OELxCaZ/yP2MTucIbcCvTeTirwBkt1GZLM4wADZtMmu4NQ0XE+9nxtZ1+8cnM9N2CuQWIC jSWf396UCvSFOAYul7twh9JdCGOY7Gd1YfKgXNkCwYfx4NCPeLfhI/VfpLNIxy9jeTaY09 xgyCH7WzeRDbyJUQ/QzOqV7LEuqeWVw= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-5-SphKJCpxNb6kCXetDZxX7w-1; Mon, 20 Apr 2020 06:44:05 -0400 X-MC-Unique: SphKJCpxNb6kCXetDZxX7w-1 Received: by mail-ed1-f71.google.com with SMTP id v21so3464938edq.14 for ; Mon, 20 Apr 2020 03:44:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=T/xjJsUgF778LpNzZZV/h2y2cV6lCn7Ce6da2WhB8fs=; b=n9bW3LAnWYzd8lX3JjOzEQdHjJ3jjmUIw7jmiYRnIp0W4z0GNbNP5vMEjOV03Pd2Ak Pu/Oir+VxQc5ZlA6FqTiEYCPgRJ78gCKedKtQQwDPfVrUMK+YhifNq46rrxHT7GIQGyJ Wsrcfy08UbyM/hxykPvKJzKwy1c0ZfczocWiVF9McwxdfePATHR3d3beXIfPOYQGsaLc z41uNN2dOWCQo8C4pvS1byTRl4p5TvIqrUhTg3mRMSg597cL8S+KQvn521OsvW3SJREL C5aoFqmHlW8yrR26BV/Kt0ZhFjg0JMYGPZ1j6QiqWzLPplbxCmH3BV4P3aGjFGBAU+Lh 2S6Q== X-Gm-Message-State: AGi0Pub4Xs4L8f8hfsgMD4CQcVc4RNieMGuvOC3FSaO5llkiWeD6f/z4 R92TQqHtgl1w/LeMSYdes+JUeDGiPCapv8zUNorTJTrVc13sbfmbti3hhzovDf7pbbuwuHSePUJ fCik53MS6KEDCbK4= X-Received: by 2002:a17:906:298f:: with SMTP id x15mr15459766eje.380.1587379444245; Mon, 20 Apr 2020 03:44:04 -0700 (PDT) X-Google-Smtp-Source: APiQypKapnJbCH/Kuk3uuqBQKtd5dm/azVYbWC7aCH/L/nUed6lIVglsjt8ASpV3nhRhiQz38THiWA== X-Received: by 2002:a17:906:298f:: with SMTP id x15mr15459754eje.380.1587379444049; Mon, 20 Apr 2020 03:44:04 -0700 (PDT) Received: from [192.168.1.39] (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id mj1sm107969ejb.6.2020.04.20.03.44.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Apr 2020 03:44:03 -0700 (PDT) Subject: Re: [PATCH v3 01/19] target/arm: Rename KVM set_feature() as kvm_set_feature() To: Peter Maydell References: <20200316160634.3386-1-philmd@redhat.com> <20200316160634.3386-2-philmd@redhat.com> <3dc0e645-05a5-938c-4277-38014e4a68a3@redhat.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Message-ID: <7f49bc68-8c40-42b9-7810-fc1f9f6ff904@redhat.com> Date: Mon, 20 Apr 2020 12:44:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=207.211.31.81; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs1p.gnu.org: First seen = 2020/04/20 01:47:04 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Thomas Huth , kvm-devel , Richard Henderson , QEMU Developers , qemu-arm , Paolo Bonzini , =?UTF-8?Q?Alex_Benn=c3=a9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 4/19/20 9:58 PM, Peter Maydell wrote: > On Sun, 19 Apr 2020 at 17:31, Philippe Mathieu-Daud=C3=A9 wrote: >> >> On 3/17/20 10:09 AM, Philippe Mathieu-Daud=C3=A9 wrote: >>> On 3/16/20 9:16 PM, Richard Henderson wrote: >>>> On 3/16/20 9:06 AM, Philippe Mathieu-Daud=C3=A9 wrote: >>>>> +++ b/target/arm/kvm32.c >>>>> @@ -22,7 +22,7 @@ >>>>> #include "internals.h" >>>>> #include "qemu/log.h" >>>>> -static inline void set_feature(uint64_t *features, int feature) >>>>> +static inline void kvm_set_feature(uint64_t *features, int feature) >>>> >>>> Why, what's wrong with the existing name? >> >> Peter suggested the rename here: >> https://www.mail-archive.com/qemu-devel@nongnu.org/msg641931.html >=20 > In that message I suggest that if you move the set_feature() > function to cpu.h (which is included in lots of places) then > that is too generic a name to use for it. The function of > the same name here in kvm32.c is fine, because it's > 'static inline' and only visible in this file, so the bar > for naming is lower. (In fact, it's a demonstration of why > you don't want a generic name like 'set_feature' in a widely > included header file.) And your suggestion is indeed obviously correct... Apparently after 19 months rebasing this work I'm not seeing clearly. Thanks again!