From patchwork Thu Aug 6 15:58:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Chen X-Patchwork-Id: 11703471 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9EF14722 for ; Thu, 6 Aug 2020 16:09:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DBF5123132 for ; Thu, 6 Aug 2020 16:09:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WpZ7ORWt"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="Rk1F3FC/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DBF5123132 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Hu+4ERIlxFmzbRLX29YpnmKZQWKvMcCi2ZjxVu5BOHY=; b=WpZ7ORWtMe2MpHY1TNpSo50HJ y+notANZBOhvGkoHEXltfiRM0lA/UuDOfXxJVDtKN6OQ2IRzYhXg95aCc2D4gjEEo2o1QjPOFXXi5 3rSR7GerYub1UxpA5CUdwdr5WMkLy2imrmLbRXlC80wqsCVgB4Xu/10zvBKC518Rc3+M7fnuoPIOH DDOjUD4JWrpxDPUxtKj/rhmHknnPmps9yvZV28HHCYc/MXZfL5Bf5Pw7LZK5hFe+Ex6REzjpeNdDw 73/jALsI0QKi+Na2umothatlkgx0PbedvLco8XpZR0vKAtHAs8GOBIpwiIphi6VtDzr3+oGCB8Lt2 coBLSwrEw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3iSG-00055O-UL; Thu, 06 Aug 2020 16:09:20 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3iSC-00054I-SB; Thu, 06 Aug 2020 16:09:18 +0000 X-UUID: b0bd82c35dcd47558fcf7c1934c90d1b-20200806 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=/jqy0uuQRkqAFWi+8OuqK5KNOGe914saELFHNwmA2bg=; b=Rk1F3FC/v3b+/mKVWLTCaKYUjMbyUnWmYW35/sLkNiBznwoFea+KC1YOUs2BoVBq9WJ4vZD3zSpO8QFZoxwQvdLQbKlas/WPvYA4IAqMr0hb8WjrdQsfnVszlvddRcR/Plt3VA43f6biPa/7hiot2co30mWKCAJMrh8BeGXjUuY=; X-UUID: b0bd82c35dcd47558fcf7c1934c90d1b-20200806 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1411389097; Thu, 06 Aug 2020 08:08:46 -0800 Received: from mtkmbs08n2.mediatek.inc (172.21.101.56) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 6 Aug 2020 08:58:42 -0700 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 6 Aug 2020 23:58:28 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 6 Aug 2020 23:58:29 +0800 From: To: , , , , Subject: [PATCH V2, 1/1] media: mc-device.c: change media_device_request_alloc to match media_ioctl_info Date: Thu, 6 Aug 2020 23:58:22 +0800 Message-ID: <20200806155822.3772-2-frederic.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200806155822.3772-1-frederic.chen@mediatek.com> References: <20200806155822.3772-1-frederic.chen@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: AC723459E940B4C9E933EC8C0976E988E2BBAB82E5E89873F591BA7BC913F3372000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200806_120917_511936_1F8ECFD2 X-CRM114-Status: GOOD ( 10.63 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sean.Cheng@mediatek.com, srv_heupstream@mediatek.com, sj.huang@mediatek.com, yuzhao@chromium.org, linux-mediatek@lists.infradead.org, zwisler@chromium.org, christie.yu@mediatek.com, frederic.chen@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Frederic Chen We modified the type of media_device_request_alloc()'s second parameter from int* to void* so that it can match the interface defined in struct media_ioctl_info. Signed-off-by: Frederic Chen Reviewed-by: Laurent Pinchart --- drivers/media/mc/mc-device.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c index da8088351135..6b66c2091bae 100644 --- a/drivers/media/mc/mc-device.c +++ b/drivers/media/mc/mc-device.c @@ -370,9 +370,10 @@ static long media_device_get_topology(struct media_device *mdev, void *arg) return ret; } -static long media_device_request_alloc(struct media_device *mdev, - int *alloc_fd) +static long media_device_request_alloc(struct media_device *mdev, void *arg) { + int *alloc_fd = arg; + #ifdef CONFIG_MEDIA_CONTROLLER_REQUEST_API if (!mdev->ops || !mdev->ops->req_validate || !mdev->ops->req_queue) return -ENOTTY; @@ -407,7 +408,7 @@ static long copy_arg_to_user(void __user *uarg, void *karg, unsigned int cmd) #define MEDIA_IOC_ARG(__cmd, func, fl, from_user, to_user) \ [_IOC_NR(MEDIA_IOC_##__cmd)] = { \ .cmd = MEDIA_IOC_##__cmd, \ - .fn = (long (*)(struct media_device *, void *))func, \ + .fn = func, \ .flags = fl, \ .arg_from_user = from_user, \ .arg_to_user = to_user, \