From patchwork Wed Jan 16 18:49:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10766797 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BC4881580 for ; Wed, 16 Jan 2019 18:45:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABF042EB2F for ; Wed, 16 Jan 2019 18:45:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FDBB2EBAE; Wed, 16 Jan 2019 18:45:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B9292EB2F for ; Wed, 16 Jan 2019 18:45:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729276AbfAPSpb (ORCPT ); Wed, 16 Jan 2019 13:45:31 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:44320 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729022AbfAPSpb (ORCPT ); Wed, 16 Jan 2019 13:45:31 -0500 Received: by mail-pg1-f195.google.com with SMTP id t13so3192702pgr.11; Wed, 16 Jan 2019 10:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=GIqHD+5i6aiV0G0NAFyRGh7lKTGvUOXmhbisqg7OY0s=; b=NjmdDGh2z+MzXKdZ3H9zrBrVll7rNDty+vIJojCc0Ryc/MtCnQtQJfSVYScvEr43fB 1ZzmEKTWQ8QHblcYSjvdzJrY7reBauMVyHGx1HBwKAYW6Tnl41JwsmkbjB4G/GDoyjTt NmUnasfImDQcadV0ACE27a4i64wcYDzLokIaqG0IYRL996/9lvdWtt5X3n0L30acqt39 n8OjZdzTtAXWGbaDjYSVZ1CJt0iRgG6b9U1MxO5a+iUp5fqOOKE1NasXrkrNKnvWlbaq uOeyS3qV+ijPFSseKUoAvbAU5812CX+nHf4sQIr/akQfznSmNR9vtISmGMzqk/Dc+SFn cIDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=GIqHD+5i6aiV0G0NAFyRGh7lKTGvUOXmhbisqg7OY0s=; b=TmR6uZqPtfXNWFhjvvcChB12RgM+pXczkriAwLp607CKTkEUpGZ8mp1hleh3OE/5gh 9kslpMvT7fKBsmFgSK+LLVuSFLsiGmWlXFROsV515gdbrsdCp6ZhMdcnYYq7DmddW0/s LNTadBySI1ZHCYnb2xGGpI6h9VWgb5B2cD5xvrfGm4VGkmU6RwQbWOoa7DDGWLGAuBCN 90sg/4zfsFQOr1OnsGSiHx0Z5gW4FOV03qrhHMRsP2BxCpRSLQp9UIwrnLkGWL21ORQq kxsFsr+qo0siUEpTi7V+uGd9hQ2GncsVJtEcL6mZtf1cAU/5KICG/z675bDeLU/T2nWE IZPQ== X-Gm-Message-State: AJcUukf2X3wqFZuSmZUC9pFWollRgCpZY2mvolhSH9ot5cGpq6e4/o7y BGWg+DpvqDJGKcb6iG6iEeAwiwd2 X-Google-Smtp-Source: ALg8bN71Qywd/z2X1CjMuc2KeN6KYpOos041iwSY0XNpoXt/edguqMPNQ/iJL2hQO3M4u+SLTaHPbg== X-Received: by 2002:a63:e20a:: with SMTP id q10mr9913430pgh.206.1547664330200; Wed, 16 Jan 2019 10:45:30 -0800 (PST) Received: from jordon-HP-15-Notebook-PC ([49.207.55.114]) by smtp.gmail.com with ESMTPSA id g3sm13351073pfe.37.2019.01.16.10.45.27 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Jan 2019 10:45:28 -0800 (PST) Date: Thu, 17 Jan 2019 00:19:33 +0530 From: Souptick Joarder To: mchehab@kernel.org, brian.warner@samsung.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, brajeswar.linux@gmail.com, sabyasachi.linux@gmail.com Subject: [PATCH] media/v4l2-core/videobuf-vmalloc.c: Remove dead code Message-ID: <20190116184933.GA4562@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This code is commented since version 3.7. If there is no plan to use it in future, we can remove this dead code. Signed-off-by: Souptick Joarder --- drivers/media/v4l2-core/videobuf-vmalloc.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf-vmalloc.c b/drivers/media/v4l2-core/videobuf-vmalloc.c index 45fe781..293213a 100644 --- a/drivers/media/v4l2-core/videobuf-vmalloc.c +++ b/drivers/media/v4l2-core/videobuf-vmalloc.c @@ -196,26 +196,6 @@ static int __videobuf_iolock(struct videobuf_queue *q, } dprintk(1, "vmalloc is at addr %p (%d pages)\n", mem->vaddr, pages); - -#if 0 - int rc; - /* Kernel userptr is used also by read() method. In this case, - there's no need to remap, since data will be copied to user - */ - if (!vb->baddr) - return 0; - - /* FIXME: to properly support USERPTR, remap should occur. - The code below won't work, since mem->vma = NULL - */ - /* Try to remap memory */ - rc = remap_vmalloc_range(mem->vma, (void *)vb->baddr, 0); - if (rc < 0) { - printk(KERN_ERR "mmap: remap failed with error %d", rc); - return -ENOMEM; - } -#endif - break; case V4L2_MEMORY_OVERLAY: default: