Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933746AbeAHOth (ORCPT + 1 other); Mon, 8 Jan 2018 09:49:37 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:38632 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932200AbeAHOtg (ORCPT ); Mon, 8 Jan 2018 09:49:36 -0500 Subject: Re: [Xen-devel] [PATCH] x86/xen/time: fix section mismatch for xen_init_time_ops() To: Nick Desaulniers Cc: Juergen Gross , Andrew Cooper , x86@kernel.org, Linux Kernel Mailing List , Ingo Molnar , "H. Peter Anvin" , xen-devel@lists.xenproject.org, Thomas Gleixner References: <1514083813-27047-1-git-send-email-nick.desaulniers@gmail.com> <52b547c5-509a-3a82-12cd-4d9d0a06b53f@oracle.com> <87e3dc74-5959-1ecf-6854-fda017c2c775@citrix.com> <6c82c574-6810-1003-183c-44f79ae7554f@oracle.com> From: Boris Ostrovsky Message-ID: Date: Mon, 8 Jan 2018 09:49:14 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8767 signatures=668652 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801080214 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/06/2018 03:35 PM, Nick Desaulniers wrote: > On Tue, Jan 2, 2018 at 7:00 AM, Boris Ostrovsky > wrote: >> On 01/02/2018 09:32 AM, Andrew Cooper wrote: >>> On 02/01/18 14:24, Juergen Gross wrote: >>>> On 02/01/18 15:18, Boris Ostrovsky wrote: >>>>> On 12/23/2017 09:50 PM, Nick Desaulniers wrote: >>>>>> The header declares this function as __init but is defined in __ref >>>>>> section. >>>>>> >>>>>> Signed-off-by: Nick Desaulniers >>>>> AFAIK section attributes in header files are ignored by compiler anyway >>>>> so I'd remove all of them. >>>> Hmm, I'm not sure all future compilers will ignore the section >>>> attributes. include/linux/init.h explictily mentions where to put >>>> the attrubute in a prototype, so I'd rather keep it. >>> Attributes in the declaration are for static analysis tools such as sparse. >>> >>> How else are you going to work out whether a section mismatch has occurred? >> Isn't this done based on definitions? >> >> Tons of __init routines don't have the attribute specified in header >> files. In fact, even in this file (arch/x86/xen/xen-ops.h) there are >> some that don't have it. >> >> -boris > What are the next steps for getting this patch merged? This is the > only function for which I get a compiler warning (with Clang). Do you > require a patch instead that changes more function attributes, or can > that be a follow up patch? Applied to for-linus-4.15. -boris