Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp547477yba; Sat, 4 May 2019 07:47:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqz85klFdx/xlnaxU6AHvjof/S41zHn5P8wisHb3tP8yZj5LnCUW3COynI8z4Od5rgzL4PVk X-Received: by 2002:a17:902:bd82:: with SMTP id q2mr10369776pls.259.1556981255462; Sat, 04 May 2019 07:47:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556981255; cv=none; d=google.com; s=arc-20160816; b=a7oC0slV9nBDoKad9w/tk3EMOjwCGohW6GcRoQ1cKzdRmOFD9hKx+A7P1Ix9D0OxJy 5NqZxToxDnQj4LD8VhsdK4551AdMp7JW1u51Qevpc1y6VUXn9PSBX8aOQfWuJtvgIUcY JruzZJ5KHHcyXn3nlQfSY3P95aKhNsSOoUPDmhJMPAYvQZZjdnk4d7W+BtjjueKhwr9t PlU+wQr0EIx/MSKwGvc0tOqR9WSscwPtzOO7LyDIKPJ+mBtbRKl3TMK+8Cg6Vbwwv4AE EmfghMb0EvgccxRb9l5h6pu1iwk08Zy6BSUjJHTOA2sdlL5DZAQUIq4HsijUYLCxkuCc VEKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=tQgaLnyd1PzWRuAcPpOm2m6B4C3dJFTkE6v5h3uPP4o=; b=mXxBbwDU7Pks9V/WOSuKgUa8UFDRaaTbxuFml3q3vwfaQVLXoi+Te+YojFuY7MHPGj uJCH8FD0YWryOtLBazBxYQQYS6eBYr0SBsNUoVTkBRbIKsbKkz/nUEiOHm0WEKg+qcXB FRgg1qlUAlgz+CxfbIGNdM89yb0A00Mx5qI1uDyXAQKru8oRL4REUW8HdFEr32DnqTF4 8w/7t51eZBpzvwYNQUMsD6hyIRtsDi6wukEuBdJACtyArNFYnmEJOlbVf1Qz/BieXVDS ON9wnxCaaSWTGT65XUGMfSNN6nrafPoV4Udqs47o6hYMcFRzsMVU8RKCGEyYEzKK4hro f9pg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2si7933070pgk.106.2019.05.04.07.47.19; Sat, 04 May 2019 07:47:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726907AbfEDOfV (ORCPT + 99 others); Sat, 4 May 2019 10:35:21 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:34370 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726070AbfEDOfV (ORCPT ); Sat, 4 May 2019 10:35:21 -0400 Received: by mail-qt1-f193.google.com with SMTP id j6so10055125qtq.1; Sat, 04 May 2019 07:35:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tQgaLnyd1PzWRuAcPpOm2m6B4C3dJFTkE6v5h3uPP4o=; b=OjqydM2tYABlKRPwaDWqg1dM1O9OpwEEffgOkhAUV1/6BQeoWWmfHAQR3T/WH5gCs5 40kbSctPEwPq2sn3g3TV4i1tKBxEbBtNZxPWKYUT2HpUY58Mnn6VbIqbjn/DLUqQL3wH f0Mk4KzQdxSZ+MBF1Yi+fKfYOBSgGsLa1nqJSZU56RtJNA9aucFHK5I/LDfS0/aWssQ9 BTAYUOe5iVMHIUstiDge+FboiadC8gMae4FABaBL+yuYKY8qf7c4NZXYK2kwrGlWN9a5 yOUfVADov/HCArKbMknjIp96e0SSPtrhccBjBlXRShYdVU1zvpj1s/H1STkjQFwhxpTb P3cQ== X-Gm-Message-State: APjAAAWt3kmG+7cZNoxxr2bb+1VS2liIE/mE+ESevVRaykTA51F2A3u3 d6xCzpvkDD3RhVI5axMU92kzXjjmtmTeBnkmUKg= X-Received: by 2002:ac8:29cf:: with SMTP id 15mr13552977qtt.319.1556980520015; Sat, 04 May 2019 07:35:20 -0700 (PDT) MIME-Version: 1.0 References: <1556402706-176271-1-git-send-email-dragan.cvetic@xilinx.com> <1556402706-176271-5-git-send-email-dragan.cvetic@xilinx.com> <20190502172345.GC1874@kroah.com> In-Reply-To: <20190502172345.GC1874@kroah.com> From: Arnd Bergmann Date: Sat, 4 May 2019 10:35:02 -0400 Message-ID: Subject: Re: [PATCH V3 04/12] misc: xilinx_sdfec: Add open, close and ioctl To: Greg KH Cc: Dragan Cvetic , Michal Simek , Linux ARM , Rob Herring , Mark Rutland , DTML , Linux Kernel Mailing List , Derek Kiernan Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 2, 2019 at 1:23 PM Greg KH wrote: > > On Sat, Apr 27, 2019 at 11:04:58PM +0100, Dragan Cvetic wrote: > > Add char device interface per DT node present and support > > file operations: > > - open(), > > - close(), > > - unlocked_ioctl(), > > - compat_ioctl(). > > Why do you need compat_ioctl() at all? Any "new" driver should never > need it. Just create your structures properly. The function he added was the version that is needed when the structures are compatible. I submitted a series to add a generic 'compat_ptr_ioctl' implementation that would save a few lines here doing the same thing, but it's not merged yet. Generally speaking, every driver that has a .ioctl() function should also have a .compat_ioctl(), and ideally it should be exactly this trivial version. Arnd