From: Christopher Heiny <cheiny@synaptics.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Anton Vorontsov <anton.vorontsov@linaro.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.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 16:18:25 -0700 [thread overview]
Message-ID: <508725C1.5090401@synaptics.com> (raw)
In-Reply-To: <CACRpkdY3jctXSBB+SMJ=6k=CcLEsHz4jY8T3db8htcE+zWnJWw@mail.gmail.com>
On 10/11/2012 08:32 AM, Linus Walleij wrote:
> On Thu, Oct 11, 2012 at 5:41 AM, Christopher Heiny <Cheiny@synaptics.com> wrote:
>> Linus Walleij wrote:
>
>>> But please use arithmetic operators (I think I said this on the last
>>> review):
>>>
>>> dest[0] = src & 0xFF;
>>> dest[1] = src >> 8;
>>>
>>> Doing it the above way makes artithmetic look like maths, and it isn't.
>>> Besides it's done this way in most parts of the kernel and we're
>>> familiar with it.
>>
>> Yes, you mentioned it previously. I'm somewhat paranoid, though, and
>> don't trust the shift/mask method to work correctly on big-endian
>> machines. If the shifts can be relied on to behave (I'm guessing the
>> answer is "yes", since you say this idiom is used widely in the
>> kernel), then I'll change it.
>
> If the behaviour was not consistent across different endianness
> it would not be part of the C language specification...
>
> << means shift left in the accumulator or whatever you have.
> It will work the same no matter how bits are laid out in
> memory.
OK, after reviewing the spec I'll accept that. We'll make the change.
>>>> +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.
>
> See Dmitry's comment ...
>
> Basically my stance is that you should not lower yourself to the
> level of others not getting the point of your technical solution
> by making unelegant compromises, what
> you should do is to bring them up to your level so they
> understand that your solution is elegant.
>
> Maybe a bit utopist I know...
What's the old saying? "I want to live in Theory. Everything is always
so nice there..." :-)
Anyway, see my reply to Dmitry a bit ago. These are no longer needed,
so we'll drop them.
next prev parent reply other threads:[~2012-10-23 23:18 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
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 [this message]
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=508725C1.5090401@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.