From patchwork Mon Oct 26 15:58:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: harshal chaudhari X-Patchwork-Id: 11857665 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AB36C4363A for ; Mon, 26 Oct 2020 15:59:54 +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 D640F217A0 for ; Mon, 26 Oct 2020 15:59:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JvB9cthq"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="McHEw2zg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D640F217A0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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:In-Reply-To:References:List-Owner; bh=/H5/BFxkGTEfhVvCOi1gFOG8iI1gz1Rtw1ortIgdEyk=; b=JvB9cthqnGewU881a29lJNz810 rTWJiD3mzsedIax5GOSicV5OCVBQ0qniyng6nswtrJ7ZP1zjn0cFeVGLOIg+Ef72nfT0W9632wzrV uA1hzZ1z6dAXmyjeWe1O6z2XklzI1cFMGBFTib4YFeYhE8psJNo2SZzbuqa/ffCluHFYVjGthXsOY hFR6HkX+T/HT8+d0W//ByoONEBVpyxufNTbeLpGZnxn/rgcaGzvnVPkAUPMFvBjVyc1/wR3XCT+XH tFolcbnBzHaKzPH1sVflkTyANLPsIepYoWTw/qxHK4oZGPhdzUFQ823hi5K7e5sjXLFukZ9fPx+76 X1X+ebHg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX4tD-0001KT-Fa; Mon, 26 Oct 2020 15:58:31 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX4tA-0001Ht-HR for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 15:58:29 +0000 Received: by mail-pl1-x641.google.com with SMTP id o9so4930489plx.10 for ; Mon, 26 Oct 2020 08:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=BvEOtcmMKZgMMz/Q+k5oijPH7ubZ+igE6I4Ohn9FqQU=; b=McHEw2zgFjmlMlUX19G9RU+BJlEp+gogUMsf0ZsfbmpynDl+3uiCrbSPheXSx3DvzZ doVPFOKg7U5A7ofPLHy40A18gmMfRFU2RB/M0UXmwng7y7nhRmYyLTA3vGBv1tkh8uBh jNANCkfIFeVa3+qnxqTwWyamOUfxBUxyevmtLlJYZb2nkBU68rXoTyZypQRq2OFp31Xe 702L+v6/hxNeye6Bmwtle9JoLsSFfGfCjtxJLV2LWwWi32LORTr9cGjhSx2s1didn3GZ zg6QoiP7AnnMLyb4W6ixHWrZSlEAHhU+xu7N2lE7ZMKBazN7QdVUVovMVgwH5kEnHI/O JSRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BvEOtcmMKZgMMz/Q+k5oijPH7ubZ+igE6I4Ohn9FqQU=; b=cekkBIUi6AsFiafToGxmtGiZtWGksCdSKcJ6vaw/mZSWFdKuVWq9NAPyF6qzVEc8So KXhghdoI6KzFPEzOAA2MOZUW070vKekgf+f83/gvsl+/oB6GZWrWzs87Gcw+PZtEvWkz 1HdOeK03kCEaqTOrxuXTgGhYNOWI7pHivZvut6TiO8stDQKQCJDhHuu91sl0FPde+ekP RmYX5tsITxxXr9qkWcWYhRA7EbLyl5JzKuR71GtQNT2Y27qxy2/HbFRaF10ZIPGYKGpL sEZV3omnCFIVhQn3LccySxd78UZkp2d5cK6/a7yoWI+KDkOoQn9DUZ2udAyYmYskSbcr Lb3w== X-Gm-Message-State: AOAM533N73wIkcc4OsTXJjmNSuZ3GRW6fyahoEF4PjrOpk9K+vcXALys oFZQnopjPnTRcraNr3Mcxoo= X-Google-Smtp-Source: ABdhPJzmUBs7XaQ0R3IOgLV74nZT0a4GzGao8pzB8n9NbQcuz/P4c82htNxTybmCCopmGChRZZhiRA== X-Received: by 2002:a17:90b:f8b:: with SMTP id ft11mr22349279pjb.88.1603727904412; Mon, 26 Oct 2020 08:58:24 -0700 (PDT) Received: from localhost.localdomain ([150.242.63.159]) by smtp.googlemail.com with ESMTPSA id s38sm2958525pgm.62.2020.10.26.08.58.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 08:58:23 -0700 (PDT) From: Harshal Chaudhari To: gregkh@linuxfoundation.org Subject: [PATCH] misc: xilinx_sdfec: add compat_ptr_ioctl() Date: Mon, 26 Oct 2020 21:28:01 +0530 Message-Id: <20201026155801.16053-1-harshalchau04@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_115828_661229_582E256F X-CRM114-Status: GOOD ( 13.95 ) 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: arnd@arndb.de, dragan.cvetic@xilinx.com, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, derek.kiernan@xilinx.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Driver has a trivial helper function to convert the pointer argument and then call the native ioctl handler. But now we have a generic implementation for that, so we can use it. Signed-off-by: Harshal Chaudhari Reviewed-by: Arnd Bergmann Acked-by: Dragan Cvetic --- drivers/misc/xilinx_sdfec.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c index 92291292756a..6f252793dceb 100644 --- a/drivers/misc/xilinx_sdfec.c +++ b/drivers/misc/xilinx_sdfec.c @@ -1016,14 +1016,6 @@ static long xsdfec_dev_ioctl(struct file *fptr, unsigned int cmd, return rval; } -#ifdef CONFIG_COMPAT -static long xsdfec_dev_compat_ioctl(struct file *file, unsigned int cmd, - unsigned long data) -{ - return xsdfec_dev_ioctl(file, cmd, (unsigned long)compat_ptr(data)); -} -#endif - static __poll_t xsdfec_poll(struct file *file, poll_table *wait) { __poll_t mask = 0; @@ -1054,9 +1046,7 @@ static const struct file_operations xsdfec_fops = { .release = xsdfec_dev_release, .unlocked_ioctl = xsdfec_dev_ioctl, .poll = xsdfec_poll, -#ifdef CONFIG_COMPAT - .compat_ioctl = xsdfec_dev_compat_ioctl, -#endif + .compat_ioctl = compat_ptr_ioctl, }; static int xsdfec_parse_of(struct xsdfec_dev *xsdfec)