All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christopher Heiny <cheiny@synaptics.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Anton Vorontsov <anton.vorontsov@linaro.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Jean Delvare <khali@linux-fr.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux Input <linux-input@vger.kernel.org>,
	Allie Xiong <axiong@synaptics.com>, Vivian Ly <vly@synaptics.com>,
	Daniel Rosenberg <daniel.rosenberg@synaptics.com>,
	Joerie de Gram <j.de.gram@gmail.com>,
	Wolfram Sang <w.sang@pengutronix.de>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Linus Walleij <linus.walleij@stericsson.com>,
	Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com>,
	Alexandra Chin <alexandra.chin@tw.synaptics.com>
Subject: Re: [RFC PATCH 01/06] input/rmi4: Public header and documentation
Date: Tue, 23 Oct 2012 15:55:06 -0700	[thread overview]
Message-ID: <5087204A.3080303@synaptics.com> (raw)
In-Reply-To: <20121011082420.GC32175@core.coreip.homeip.net>

On 10/11/2012 01:24 AM, Dmitry Torokhov wrote:
> On Thu, Oct 11, 2012 at 03:41:41AM +0000, Christopher Heiny wrote:
>> >Linus Walleij wrote:
>>> > >On Sat, Oct 6, 2012 at 6:09 AM, Christopher Heiny<cheiny@synaptics.com>  wrote:
>>> > >
>>>> > > >+#ifdef CONFIG_RMI4_DEBUG
>>>> > > >+/**
>>>> > > >+ * Utility routine to handle writes to read-only attributes.  Hopefully
>>>> > > >+ * this will never happen, but if the user does something stupid, we
>>>> > > >don't
>>>> > > >+ * want to accept it quietly (which is what can happen if you just put
>>>> > > >NULL + * for the attribute's store function).
>>>> > > >+ */
>>>> > > >+static inline ssize_t rmi_store_error(struct device *dev,
>>>> > > >+                       struct device_attribute *attr,
>>>> > > >+                       const char *buf, size_t count)
>>>> > > >+{
>>>> > > >+       dev_warn(dev,
>>>> > > >+                "WARNING: Attempt to write %d characters to read-only
>>>> > > >attribute %s.", +               count, attr->attr.name);
>>>> > > >+       return -EPERM;
>>>> > > >+}
>>> > >
>>> > >Here it looks like you're hiding a lot of stuff that should be dev_warn()?
>>> > >Consider my earlier point about dynamic debug.
>> >
>> >In previous patch submissions, we always used these warning functions.
>> >But in the feedback on those patches, we were asked to just make sysfs
>> >show/store NULL if the attribute is write/read only.  However, during
>> >their development process, our customers want to see the warnings if
>> >the attributes are accessed incorrectly.  So we made these warnings a
>> >debug option.
 >
> I think it is the case when customer is not always right. Given that
> the attributes are created with S_IRUGO mask how will we even get these
> methods to fire?

We were able to get those to fire in earlier kernels under some UIs 
(such as Android).  However, we no longer support those earlier version. 
  I have checked the behavior on up-to-date kernels and UI versions, and 
everyone seems to handle this correctly.  That means we can drop these 
definitions entirely, so we'll do that.

  reply	other threads:[~2012-10-23 22:55 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-06  4:09 [RFC PATCH 00/06] input: Synaptics RMI4 Touchscreen Driver Christopher Heiny
2012-10-06  4:09 ` [RFC PATCH 01/06] input/rmi4: Public header and documentation Christopher Heiny
2012-10-09  7:43   ` Linus Walleij
2012-10-09  8:27     ` Mark Brown
2012-10-11  3:56       ` Christopher Heiny
2012-10-12  5:16         ` Mark Brown
2012-10-23 22:10           ` Christopher Heiny
2012-10-24 17:49             ` Mark Brown
2012-10-11  3:41     ` Christopher Heiny
2012-10-11  8:24       ` Dmitry Torokhov
2012-10-23 22:55         ` Christopher Heiny [this message]
2012-10-11 15:22       ` Linus Walleij
2012-10-11 15:32       ` Linus Walleij
2012-10-16  6:26         ` Mark Brown
2012-10-23 23:19           ` Christopher Heiny
2012-10-23 23:18         ` Christopher Heiny
2012-10-11  8:20   ` Dmitry Torokhov
2012-10-23 22:39     ` Christopher Heiny
2012-10-23 22:47       ` Dmitry Torokhov
2012-10-06  4:09 ` [RFC PATCH 02/06] input/rmi4: Core files Christopher Heiny
2012-10-06 12:19   ` Joe Perches
2012-10-06 13:06     ` devendra.aaru
2012-10-06 13:08       ` devendra.aaru
2012-10-11  2:49     ` Christopher Heiny
2012-10-11  3:06       ` Joe Perches
2012-10-22 21:58         ` Christopher Heiny
2012-10-09  8:40   ` Linus Walleij
2012-10-11  4:15     ` Christopher Heiny
2012-10-11  8:13       ` Dmitry Torokhov
2012-10-23 23:46         ` Christopher Heiny
2012-10-24  0:11           ` Dmitry Torokhov
2012-10-24  0:32             ` Christopher Heiny
2012-10-11 15:37       ` Linus Walleij
2012-10-06  4:10 ` [RFC PATCH 03/06] input/rmi4: I2C physical interface Christopher Heiny
2012-10-09  9:05   ` Linus Walleij
2012-10-11  4:21     ` Christopher Heiny
2012-10-06  4:10 ` [RFC PATCH 04/06] input/rmi4: Config files and makefiles Christopher Heiny
2012-10-09  9:08   ` Linus Walleij
2012-10-11  4:23     ` Christopher Heiny
2012-10-06  4:10 ` [RFC PATCH 05/06] input/rmi4: F01 - device control Christopher Heiny
2012-10-09  9:31   ` Linus Walleij
2012-10-11  4:34     ` Christopher Heiny
2012-10-06  4:10 ` [RFC PATCH 06/06] input/rmi4: F11 - 2D touch interface Christopher Heiny
2012-10-09 10:02   ` Linus Walleij
2012-10-11  4:46     ` Christopher Heiny
2012-10-10 18:21   ` Henrik Rydberg
2012-10-10 18:21     ` Henrik Rydberg
2012-10-25 21:39     ` Christopher Heiny
2012-10-25 21:39       ` Christopher Heiny
  -- strict thread matches above, loose matches on Subject: below --
2012-11-17  3:58 [RFC PATCH 00/06] input: Synaptics RMI4 Touchscreen Driver Christopher Heiny
2012-11-17  3:58 ` [RFC PATCH 01/06] input/rmi4: Public header and documentation Christopher Heiny
2012-11-17 22:41   ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5087204A.3080303@synaptics.com \
    --to=cheiny@synaptics.com \
    --cc=alexandra.chin@tw.synaptics.com \
    --cc=anton.vorontsov@linaro.org \
    --cc=axiong@synaptics.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=daniel.rosenberg@synaptics.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=j.de.gram@gmail.com \
    --cc=khali@linux-fr.org \
    --cc=linus.walleij@linaro.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=naveen.gaddipati@stericsson.com \
    --cc=vly@synaptics.com \
    --cc=w.sang@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.