Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751722AbdF1KUK (ORCPT ); Wed, 28 Jun 2017 06:20:10 -0400 Received: from 8bytes.org ([81.169.241.247]:47646 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751545AbdF1KUD (ORCPT ); Wed, 28 Jun 2017 06:20:03 -0400 Date: Wed, 28 Jun 2017 12:20:00 +0200 From: Joerg Roedel To: Arvind Yadav Cc: dwmw2@infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu/vt-d: constify intel_dma_ops. Message-ID: <20170628102000.GI14532@8bytes.org> References: <20170628085318.GB14532@8bytes.org> <0868ed89-f9f2-1983-ea63-2e391142b44b@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0868ed89-f9f2-1983-ea63-2e391142b44b@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 506 Lines: 12 On Wed, Jun 28, 2017 at 03:31:16PM +0530, Arvind Yadav wrote: > Most dma_map_ops structures are never modified. Constify these > structures such that these can be write-protected. This file size diff > will show the difference between data and text segment. I know what the diff shows, but it doesn't matter for this patch because thats just an implementation detail of the compiler. The real reason for making it 'const' is to write-protect them, and that should be clear in the commit-message. Joerg