Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1101774imu; Mon, 5 Nov 2018 13:58:41 -0800 (PST) X-Google-Smtp-Source: AJdET5e+lkAMytf830AbTLrbCkMwWcMZM/3I37PSSqcbWpLt9uoM4NJZevTDxsNX5MPccbO+kgN9 X-Received: by 2002:a17:902:8d94:: with SMTP id v20-v6mr24062692plo.109.1541455121816; Mon, 05 Nov 2018 13:58:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541455121; cv=none; d=google.com; s=arc-20160816; b=U3QjSzNoSfXp8gxEtqaga1AOthqyCOr/mTg5oDZwbdEfc2uZcEyn7+z6xgAui15Y0j SOGrFl2JbvbhW9DSkFAvuoif/RxRixTevbuZckKdoLGBCpfYGHhFCxMGkZ6h+w9Bcgrh N7RDWYhzy1P+WLzPHKn/Nj+bR8BMp8CKwPQiJo7Gt5j328+ZwJNDIip6XzunUYKFcLc2 FDZIG7Q2ZlEUyd+7teGss4QqzAKQlyCMe8bRRggT3MEt+jFR5sek+JeQyshoNZ1WzTmb FBpq9xTK4yhTRw04v/+ts3Wl5t0tKXLjbkYEvzmbwsdEWPhFu/YQiO7/czNWwJ56lJlC Lgvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QxadfPa3u1K8ALgcaMuzHbPz65rwtPPP01Zwshr7w5I=; b=SNT17br/vN01OP2cne36Wuh0Lcs+NEbb838HVFq4n0HbtIo02G4p6LX6TIi88IlpCB EE/yESGUL/aZjAMZZXXgtPWeAmlt6qzIxhcA/Q3vjqroR4B71fPOwBp/Q9FMZIDD+r2F o+r0gjJUoZu6itQlxtEIA5MXu6T8NDRROK1974wDE14cYCivbgYH2Bz6bRP7FHh4pHtm diELqM11jQmZXxmY/f6uxfPReaVJzkRsyX+oJ7x+aBDcOB2cteLdssOWMGMQv5F9ZClu aNzMLiF430TP2+Eu1ThymXSEiC2Z6Enn2wXYrdG4bBZBB3/2/QD5a3ljirfIWf1Dqcvv boOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=E8yoerK+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y34-v6si46042203plb.46.2018.11.05.13.58.26; Mon, 05 Nov 2018 13:58:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=E8yoerK+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388113AbeKFHTq (ORCPT + 99 others); Tue, 6 Nov 2018 02:19:46 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:42992 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387580AbeKFHTq (ORCPT ); Tue, 6 Nov 2018 02:19:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=QxadfPa3u1K8ALgcaMuzHbPz65rwtPPP01Zwshr7w5I=; b=E8yoerK+R5Pn9Zg2Wsv2zDQA4 XkGhQx0RvhdCwRrGzvadmlSONd1MAvRBOPtnrViuCb8j5EflLa5bc4iWO7vgv+s/DPedBB7Q10k7e cgcmRjN4Ax4rUY3vO+D5o+Kq002GoAw507bAgf7l8kPGZLNRB809W+wfSLKIadQjFbyEbt5KstkRW vi/ptQCp/HNd06GhF89x3gSXncMIxTGRXWn1dSgXINBqHAYSVySqko5vYf/yR1lZYPJ5pvLgxBvPV CO6ut995ExjU8EJPI9gBsqe+LQLAqeJbeXM6S0JyLMIAueQD/CWrWCcKNoGk/h3ASyYB/kPjXpMAP sBBzNj5LQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gJmsT-0002H1-Fl; Mon, 05 Nov 2018 21:57:45 +0000 Date: Mon, 5 Nov 2018 13:57:45 -0800 From: Christoph Hellwig To: Zubin Mithra Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, groeck@chromium.org, keescook@chromium.org Subject: Re: [PATCH] x86/pci: Annotate 'pci_root_ops' with __ro_after_init Message-ID: <20181105215745.GB3160@infradead.org> References: <20181105201735.72026-1-zsm@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181105201735.72026-1-zsm@chromium.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 05, 2018 at 12:17:35PM -0800, Zubin Mithra wrote: > When CONFIG_X86_INTEL_MID is set pci_root_ops is written to inside > intel_mid_pci_init(which is marked __init) and not modified after. This > makes pci_root_ops a suitable candidate for annotating as > __ro_after_init. Yikes. pci_root_ops really should be const to start with, and we should use a separate struct for MID. Having structures that contain function pointers not marked const is generally a bad idea to start with.