From patchwork Tue May 10 01:29:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 9053061 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4FB429F1C3 for ; Tue, 10 May 2016 01:31:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6C3872010E for ; Tue, 10 May 2016 01:31:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 73356200E1 for ; Tue, 10 May 2016 01:31:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1azwUN-0004Cf-0n; Tue, 10 May 2016 01:29:31 +0000 Received: from ozlabs.org ([103.22.144.67]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1azwUK-00047c-84 for linux-arm-kernel@lists.infradead.org; Tue, 10 May 2016 01:29:29 +0000 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 3r3hVT6bClz9t73; Tue, 10 May 2016 11:29:05 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201601; t=1462843745; bh=jtEE4Q1ZSFlNkqMdjcYG2qOwx3UA4Uf6aZL9MsYHJUQ=; h=Date:From:To:Cc:Subject:From; b=fI0/aHwpoNY/1i8GT/xxenwVm+hp8K4d8pd877rvylYB3UrLo1XvVD5sg1MRTetNd TGdA7GeqvIxaqfMgDDIrvjJbDhrVV3+IcP5+gcP08gMOMjH+jh/CF2S0jQFsaETTM3 iEWU3pmYzLllZRUmaVOGxngAWGfgPGgn40LecjlI= Date: Tue, 10 May 2016 11:29:05 +1000 From: Stephen Rothwell To: David Miller , , Olof Johansson , Arnd Bergmann , Subject: linux-next: build failure after merge of the net-next tree Message-ID: <20160510112905.5bffcad8@canb.auug.org.au> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160509_182928_620431_BCCE0BB1 X-CRM114-Status: GOOD ( 12.88 ) X-Spam-Score: -4.3 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andy Gross , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi all, After merging the net-next tree, today's linux-next build (x86_64 allmodconfig) failed like this: net/qrtr/smd.c:106:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .callback = qcom_smd_qrtr_callback, ^ net/qrtr/smd.c:106:14: note: (near initialization for 'qcom_smd_qrtr_driver.callback') Caused by commit bdabad3e363d ("net: Add Qualcomm IPC router") interacting with commit b853cb9628bf ("soc: qcom: smd: Make callback pass channel reference") from the arm-soc tree. I added the following merge fix patch (and it turned out I needed the new stubs). From: Stephen Rothwell Date: Tue, 10 May 2016 11:14:06 +1000 Subject: [PATCH] soc: qcom: smd: fix for Qualcomm IPC router and callback API change Signed-off-by: Stephen Rothwell Acked-by: Andy Gross Acked-by: Arnd Bergmann --- include/linux/soc/qcom/smd.h | 9 +++++++++ net/qrtr/smd.c | 9 ++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/include/linux/soc/qcom/smd.h b/include/linux/soc/qcom/smd.h index 086e36d76be9..fbebbfc82ed3 100644 --- a/include/linux/soc/qcom/smd.h +++ b/include/linux/soc/qcom/smd.h @@ -70,6 +70,15 @@ static inline void qcom_smd_driver_unregister(struct qcom_smd_driver *drv) WARN_ON(1); } +static inline void *qcom_smd_get_drvdata(struct qcom_smd_channel *channel) +{ + return NULL; +} + +static inline void qcom_smd_set_drvdata(struct qcom_smd_channel *channel, void *data) +{ +} + static inline int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len) { diff --git a/net/qrtr/smd.c b/net/qrtr/smd.c index 84ebce73aa23..0d11132b3370 100644 --- a/net/qrtr/smd.c +++ b/net/qrtr/smd.c @@ -21,13 +21,14 @@ struct qrtr_smd_dev { struct qrtr_endpoint ep; struct qcom_smd_channel *channel; + struct device *dev; }; /* from smd to qrtr */ -static int qcom_smd_qrtr_callback(struct qcom_smd_device *sdev, +static int qcom_smd_qrtr_callback(struct qcom_smd_channel *channel, const void *data, size_t len) { - struct qrtr_smd_dev *qdev = dev_get_drvdata(&sdev->dev); + struct qrtr_smd_dev *qdev = qcom_smd_get_drvdata(channel); int rc; if (!qdev) @@ -35,7 +36,7 @@ static int qcom_smd_qrtr_callback(struct qcom_smd_device *sdev, rc = qrtr_endpoint_post(&qdev->ep, data, len); if (rc == -EINVAL) { - dev_err(&sdev->dev, "invalid ipcrouter packet\n"); + dev_err(qdev->dev, "invalid ipcrouter packet\n"); /* return 0 to let smd drop the packet */ rc = 0; } @@ -73,12 +74,14 @@ static int qcom_smd_qrtr_probe(struct qcom_smd_device *sdev) return -ENOMEM; qdev->channel = sdev->channel; + qdev->dev = &sdev->dev; qdev->ep.xmit = qcom_smd_qrtr_send; rc = qrtr_endpoint_register(&qdev->ep, QRTR_EP_NID_AUTO); if (rc) return rc; + qcom_smd_set_drvdata(sdev->channel, qdev); dev_set_drvdata(&sdev->dev, qdev); dev_dbg(&sdev->dev, "Qualcomm SMD QRTR driver probed\n");