From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751786AbcDQRAP (ORCPT ); Sun, 17 Apr 2016 13:00:15 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:36339 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751193AbcDQRAO (ORCPT ); Sun, 17 Apr 2016 13:00:14 -0400 Message-ID: <5713C107.5070009@gmail.com> Date: Sun, 17 Apr 2016 22:29:51 +0530 From: Sudip Mukherjee User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Greg Kroah-Hartman CC: Arnd Bergmann , Peter Korsgaard , Jiri Slaby , Maarten Brock , Rich Felker , Michal Simek , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH, RESEND] serial-uartlite: un-constify uartlite_be/uartlite_le References: <1460851985-1280235-1-git-send-email-arnd@arndb.de> <20160417003901.GA29002@kroah.com> In-Reply-To: <20160417003901.GA29002@kroah.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sunday 17 April 2016 06:09 AM, Greg Kroah-Hartman wrote: > On Sun, Apr 17, 2016 at 02:12:47AM +0200, Arnd Bergmann wrote: >> The patch to make uartlite_be/uartlite_le const was well-intended but >> caused a new build warning: >> >> tty/serial/uartlite.c: In function 'ulite_request_port': >> tty/serial/uartlite.c:348:21: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] >> tty/serial/uartlite.c:354:22: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] >> >> It would be nice to allow passing const pointers through >> port->private_data, but that would be way more work, so this >> reverts part of the original commit for now. >> >> A possible alternative might be to pass a structure in the private_data >> that contains a const pointer to the operations, which introduces a little >> extra overhead, or we could just add a cast to a non-const pointer, I'll >> leave that to the maintainer. >> >> Signed-off-by: Arnd Bergmann >> Fixes: 2905697a82ea ("serial-uartlite: Constify uartlite_be/uartlite_le") >> --- >> drivers/tty/serial/uartlite.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> I sent this patch on March 10, but it never made it in. >> >> Greg, could you apply the patch as a bugfix for 4.6? The warning is >> annoying as it shows up in several defconfig builds and allmodconfig. > > Ugh, sorry about this, will get to it soon... > A revert patch with the same effect posted on 11th April is also in waiting. http://www.spinics.net/lists/linux-serial/msg22287.html regards sudip