From patchwork Fri Jun 13 20:41:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 31888 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7C9F9201EF for ; Fri, 13 Jun 2014 20:42:08 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id ft15sf10379645pdb.4 for ; Fri, 13 Jun 2014 13:42:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:date :message-id:in-reply-to:references:subject:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=+bH4+kEgSkxn0u8ZXe6DXQ21dtJQWw7kbAiErB0GqVM=; b=DIYPHlW2xua7Os87C2q6cew7B1RFcyVheAahEITo6nutZbBnlMjB4ub1GRUP+1sfaK JlJo3tQoOl+MUWDBrt/atCUb2dI9jjxmr854GFx3hlF9yGNlAwRXvcC6PeUY4n8UNN1I +QRce6i19d7AZr8hYtWU5snYPs1oQJGrBd0LTJ8JUEALHev+/JWYAJfdKYgJKDv2oEGy cyzJ9MMHTiYiv35LTcSQYwLdeP+BhqBkGEbGfkJa6wFLvhAV6Wf2jvlAixOiRiNawJ5D 1izoxXKd4AXtdoGaVCMLgekyGdU4BnJS2qbBfdMAWZp+G3gNlHHviEMQaB5yH4HkI3N4 /N/g== X-Gm-Message-State: ALoCoQk2U0tx1YgJRyTtfyD+2DNsEtec+8NJEBLzYAkwy/BUTra0B/tJ/xis2PhgRwZyZz7ZKW3W X-Received: by 10.66.162.5 with SMTP id xw5mr419794pab.12.1402692127835; Fri, 13 Jun 2014 13:42:07 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.17.19 with SMTP id 19ls3598864qgc.69.gmail; Fri, 13 Jun 2014 13:42:07 -0700 (PDT) X-Received: by 10.220.163.3 with SMTP id y3mr3363780vcx.7.1402692127686; Fri, 13 Jun 2014 13:42:07 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id fa1si1765636vcb.39.2014.06.13.13.42.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Jun 2014 13:42:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id hy4so2813334vcb.34 for ; Fri, 13 Jun 2014 13:42:07 -0700 (PDT) X-Received: by 10.52.191.97 with SMTP id gx1mr150011vdc.55.1402692127544; Fri, 13 Jun 2014 13:42:07 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp529008vcb; Fri, 13 Jun 2014 13:42:07 -0700 (PDT) X-Received: by 10.66.222.100 with SMTP id ql4mr6053590pac.109.1402692126771; Fri, 13 Jun 2014 13:42:06 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gz4si5916672pac.61.2014.06.13.13.42.06; Fri, 13 Jun 2014 13:42:06 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753951AbaFMUlr (ORCPT + 22 others); Fri, 13 Jun 2014 16:41:47 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:40456 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751836AbaFMUlq (ORCPT ); Fri, 13 Jun 2014 16:41:46 -0400 Received: from cpc11-sgyl31-2-0-cust672.sgyl.cable.virginm.net ([94.175.94.161] helo=debutante.sirena.org.uk) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1WvYI8-0007cd-Nf; Fri, 13 Jun 2014 20:41:45 +0000 Received: from broonie by debutante.sirena.org.uk with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1WvYI5-00061h-QE; Fri, 13 Jun 2014 21:41:37 +0100 From: Mark Brown To: Jassi Brar Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Mark Brown Date: Fri, 13 Jun 2014 21:41:35 +0100 Message-Id: <1402692095-23126-2-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1402692095-23126-1-git-send-email-broonie@kernel.org> References: <1402692095-23126-1-git-send-email-broonie@kernel.org> X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mezzanine.sirena.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 Subject: [PATCH 2/2] mailbox: Remove const from client argument of mbox_request_channel() X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: broonie@kernel.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Mark Brown The struct mbox_client supplied to mbox_request_channel() is const but it is stored in the channel in a non-constant member causing compiler warnings. While the mailbox API should treat the struct mailbox_client as const itself the struct is passed back to the channel in callbacks without a const so we need to either remove the const, change the callbacks to take const or cast the const away when doing callbacks. Take the simplest option and just remove the const. Signed-off-by: Mark Brown --- drivers/mailbox/mailbox.c | 2 +- include/linux/mailbox_client.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c index ae4abd9f7513..662f8e550473 100644 --- a/drivers/mailbox/mailbox.c +++ b/drivers/mailbox/mailbox.c @@ -294,7 +294,7 @@ EXPORT_SYMBOL_GPL(mbox_send_message); * Return: Pointer to the channel assigned to the client if successful. * ERR_PTR for request failure. */ -struct mbox_chan *mbox_request_channel(const struct mbox_client *cl) +struct mbox_chan *mbox_request_channel(struct mbox_client *cl) { struct device *dev = cl->dev; struct mbox_controller *mbox; diff --git a/include/linux/mailbox_client.h b/include/linux/mailbox_client.h index cbfcf8478ca9..955f3d7641e8 100644 --- a/include/linux/mailbox_client.h +++ b/include/linux/mailbox_client.h @@ -37,7 +37,7 @@ struct mbox_client { bool knows_txdone; }; -struct mbox_chan *mbox_request_channel(const struct mbox_client *cl); +struct mbox_chan *mbox_request_channel(struct mbox_client *cl); int mbox_send_message(struct mbox_chan *chan, void *mssg); void mbox_client_txdone(struct mbox_chan *chan, int r); bool mbox_client_peek_data(struct mbox_chan *chan);