From: Alexandra Chin <alexandra.chin@tw.synaptics.com>
To: Henrik Rydberg <rydberg@euromail.se>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Linux Input <linux-input@vger.kernel.org>,
Linus Walleij <linus.walleij@stericsson.com>,
Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com>,
Mahesh Srinivasan <msrinivasan@synaptics.com>,
Alex Chang <alex.chang@tw.synaptics.com>,
Scott Lin <scott.lin@tw.synaptics.com>,
Christopher Heiny <Cheiny@synaptics.com>
Subject: RE: [PATCH v3] staging: ste_rmi4: Convert to Type-B support
Date: Mon, 12 Nov 2012 11:59:26 +0000 [thread overview]
Message-ID: <CC51EC7B5B7F984AA566DC102237848896F62275@hkdcw-mail1.synaptics-inc.local> (raw)
In-Reply-To: <20121104215335.GA1060@polaris.bitmath.org>
Hi Henrik,
Really thanks a lot for all your advice.
> > @@ -751,7 +739,7 @@ static int synaptics_rmi4_i2c_query_device(struct
> synaptics_rmi4_data *pdata)
> > pdata->fn01_data_base_addr =
> > rmi_fd.data_base_addr;
> > break;
> > - case SYNAPTICS_RMI4_TOUCHPAD_FUNC_NUM:
> > + case SYNAPTICS_RMI4_TOUCHSCREEN_FUNC_NUM:
> > if (rmi_fd.intr_src_count) {
> > rfi = kmalloc(sizeof(*rfi),
> > GFP_KERNEL);
> > @@ -761,7 +749,8 @@ static int synaptics_rmi4_i2c_query_device(struct
> synaptics_rmi4_data *pdata)
> > __func__);
> > return -ENOMEM;
> > }
> > - retval = synpatics_rmi4_touchpad_detect
> > + retval =
> > + synpatics_rmi4_touchscreen_detect
> > (pdata, rfi,
> > &rmi_fd,
> > intr_count);
>
> Odd line break is a clear sign that something could be broken out into its own
> function.
>
> > @@ -854,8 +843,9 @@ static int synaptics_rmi4_i2c_query_device(struct
> synaptics_rmi4_data *pdata)
> > list_for_each_entry(rfi, &rmi->support_fn_list, link) {
> > if (rfi->num_of_data_sources) {
> > if (rfi->fn_number ==
> > - SYNAPTICS_RMI4_TOUCHPAD_FUNC_NUM) {
> > - retval = synaptics_rmi4_touchpad_config
> > + SYNAPTICS_RMI4_TOUCHSCREEN_FUNC_NUM) {
> > + retval =
> > + synaptics_rmi4_touchscreen_config
> > (pdata, rfi);
> > if (retval < 0)
> > return retval;
>
> Same here.
>
As you mentioned, there are odd lines in patch v3.
These odd lines are because that lines are over 80 characters after "touchpad" is
replaced by "touchscreen".
In patch v4, I did the splitting of the functions to fix line over 80 characters issue
(and other irrelevant work).
Somehow I realized that code itself can be optimized, and there is no need
to break out function to fix line over 80 characters issues. Therefore I rollback
patch to v3, and reorganized code flow to fix line over 80 characters issues in
patch v5. Patch v5 only includes odd lines issue fixed, although it looks a little
too large.
And these changes have been verified with Pandaboard.
Greatly appreciate your suggestions, and please let me know if you have any
concerns about v5 (https://lkml.org/lkml/2012/11/8/31).
Yours very truly,
Alexandra
next prev parent reply other threads:[~2012-11-12 11:59 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-02 17:36 [PATCH v3] staging: ste_rmi4: Convert to Type-B support Alexandra Chin
2012-11-04 21:53 ` Henrik Rydberg
2012-11-05 6:01 ` Alexandra Chin
2012-11-12 11:59 ` Alexandra Chin [this message]
2012-11-07 5:49 ` [PATCH v4] " Alexandra Chin
2012-11-07 19:57 ` Henrik Rydberg
2012-11-08 4:01 ` Alexandra Chin
2012-11-08 7:05 ` [PATCH v5] " Alexandra Chin
2012-11-09 19:26 ` Henrik Rydberg
2012-11-12 16:40 ` Alexandra Chin
2012-11-12 17:20 ` Henrik Rydberg
2012-11-13 2:04 ` Alexandra Chin
2012-11-13 12:12 ` [PATCH v6] " Alexandra Chin
2012-11-13 17:53 ` Henrik Rydberg
2012-11-14 17:33 ` Alexandra Chin
2012-11-14 17:40 ` [RFC] staging: ste_rmi4: merge into the main kernel tree Alexandra Chin
2012-11-14 18:04 ` Dmitry Torokhov
2012-11-15 2:56 ` Alexandra Chin
2012-11-15 6:43 ` Dmitry Torokhov
2012-11-15 17:41 ` Linus Walleij
2012-11-15 18:55 ` Dmitry Torokhov
2012-11-15 19:05 ` Linus Walleij
2012-11-16 9:02 ` Alexandra Chin
2012-11-16 19:24 ` Dmitry Torokhov
2012-11-16 8:31 ` [PATCH v6] staging: ste_rmi4: Convert to Type-B support Alexandra Chin
2012-11-16 19:54 ` Henrik Rydberg
2012-11-16 19:50 ` Greg Kroah-Hartman
2012-12-06 11:30 ` Alexandra Chin
2012-12-06 16:34 ` Greg Kroah-Hartman
2012-12-07 4:01 ` Alexandra Chin
2012-12-07 5:11 ` Greg Kroah-Hartman
2012-12-07 6:45 ` Alexandra Chin
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=CC51EC7B5B7F984AA566DC102237848896F62275@hkdcw-mail1.synaptics-inc.local \
--to=alexandra.chin@tw.synaptics.com \
--cc=Cheiny@synaptics.com \
--cc=alex.chang@tw.synaptics.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linus.walleij@stericsson.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=msrinivasan@synaptics.com \
--cc=naveen.gaddipati@stericsson.com \
--cc=rydberg@euromail.se \
--cc=scott.lin@tw.synaptics.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).