From patchwork Thu Mar 10 01:34:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102603 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp164630lbc; Wed, 9 Mar 2016 17:35:54 -0800 (PST) X-Received: by 10.98.65.82 with SMTP id o79mr1144553pfa.115.1457573754735; Wed, 09 Mar 2016 17:35:54 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g14si2020223pfd.189.2016.03.09.17.35.54; Wed, 09 Mar 2016 17:35:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932503AbcCJBfx (ORCPT + 1 other); Wed, 9 Mar 2016 20:35:53 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:65417 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753586AbcCJBfx (ORCPT ); Wed, 9 Mar 2016 20:35:53 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0LxOmo-1ZlDaE3KBO-016zkW; Thu, 10 Mar 2016 02:35:36 +0100 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Arnd Bergmann , Peter Korsgaard , Jiri Slaby , Maarten Brock , Rich Felker , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] serial-uartlite: un-constify uartlite_be/uartlite_le Date: Thu, 10 Mar 2016 02:34:59 +0100 Message-Id: <1457573729-2802736-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:/mpJnGUp5TYUzGoWebGXy0uafJ1S+ECYXCURmnH2s+WeGo4Vpc9 oX7lNWVzCs79GDzAS9SayTo1HSv32tO/nHuiqvghPPVxgB3twjlbpj28MvmkjerwXN3I8dt 4qO265cnqr2aGvLSvc/B+nC3geJy+sSBo1n5QrjKwoRZF2j3tpg8Xenla0M13rWNNDG2eWZ eBzfITM+I79mTO2Lnll1Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:gl9QxA0q9DA=:xVq4P2cK8IF0van3iGHyhU 5kx4yHRxzSENlQU8pz+bihr5yv+Q6gZaAgcJsZ53D17mxfTBPONF1sBpwGd6rXsRNwtuKEmqt Nor9qUoJpZw5+ftMga9hCkPNPVoeRxaxU/MuRqLiapVYzD+r4qV4o8sSqlgzjDenv2RhobKvV Wq5XFqCEAzUiDiKAm+ej5DIzRAs+Aj6PPzxkr3oromTwHRw4Zlboyn54FoKO7OLgnr0RoHGVd aDDcjn+FgJnkaRR6pApYVuO8KRsrY3InrMruh6BKQvVXpXFdbqb4aM03AOGaVSYUh/iEk1Qy3 fNwCZckfeQl5+vae2G2ltTlMP8ux9wVrrBy+DDcjKCR8WP+k89PUQFfAWjWZ8IqpZwNk7yj6b Bve0eL5eKHJPwNH5ZRrzb7WNyGgKtfPTrAi+2VB5AxC7JSimPFcWVL2gY2RUqrdyo0zLZEmB2 cyclbvyM/dwLtA2QBs3O3FQcZ1Q8PpQCsGd5XBdd6VLHLnlAhoqk00o7rkc5Ft9dW8KRKm3re MohW39L0WuYQ6yopx//MTChKWozo5Mndp1rMYANGp4WmkyOoQtMYfSDUF5k5NbMz5jWolO3EF BLbMonXINwuMaWsuU9ydzyqylxSeg51mw/4o0lwoJWA8K1j0Z+pP5hHuyHiblMUU8SUbG1g9L H+vKPwjUKwj8mpUqbfSOT7DuruaPOyWQh7Y+uhGbKpTCB/2cyet/ukV9XMz5EQNOyKRo= Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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(-) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c index c9fdfc8bf47f..1474c5755140 100644 --- a/drivers/tty/serial/uartlite.c +++ b/drivers/tty/serial/uartlite.c @@ -72,7 +72,7 @@ static void uartlite_outbe32(u32 val, void __iomem *addr) iowrite32be(val, addr); } -static const struct uartlite_reg_ops uartlite_be = { +static struct uartlite_reg_ops uartlite_be = { .in = uartlite_inbe32, .out = uartlite_outbe32, }; @@ -87,7 +87,7 @@ static void uartlite_outle32(u32 val, void __iomem *addr) iowrite32(val, addr); } -static const struct uartlite_reg_ops uartlite_le = { +static struct uartlite_reg_ops uartlite_le = { .in = uartlite_inle32, .out = uartlite_outle32, };