From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751635AbcBLPUT (ORCPT ); Fri, 12 Feb 2016 10:20:19 -0500 Received: from mga02.intel.com ([134.134.136.20]:55679 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750940AbcBLPUQ (ORCPT ); Fri, 12 Feb 2016 10:20:16 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,436,1449561600"; d="scan'208";a="882916681" From: Alexander Shishkin To: Chunyan Zhang , mathieu.poirier@linaro.org Cc: mike.leach@arm.com, Michael.Williams@arm.com, al.grant@arm.com, tor@ti.com, nicolas.guion@st.com, broonie@kernel.org, robh@kernel.org, pratikp@codeaurora.org, corbet@lwn.net, mark.rutland@arm.com, zhang.lyra@gmail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH V3 1/6] stm class: Add ioctl get_options interface In-Reply-To: <1454756672-12790-2-git-send-email-zhang.chunyan@linaro.org> References: <1454756672-12790-1-git-send-email-zhang.chunyan@linaro.org> <1454756672-12790-2-git-send-email-zhang.chunyan@linaro.org> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Fri, 12 Feb 2016 17:18:48 +0200 Message-ID: <87ziv62bzb.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Chunyan Zhang writes: > There is already an interface of set_options, but no get_options yet. > Before setting any options, one would may want to see the current > status of that option by means of get_options interface. This > interface has been used in CoreSight STM driver. I'm not sure I understand the reasoning behind this. If a userspace program opens a communication channel and wants to configure certain features on it, why does its choice depend on what has been configured for this channel previously? It can be anything at all. Most likely, it's either unconfigured or configured to its default values, but why does this matter for a new writer? Regards, -- Alex