From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753169AbdK0WhO (ORCPT ); Mon, 27 Nov 2017 17:37:14 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:28936 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752222AbdK0WhN (ORCPT ); Mon, 27 Nov 2017 17:37:13 -0500 Date: Tue, 28 Nov 2017 01:36:57 +0300 From: Dan Carpenter To: Hartley Sweeten Cc: Ian Abbott , Alex Frappier Lachapelle , "greg@kroah.com" , "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] Staging: comedi: das16: Fixed a const struct coding style issue Message-ID: <20171127223657.3qhpyroay4hgqkzu@mwanda> References: <20171126015025.11575-1-Alex.FrappierLachapelle@gmail.com> <434bc019-0204-40a2-7575-14aeb1f7cca5@mev.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 27, 2017 at 05:51:56PM +0000, Hartley Sweeten wrote: > On Monday, November 27, 2017 3:28 AM, Ian Abbott wrote: > > On 26/11/17 01:50, Alex Frappier Lachapelle wrote: > >> + const struct comedi_lrange *lrange; > > > > NAK. The following lines of source code allocate memory pointed to by 'lrange' and modify it, so 'const' is not appropriate here. > > Ian, > > Wonder if it's worth putting a comment about this in the code. This has come up a > couple times. > Making it const generates a compile error. A compile error is worth a thousand comments as they say. regards, dan carpenter