Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3515503ybz; Mon, 20 Apr 2020 04:26:28 -0700 (PDT) X-Google-Smtp-Source: APiQypK/9nDAy9EpICFmWGla8ZzpGWp0y+DRXmJunATwSLVZ3bMc4T/O/TeeEEiJ+DAIhmuAQytm X-Received: by 2002:a17:906:3709:: with SMTP id d9mr16292694ejc.94.1587381988428; Mon, 20 Apr 2020 04:26:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587381988; cv=none; d=google.com; s=arc-20160816; b=x/ta6PEy6MGvHDDM3MHNLqcqOiEmnSr5xWcOMZvLt3ybSQ7ViHx71YQixHkQBbilut MRBkHcMmB2QaWVZjXta4J+9BxYzdHBrr4+P+fCIhnvLAUoJbzN4fzbKi7nrkVJP603F5 ugZhWs1Jt1+wTC508QqTBi/L6M+BsfqTlo4mzM7FVWIr7gPHZwWBpTduN73GWO1VeHxa TJowzpCfdz0kOuZsxqPXBqsVqe2gW4SMZA/zCPVdWXM5fRPPeQW/LabW/HEZSPLlUxbw Kn3eFX0QdgRgAUuxM7cbkrVgwiKUieePOL1AYPYLrXQHhOgdOhN9yklCDmoaoeXyX/RX HrVw== 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=r3dOr3FnyocHre7RN0pxy3YKQ57LYs+ipMH/VaZVvCI=; b=Cv/AUEtU/Qi/tYcTwr5UbfMneRtoz85L29T6F//5kMWS2tYWiB4wYI8HzJLhx4dUnt LXqFw61e4U+YXd984KpQZQrQMBOxN8PaWUYgaZ8CyV9gGyDzUzK12PU3ps0baJWEAhto ga7qvK3GmJnbv5K0DeAIHXwYXm3c425n49daW+O15NgL2Fp+U6G/zs6cv5mk5rbaGFYG u9apVXNcr2l+c4kyS2TH3ahLkurZYsNQvcE8iDm8IdO3eBrnQXZ+yKxzAdk3RUrtF6ir Qkh199qF5LYg+9enjPbBAeVaEimvjgwUefktcT9+PHNYyzxRAU7opfUGKRWrvdHcUF04 pCEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k26si347249ejc.127.2020.04.20.04.25.59; Mon, 20 Apr 2020 04:26:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726361AbgDTLXb (ORCPT + 99 others); Mon, 20 Apr 2020 07:23:31 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:41613 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbgDTLXa (ORCPT ); Mon, 20 Apr 2020 07:23:30 -0400 Received: from mail-qv1-f45.google.com ([209.85.219.45]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPSA (Nemesis) id 1MkIAB-1ixWcT3TU9-00kdVS; Mon, 20 Apr 2020 13:23:29 +0200 Received: by mail-qv1-f45.google.com with SMTP id t8so2467146qvw.5; Mon, 20 Apr 2020 04:23:28 -0700 (PDT) X-Gm-Message-State: AGi0PubKcENcTqpx8FApTJCIfvA2gQCt2G1GBu1DAMayJ3hzOEeBJ1Ls ZRQdaWyahUfpKXtTZnuIh5H07bEVgRf7tWtZuws= X-Received: by 2002:ad4:4a8b:: with SMTP id h11mr8566009qvx.210.1587381807463; Mon, 20 Apr 2020 04:23:27 -0700 (PDT) MIME-Version: 1.0 References: <20200417024543.66785-1-sy0816.kang@samsung.com> <20200417083506.GB141762@kroah.com> <145301d6152f$6d5b6240$481226c0$@samsung.com> <20200418073719.GA2410414@kroah.com> <000001d616ac$4ceaf1a0$e6c0d4e0$@samsung.com> In-Reply-To: <000001d616ac$4ceaf1a0$e6c0d4e0$@samsung.com> From: Arnd Bergmann Date: Mon, 20 Apr 2020 13:23:11 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] media: v4l2-compat-ioctl32.c: copy reserved2 field in get_v4l2_buffer32 To: Sunyoung Kang Cc: Greg Kroah-Hartman , Mauro Carvalho Chehab , Hans Verkuil , Thomas Gleixner , Linux Media Mailing List , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:Zqp4lLQ8/ieQ+z4lYzOOqJn95wa3XaAL3UEkT0fA3vYT4TFf6e+ YiKxt7Kgk5+7jbknXp3RfbvDEOow6pExyi4QPggGOzDZusnJ+r9fDwAMKrNrqIBPd153GfX mtv1TJ6S5Yc6L631DfNsCtiVEcp0+2HhLjHqTCpLsS35g3mIKeTZyrSPq30v00flZ4czxJz AUx7hZ37sF8HRBBHm6blA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:78tpjaZsgJw=:19YF2JIQgQvRKq8Tkuppuu mJB3oX9qH0lhjipMy61cb8E9RHqh+7Z/Czn4BnCJKf2lCSJ9UhDmuyPLl2jqF8t21pT5J7ZNl cO6w58id8fvt+Ec6n0IQNrYapyDedQi35uq71VuGuFiMAKeIpp8bDEGElUCZfRFuxPOAeJLCa PBd41GRS437b6YZZy49vCrKB3IPIRhOmKJK6KRopcI0uh2//0ba6Tmvv0l5TWtvx9LYxCHICy ax42EXO3AU7DGhIIQlAHg+tU0lMUdNGJww5NTlDq5l1V4a+iJn9+03uFtCAYVQNJydk5qQdf/ a0dHb9bh7F1VCfz12IW1Tf8nP/Ju0zZcQYFf6OLBV4iyr8sbNI/+X7ec3SYooD28OjKZsbYPp dWvrmMOqLxMR+lwiqXChgfcgvuJ6wADnO9KmqZTxz7BmJJdmQ2Wv1l2zkQhrRgz09JwV5Hbpe czM/xpwHXreFFovUFdveiOv71dBuGifcpHeIR8uu4qTiMKnGJzc9WSIaEjC3CRAwQ9v8erBnf Od0G04xLrpJS8x4gNDPEZMYVorenzp/5gOHz89GcsEeBBWdAnNWtMEn45OZEPP4vXD7SKMcJF h/UbjmOayPq18g/1nCZTzKhjNpTCTMSc1u3ZCOrs6Agqqu7cSjoa1B26lrOdZaY3yIi16qlpS QJaP9aetSDran7vUrSsxlFc2YGdfKrlu6EhWlgUoWbQlpurJqSP8pR3Dqyu/1hZBXVOo5VSBq K6LQWtjgQRUmHbSxhOQ+2fWlB08RIO2sFv0l0OcTY0UnZ17sdKCivagcs6N8L1e9Oy6X9vPHK e+fjtIWQFxCxhG+gnRsjbxtAMFngz3byt7gPNtw4bJ3ziqvpWg= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 20, 2020 at 2:40 AM Sunyoung Kang wrote: > > I understand what you mean. > However, the way to transmit information about the buffer is only flags in > v4l2_buffer > In flags in v4l2_buffer, there is no reserved bit field that can be used for > custom. > Additional information about the buffer is needed to provide various > functions required by the customers but flags is not enough. So reserved2 is > used as an alternative. > Can you suggest a better opinion? If you have a driver that needs to pass additional information that is not supported by the subsystem, this is generally either because there is something wrong in the driver, or because there is something wrong in the subsystem. Whichever is at fault should be fixed. If it's the subsystem, then you should explain why it's wrong and make a suggestion for how to address it, e.g. introducing a new ioctl command or redefining the reserved members to be defined in the way you need. In any case, the ioctl commands should be driver independent, so that any hardware with the same feature as your driver can work with the same user space. Arnd