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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 85B94C43334 for ; Tue, 5 Jul 2022 21:39:00 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.361607.591198 (Exim 4.92) (envelope-from ) id 1o8qFu-0004OB-8R; Tue, 05 Jul 2022 21:38:50 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 361607.591198; Tue, 05 Jul 2022 21:38:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o8qFu-0004O4-46; Tue, 05 Jul 2022 21:38:50 +0000 Received: by outflank-mailman (input) for mailman id 361607; Tue, 05 Jul 2022 21:38:48 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o8qFs-0004Ny-Mw for xen-devel@lists.xenproject.org; Tue, 05 Jul 2022 21:38:48 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o8qFs-0006BA-3l; Tue, 05 Jul 2022 21:38:48 +0000 Received: from gw1.octic.net ([81.187.162.82] helo=[10.0.1.102]) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o8qFr-00072S-UC; Tue, 05 Jul 2022 21:38:48 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID; bh=Ho4kPetw5Wo51UAeG59Zo1LSsQ2wLJNgpP0wjzFmErA=; b=xHIuiFLNIFWeUSfZUGSqN/QGsA jN5AQmjiLfI3bVxWuSXSpKfDQlP56aPkkwCpJFxMkuKxAOiq/oXoYH4nPPFOCED9GXzJ1vucGPqqG Y22aOwd1vOIVfEpVFp3HJqbfqKsVY8wfdqynUCUf2mWkdz8zidZuf+Af6YMz6FXY1L5Q=; Message-ID: <47ed7737-5422-e4be-c99d-0e448616f5b5@xen.org> Date: Tue, 5 Jul 2022 22:38:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 4/4] xen/char: pv_console: Fix MISRA C 2012 Rule 8.4 violation To: Xenia Ragiadakou , xen-devel@lists.xenproject.org Cc: Andrew Cooper , George Dunlap , Jan Beulich , Stefano Stabellini , Wei Liu References: <20220705210218.483854-1-burzalodowa@gmail.com> <20220705210218.483854-5-burzalodowa@gmail.com> From: Julien Grall In-Reply-To: <20220705210218.483854-5-burzalodowa@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Xenia, On 05/07/2022 22:02, Xenia Ragiadakou wrote: > The function pv_console_evtchn() is defined in the header . > If the header happens to be included by multiple files, this can result in > linker errors due to multiple definitions, > So, it is more appropriate to resolve this MISRA C 2012 Rule 8.4 violation > warning by making pv_console_evtchn() inline with internal linkage. There are multiple version of pv_console_evtchn(). The version below is only used when !CONFIG_XEN_GUEST. The header is also included multiple time within Xen. So I am a bit puzzled why we haven't seen this error before. Maybe this is unused when !CONFIG_XEN_GUEST? If yes, I would remove the call. If no, then I think the commit message should be clarified. Cheers, -- Julien Grall